mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 10:16:32 +01:00
Some minor fixes to the default @py output and also some more info to the extended_room contrib.
This commit is contained in:
parent
86c5553208
commit
3f01ab8006
2 changed files with 11 additions and 5 deletions
|
|
@ -23,6 +23,10 @@ time comes.
|
|||
|
||||
An updated @desc command allows for setting seasonal descriptions.
|
||||
|
||||
The room uses the src.utils.gametime.GameTime global script. This is
|
||||
started by default, but if you have deactivated it, you need to
|
||||
supply your own time keeping mechanism.
|
||||
|
||||
|
||||
2) In-description changing tags
|
||||
|
||||
|
|
|
|||
|
|
@ -149,20 +149,22 @@ class CmdPy(MuxCommand):
|
|||
'ev':ev,
|
||||
'inherits_from':utils.inherits_from}
|
||||
|
||||
caller.msg(">>> %s" % pycode)
|
||||
caller.msg(">>> %s{n" % pycode)
|
||||
try:
|
||||
ret = eval(pycode, {}, available_vars)
|
||||
ret = "<<< %s" % str(ret)
|
||||
if ret != None:
|
||||
ret = "{n<<< %s" % str(ret)
|
||||
except Exception:
|
||||
try:
|
||||
exec(pycode, {}, available_vars)
|
||||
ret = "<<< Done."
|
||||
ret = "{n<<< Done."
|
||||
except Exception:
|
||||
errlist = traceback.format_exc().split('\n')
|
||||
if len(errlist) > 4:
|
||||
errlist = errlist[4:]
|
||||
ret = "\n".join("<<< %s" % line for line in errlist if line)
|
||||
caller.msg(ret)
|
||||
ret = "\n".join("{n<<< %s" % line for line in errlist if line)
|
||||
if ret != None:
|
||||
caller.msg(ret)
|
||||
|
||||
# helper function. Kept outside so it can be imported and run
|
||||
# by other commands.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue