Add script.obj.dbref to scripts output. Resolves #2167

This commit is contained in:
Griatch 2020-07-18 19:25:37 +02:00
parent e58147a7e5
commit 54e70a40b7
2 changed files with 2 additions and 2 deletions

View file

@ -446,7 +446,7 @@ def format_script_list(scripts):
table.add_row(
script.id,
script.obj.key if (hasattr(script, "obj") and script.obj) else "<Global>",
f"{script.obj.key}({script.obj.dbref})" if (hasattr(script, "obj") and script.obj) else "<Global>",
script.key,
script.interval if script.interval > 0 else "--",
nextrep,

View file

@ -1123,7 +1123,7 @@ class TestBuilding(CommandTest):
"= Obj",
"To create a global script you need scripts/add <typeclass>.",
)
self.call(building.CmdScript(), "Obj = ", "dbref obj")
self.call(building.CmdScript(), "Obj = ", "dbref obj")
self.call(
building.CmdScript(), "/start Obj", "0 scripts started on Obj"