mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 00:36:30 +01:00
Further fixes to the tag lockfunc as well as handling of the changes to at_look to not include calling execute_cmd(look) but to use the at_look hook. This should finally resolve #889.
This commit is contained in:
parent
03d415beb1
commit
c1e4b1fe07
3 changed files with 16 additions and 6 deletions
|
|
@ -354,7 +354,7 @@ start
|
||||||
# Lock exit from view/traverse until we climbed that tree (which is
|
# Lock exit from view/traverse until we climbed that tree (which is
|
||||||
# when tutorial_climbed_tree Tag gets assigned to us).
|
# 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 =
|
@desc north =
|
||||||
This is a hardly visible footpath leading off through the rain-beaten
|
This is a hardly visible footpath leading off through the rain-beaten
|
||||||
|
|
@ -364,11 +364,12 @@ start
|
||||||
@set north/tutorial_info =
|
@set north/tutorial_info =
|
||||||
This exit is locked with a lock string that looks like this:
|
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
|
This checks if Character has a Tag named "tutorial_climbed_tree" and
|
||||||
allows itself to be displayed. This Tag is set by the tree object when
|
of the category "tutorial_world" set before it allows itself to be
|
||||||
the 'climb' command is used.
|
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.
|
# Now that the exit is prepared, move to outside inn to continue building.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -627,6 +627,12 @@ class BridgeRoom(WeatherRoom):
|
||||||
self.db.fall_exit = "cliffledge"
|
self.db.fall_exit = "cliffledge"
|
||||||
# add the cmdset on the room.
|
# add the cmdset on the room.
|
||||||
self.cmdset.add_default(BridgeCmdSet)
|
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):
|
def update_weather(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
@ -659,6 +665,7 @@ class BridgeRoom(WeatherRoom):
|
||||||
else:
|
else:
|
||||||
# if not from the east, then from the west!
|
# if not from the east, then from the west!
|
||||||
character.db.tutorial_bridge_position = 0
|
character.db.tutorial_bridge_position = 0
|
||||||
|
character.execute_cmd("look")
|
||||||
|
|
||||||
def at_object_leave(self, character, target_location):
|
def at_object_leave(self, character, target_location):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -474,7 +474,9 @@ def tag(accessing_obj, accessed_obj, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
if hasattr(accessing_obj, "obj"):
|
if hasattr(accessing_obj, "obj"):
|
||||||
accessing_obj = 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):
|
def objtag(accessing_obj, accessed_obj, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue