Things can now reveal other things

This commit is contained in:
Howard Abrams 2025-04-18 18:02:43 -07:00
parent 3c0a4951e7
commit b6697bd56a
2 changed files with 8 additions and 8 deletions

View file

@ -164,12 +164,12 @@ class Character(Object, GenderCharacter):
And 'target' is some label. If not given, this defaults And 'target' is some label. If not given, this defaults
to the name of the thing. to the name of the thing.
""" """
hidden_tag = target.db.hidden_tag or f"hidden_{target}"
lock_string = f"view:tag({hidden_tag})"
view_lock = target.locks.get("view")
if view_lock == lock_string: # If they 'look' at a target with tags, they get those locks:
self.tags.add(hidden_tag) # For instance: @set waterfall/hidden_tag = "hidden_cave"
if target.db.hidden_tag:
for hidden_tag in target.db.hidden_tag.split(';'):
self.tags.add(hidden_tag)
if target.is_typeclass("typeclasses.rooms.Room"): if target.is_typeclass("typeclasses.rooms.Room"):
self.db.tutorstate = self.db.tutorstate | TutorialState.LOOK.value self.db.tutorstate = self.db.tutorstate | TutorialState.LOOK.value

View file

@ -100,7 +100,7 @@ class Fish(CarriableNPC):
it calls at_say() in order to do a type of monologue. it calls at_say() in order to do a type of monologue.
""" """
if self.db.spoken == 1: if self.db.spoken == 1:
self.at_say("Whew! Thanks for removing the sharp hook. Not sure how it got on that.") # Change self.at_say("Whew! Thanks for removing the sharp hook. Not sure how I got stuck on that.")
elif self.db.spoken == 5: elif self.db.spoken == 5:
self.at_say(f"My name's {self.db.name}. What's yours?") self.at_say(f"My name's {self.db.name}. What's yours?")
self.db.desc = f"{self.db.name}. {self.db.desc}" self.db.desc = f"{self.db.name}. {self.db.desc}"
@ -109,10 +109,10 @@ class Fish(CarriableNPC):
elif self.db.spoken == 20: elif self.db.spoken == 20:
self.at_say("So... how're you getting along?") self.at_say("So... how're you getting along?")
elif self.db.spoken == 30: elif self.db.spoken == 30:
self.at_say("Right, right. Still can't hear a things. Hrm.") self.at_say("Right, right. Still can't hear. Hrm.")
elif self.db.spoken == 60: elif self.db.spoken == 60:
self.at_say("Do you know why we fish are so easy to weigh? ") self.at_say("Do you know why we fish are so easy to weigh? ")
elif self.db.spoken == 61: elif self.db.spoken == 63:
self.at_say("Because we have are own scales.") self.at_say("Because we have are own scales.")
elif self.db.spoken == 70: elif self.db.spoken == 70:
self.at_say("I suppose you could |gthrow|n me back in the water at any time.") self.at_say("I suppose you could |gthrow|n me back in the water at any time.")