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.
This commit is contained in:
parent
da51b5293f
commit
9119b4aaa1
6 changed files with 15 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -60,3 +60,5 @@ nosetests.xml
|
|||
/server/ssh-public.key
|
||||
/transcripts/202*.html
|
||||
/world/guest-book.md
|
||||
/results.txt
|
||||
server/ssl.*
|
||||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue