Added hooks at_pre_cmd() and at_post_cmd() for easy implementation of stuff like prompts.
Added obj.exit property to objects for easily finding all exits from a room.
This commit is contained in:
parent
ecbd36c5a8
commit
923b9ac2ec
5 changed files with 62 additions and 3 deletions
|
|
@ -385,9 +385,15 @@ def cmdhandler(caller, raw_string, unloggedin=False, testing=False):
|
|||
# only return the command instance
|
||||
return cmd
|
||||
|
||||
# pre-command hook
|
||||
cmd.at_pre_cmd()
|
||||
|
||||
# Parse and execute
|
||||
cmd.parse()
|
||||
cmd.func()
|
||||
|
||||
# post-command hook
|
||||
cmd.at_post_cmd()
|
||||
# Done!
|
||||
|
||||
except ExecSystemCommand, exc:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue