From 3d214609fc7acde19da4c73f62971b2f8bf51efa Mon Sep 17 00:00:00 2001 From: Bradley Marques Date: Mon, 10 Apr 2023 12:14:39 +0200 Subject: [PATCH] Adds some notes and a cross-reference in Rooms documentaion. --- docs/source/Components/Exits.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/source/Components/Exits.md b/docs/source/Components/Exits.md index 17770a2b76..91964dfab6 100644 --- a/docs/source/Components/Exits.md +++ b/docs/source/Components/Exits.md @@ -19,6 +19,8 @@ *Exits* are in-game [Objects](./Objects.md) connecting other objects (usually [Rooms](./Rooms.md)) together. +> Note that Exits are one-way objects, so in order for two rooms to be linked bi-directionally, there will need to be two exits. + An object named `north` or `in` might be exits, as well as `door`, `portal` or `jump out the window`. An exit has two things that separate them from other objects. @@ -29,7 +31,7 @@ The default exit functionality is all defined on the [DefaultExit](DefaultExit) Exits are [locked](./Locks.md) using an `access_type` called *traverse* and also make use of a few hook methods for giving feedback if the traversal fails. See `evennia.DefaultExit` for more info. -Exits are normally overridden on a case-by-case basis, but if you want to change the default exit createad by rooms like `dig` , `tunnel` or `open` you can change it in settings: +Exits are normally overridden on a case-by-case basis, but if you want to change the default exit created by rooms like `dig` , `tunnel` or `open` you can change it in settings: BASE_EXIT_TYPECLASS = "typeclasses.exits.Exit" @@ -52,4 +54,8 @@ The process of traversing an exit is as follows: 1. `obj.at_post_move(source)` 1. On the Exit object, `at_post_traverse(obj, source)` is triggered. -If the move fails for whatever reason, the Exit will look for an Attribute `err_traverse` on itself and display this as an error message. If this is not found, the Exit will instead call `at_failed_traverse(obj)` on itself. \ No newline at end of file +If the move fails for whatever reason, the Exit will look for an Attribute `err_traverse` on itself and display this as an error message. If this is not found, the Exit will instead call `at_failed_traverse(obj)` on itself. + +### Creating Exits in code + +For an example of how to create Exits programatically please see [this guide](../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Creating-Things.md#linking-exits-and-rooms-in-code).