From 9119b4aaa1113c3114a70b62b457eefdb719488d Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 4 Aug 2025 22:15:56 -0700 Subject: [PATCH] We can push/pull open/close almost anything Fix a bug when standing, as well as the friendly level of pets. I'm liking this test suite. --- .gitignore | 2 ++ commands/everyone.py | 10 +++++----- commands/hint.py | 4 ++++ typeclasses/characters.py | 3 +++ typeclasses/pets.py | 2 +- typeclasses/puppets.py | 1 - 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e8ab7fe..a482484 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ nosetests.xml /server/ssh-public.key /transcripts/202*.html /world/guest-book.md +/results.txt +server/ssl.* \ No newline at end of file diff --git a/commands/everyone.py b/commands/everyone.py index a23cfce..c1e5fbe 100755 --- a/commands/everyone.py +++ b/commands/everyone.py @@ -74,7 +74,7 @@ class CmdUse(MuxCommand): if item.has_method('do_use'): item.do_use(self.caller, obj) else: - self.caller.msg(f"You can't use {item.name}.") + self.caller.msg(item.db.use_msg or f"You can't use {item.name}.") class CmdPush(Command): @@ -101,7 +101,7 @@ class CmdPush(Command): if item.has_method('do_push'): item.do_push(pusher) else: - pusher.msg(f"You can't push {item.name}.") + pusher.msg(item.db.push_msg or f"You can't push {item.name}.") class CmdPull(Command): @@ -129,7 +129,7 @@ class CmdPull(Command): if item.has_method('do_pull'): item.do_pull(puller) else: - puller.msg(f"You can't pull {item.name}.") + puller.msg(item.db.pull_msg or f"You can't pull {item.name}.") class CmdOpen(Command): @@ -167,7 +167,7 @@ class CmdOpen(Command): if item.has_method('do_open'): item.do_open(opener) else: - opener.msg(f"You can't open {item.name}.") + opener.msg(item.db.open_msg or f"You can't open {item.name}.") class CmdClose(Command): @@ -204,7 +204,7 @@ class CmdClose(Command): if item.has_method('do_close'): item.do_close(closer) else: - closer.msg(f"You can't close {item.name}.") + closer.msg(item.db.close_msg or f"You can't close {item.name}.") class CmdWhisper(MuxCommand): diff --git a/commands/hint.py b/commands/hint.py index a7ac959..6092a93 100755 --- a/commands/hint.py +++ b/commands/hint.py @@ -60,6 +60,10 @@ class CmdHint(MuxCommand): hint = hints['default'] else: hint = hints[search_string] + + narrative = sub(r"\n", " ", narrative) + hint = sub(r"\n", " ", hint) + return self.display_hint(narrative, hint, cleaned) def display_hint(self, narrative, phrase, cleaned): diff --git a/typeclasses/characters.py b/typeclasses/characters.py index cdc25e8..38beae3 100644 --- a/typeclasses/characters.py +++ b/typeclasses/characters.py @@ -128,6 +128,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter): self.db.visited = False self.db.jumped_times = 0 self.db.tutorstate = 0 + self.db.thrown_times = 0 TutorBird.do_start_tutorial(self) self.msg(INTRO) @@ -347,6 +348,8 @@ class Character(Object, GenderCharacter, ContribRPCharacter): if self.db.is_sitting: self.msg("You stand up first...") + chair = self.db.is_sitting + chair.db.sitter = None self.db.is_sitting = False # @lock thing = tethered:id(#19) diff --git a/typeclasses/pets.py b/typeclasses/pets.py index 2b7022a..919ceb8 100755 --- a/typeclasses/pets.py +++ b/typeclasses/pets.py @@ -365,7 +365,7 @@ class Friendly(Pet): suffix = choices(self.db.friendly_msg, *subs) elif level.value > Reaction.INTERESTED.value and self.db.interested_msg: suffix = choices(self.db.interested_msg, *subs) - elif level.value > Reaction.CONCERNED and self.db.concerned_msg: + elif level.value > Reaction.CONCERNED.value and self.db.concerned_msg: suffix = choices(self.db.concerned_msg, *subs) else: suffix = choices(self.db.scared_msg, *subs) diff --git a/typeclasses/puppets.py b/typeclasses/puppets.py index b2a2c9a..b24ae6e 100755 --- a/typeclasses/puppets.py +++ b/typeclasses/puppets.py @@ -33,7 +33,6 @@ class Puppet(Character, Listener): account and sessions at this point; the last entry in the list from `self.sessions.get()` is the latest Session puppeting this Object. - """ self.msg(f"\nYou are puppeting |c{self.key}|n.") self.execute_cmd("pose reset")