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:
|
if "prototype" in self.switches:
|
||||||
modified = spawner.batch_update_objects_with_prototype(prototype, objects=[obj])
|
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"])
|
caller.msg("Prototype %s failed to apply." % prototype["key"])
|
||||||
|
|
||||||
if is_same:
|
if is_same:
|
||||||
|
|
@ -2121,7 +2122,7 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS):
|
||||||
string += " All old attributes where deleted before the swap."
|
string += " All old attributes where deleted before the swap."
|
||||||
else:
|
else:
|
||||||
string += " Attributes set before swap were not removed."
|
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"]
|
string += " Prototype '%s' was successfully applied over the object type." % prototype["key"]
|
||||||
|
|
||||||
caller.msg(string)
|
caller.msg(string)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue