Further improvement of log conditional
This commit is contained in:
parent
39368bc9ae
commit
4e2962fef8
5 changed files with 17 additions and 17 deletions
|
|
@ -25,7 +25,6 @@ from evennia.utils.utils import (
|
|||
format_grid,
|
||||
)
|
||||
from evennia.utils.eveditor import EvEditor
|
||||
from evennia.utils.evmenu import ask_yes_no
|
||||
from evennia.utils.evmore import EvMore
|
||||
from evennia.utils.evtable import EvTable
|
||||
from evennia.prototypes import spawner, prototypes as protlib, menus as olc_menus
|
||||
|
|
@ -2225,7 +2224,7 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS):
|
|||
"by an explicit create_object call. Use `update` or type/force instead in order "
|
||||
"to keep such data. "
|
||||
"Continue [Y]/N?|n")
|
||||
if answer.upper() == "N":
|
||||
if answer.upper() in ("N", "NO"):
|
||||
caller.msg("Aborted.")
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -1274,7 +1274,7 @@ class TestBuilding(BaseEvenniaCommandTest):
|
|||
"Obj2 = evennia.objects.objects.DefaultExit",
|
||||
"Obj2 changed typeclass from evennia.objects.objects.DefaultObject "
|
||||
"to evennia.objects.objects.DefaultExit.",
|
||||
cmdstring="swap",
|
||||
cmdstring="swap", inputs=["yes"],
|
||||
)
|
||||
self.call(building.CmdTypeclass(), "/list Obj", "Core typeclasses")
|
||||
self.call(
|
||||
|
|
@ -1302,7 +1302,8 @@ class TestBuilding(BaseEvenniaCommandTest):
|
|||
building.CmdTypeclass(),
|
||||
"Obj",
|
||||
"Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\n"
|
||||
"Only the at_object_creation hook was run (update mode). Attributes set before swap were not removed.",
|
||||
"Only the at_object_creation hook was run (update mode). Attributes set before swap were not removed\n"
|
||||
"(use `swap` or `type/reset` to clear all).",
|
||||
cmdstring="update",
|
||||
)
|
||||
self.call(
|
||||
|
|
@ -1310,6 +1311,7 @@ class TestBuilding(BaseEvenniaCommandTest):
|
|||
"/reset/force Obj=evennia.objects.objects.DefaultObject",
|
||||
"Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\n"
|
||||
"All object creation hooks were run. All old attributes where deleted before the swap.",
|
||||
inputs=["yes"]
|
||||
)
|
||||
|
||||
from evennia.prototypes.prototypes import homogenize_prototype
|
||||
|
|
@ -1332,11 +1334,11 @@ class TestBuilding(BaseEvenniaCommandTest):
|
|||
self.call(
|
||||
building.CmdTypeclass(),
|
||||
"/prototype Obj=testkey",
|
||||
"replaced_obj changed typeclass from "
|
||||
"evennia.objects.objects.DefaultObject to "
|
||||
"typeclasses.objects.Object.\nAll object creation hooks were "
|
||||
"run. Attributes set before swap were not removed. Prototype "
|
||||
"'replaced_obj' was successfully applied over the object type.",
|
||||
"replaced_obj changed typeclass from evennia.objects.objects.DefaultObject to "
|
||||
"typeclasses.objects.Object.\nOnly the at_object_creation hook was run "
|
||||
"(update mode). Attributes set before swap were not removed\n"
|
||||
"(use `swap` or `type/reset` to clear all). Prototype 'replaced_obj' was "
|
||||
"successfully applied over the object type."
|
||||
)
|
||||
assert self.obj1.db.desc == "protdesc"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue