Tag beginning characters as 'beginner'

This allows us to hide stuff if they are looking for alchemist stuff.
This commit is contained in:
Howard Abrams 2025-08-28 21:20:09 -07:00
parent fe6c088152
commit 586fdadf7a
3 changed files with 21 additions and 3 deletions

View file

@ -71,6 +71,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
def at_object_creation(self): def at_object_creation(self):
"called when a character is first created." "called when a character is first created."
self.db.tutorstate = 0 self.db.tutorstate = 0
self.tags.add('beginner')
if self.dbref != "#1" and not self.is_typeclass('typeclasses.puppets.Puppet'): if self.dbref != "#1" and not self.is_typeclass('typeclasses.puppets.Puppet'):
self.create_letter() self.create_letter()
@ -157,6 +158,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
self.ndb.shelf_full_of_jars_view_index = 0 self.ndb.shelf_full_of_jars_view_index = 0
self.db.wee_beastie_friendly_level = 0 self.db.wee_beastie_friendly_level = 0
self.db.big_hairy_beast_friendly_level = 0 self.db.big_hairy_beast_friendly_level = 0
self.tags.add('beginner')
# Finally, star the tutorial: # Finally, star the tutorial:
TutorBird.do_start_tutorial(self) TutorBird.do_start_tutorial(self)
@ -182,6 +184,11 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
account = self.account account = self.account
player = account.key player = account.key
# Temporary solution to retrofit the fact that new characters
# should have this attribute...
if not self.tags.has('alchemist'):
self.tags.add('beginner')
if player not in ("rob", "george", "darol", "rick", "howard"): if player not in ("rob", "george", "darol", "rick", "howard"):
# Does everyone need to know about people logging in? # Does everyone need to know about people logging in?
# pub = search_channel("Public").first() # pub = search_channel("Public").first()

View file

@ -530,9 +530,15 @@ class Listener:
tag = m.group(1) tag = m.group(1)
logger.info(f"Tagging '{tag}'") logger.info(f"Tagging '{tag}'")
for c in self.characters_here(puppets=True): for c in self.characters_here(puppets=True):
# Two tags?
c.tags.add(tag) c.tags.add(tag)
c.tags.add(tag, category="mp") return
m = match(r"untag_all +(.*) *", cmd)
if m:
tag = m.group(1)
logger.info(f"Tagging '{tag}'")
for c in self.characters_here(puppets=True):
c.tags.remove(tag)
return return
m = match(r"gift_all ([A-z]+)( *: *([^:]+)( *: *(.*))?)?", cmd) m = match(r"gift_all ([A-z]+)( *: *([^:]+)( *: *(.*))?)?", cmd)

View file

@ -3710,8 +3710,13 @@ py bt = self.search('imp'); bt.sdesc.add('imp'); bt.db.pose = 'sitting on an orn
@desc imp = Peculiar little fellow gives you are quizical look from its roost on a wrought iron perch that it clutches with its clawed feet and barbed, prehensile tail. @desc imp = Peculiar little fellow gives you are quizical look from its roost on a wrought iron perch that it clutches with its clawed feet and barbed, prehensile tail.
# Imp:5 ends here # Imp:5 ends here
# When any one arrives, we assume that they are no longer a beginner, and have /graduated/ to see things in a different way, and the tag, =alchemist= is used as a view lock on all the ingredients.
# [[file:../../../projects/mud.org::*Imp][Imp:7]] # [[file:../../../projects/mud.org::*Imp][Imp:7]]
@set imp/arrive = "5 ;; tag_all alchemist ;; 240 ;; emote yawns." @set imp/arrive = "tag_all alchemist ;; untag_all beginner ;; 240 ;; emote yawns."
# Imp:7 ends here # Imp:7 ends here