mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fixing condition where state could be only sort of successful.
This commit is contained in:
parent
feb71858db
commit
7419b3a82d
1 changed files with 3 additions and 2 deletions
|
|
@ -2102,7 +2102,8 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS):
|
|||
|
||||
if "prototype" in self.switches:
|
||||
modified = spawner.batch_update_objects_with_prototype(prototype, objects=[obj])
|
||||
if modified == 0:
|
||||
prototype_success = modified > 0
|
||||
if not prototype_success:
|
||||
caller.msg("Prototype %s failed to apply." % prototype["key"])
|
||||
|
||||
if is_same:
|
||||
|
|
@ -2121,7 +2122,7 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS):
|
|||
string += " All old attributes where deleted before the swap."
|
||||
else:
|
||||
string += " Attributes set before swap were not removed."
|
||||
if "prototype" in self.switches:
|
||||
if "prototype" in self.switches and prototype_success:
|
||||
string += " Prototype '%s' was successfully applied over the object type." % prototype["key"]
|
||||
|
||||
caller.msg(string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue