diff --git a/evennia/contrib/tutorial_world/build.ev b/evennia/contrib/tutorial_world/build.ev index f1d24491f4..1c5c3dec16 100644 --- a/evennia/contrib/tutorial_world/build.ev +++ b/evennia/contrib/tutorial_world/build.ev @@ -354,7 +354,7 @@ start # Lock exit from view/traverse until we climbed that tree (which is # when tutorial_climbed_tree Tag gets assigned to us). # -@lock north = view:tag(tutorial_climbed_tree) ; traverse:tag(tutorial_climbed_tree) +@lock north = view:tag(tutorial_climbed_tree, tutorial_world) ; traverse:tag(tutorial_climbed_tree, tutorial_world) # @desc north = This is a hardly visible footpath leading off through the rain-beaten @@ -364,11 +364,12 @@ start @set north/tutorial_info = This exit is locked with a lock string that looks like this: - view:tag(tutorial_climbed_tree) ; traverse:tag(tutorial_climbed_tree) + view:tag(tutorial_climbed_tree, tutorial_world) ; traverse:tag(tutorial_climbed_tree, tutorial_world) - This checks if Character has a Tag tutorial_climbed_tree set before it - allows itself to be displayed. This Tag is set by the tree object when - the 'climb' command is used. + This checks if Character has a Tag named "tutorial_climbed_tree" and +of the category "tutorial_world" set before it allows itself to be +displayed. This Tag is set by the tree object when the 'climb' command +is used. # # Now that the exit is prepared, move to outside inn to continue building. # diff --git a/evennia/contrib/tutorial_world/rooms.py b/evennia/contrib/tutorial_world/rooms.py index 6f24da6667..953dd53927 100644 --- a/evennia/contrib/tutorial_world/rooms.py +++ b/evennia/contrib/tutorial_world/rooms.py @@ -627,6 +627,12 @@ class BridgeRoom(WeatherRoom): self.db.fall_exit = "cliffledge" # add the cmdset on the room. self.cmdset.add_default(BridgeCmdSet) + # since the default Character's at_look() will access the room's + # return_description (this skips the cmdset) when + # first entering it, we need to explicitly turn off the room + # as a normal view target - once inside, our own look will + # handle all return messages. + self.locks.add("view:false()") def update_weather(self, *args, **kwargs): """ @@ -659,6 +665,7 @@ class BridgeRoom(WeatherRoom): else: # if not from the east, then from the west! character.db.tutorial_bridge_position = 0 + character.execute_cmd("look") def at_object_leave(self, character, target_location): """ diff --git a/evennia/locks/lockfuncs.py b/evennia/locks/lockfuncs.py index 3c64e1e6ee..23ae3b7833 100644 --- a/evennia/locks/lockfuncs.py +++ b/evennia/locks/lockfuncs.py @@ -474,7 +474,9 @@ def tag(accessing_obj, accessed_obj, *args, **kwargs): """ if hasattr(accessing_obj, "obj"): accessing_obj = accessing_obj.obj - return accessing_obj.tags.get(*args) + tagkey = args[0] if args else None + category = args[1] if len(args) > 1 else None + return accessing_obj.tags.get(tagkey, category=category) def objtag(accessing_obj, accessed_obj, *args, **kwargs): """