From feb71858dbbdfbd09bf87a4f570adc7520757a3b Mon Sep 17 00:00:00 2001 From: Julie Iaccarino <1904063+biscuitWizard@users.noreply.github.com> Date: Sun, 16 Feb 2020 07:36:29 -0800 Subject: [PATCH] Improved the messaging for prototype applications. --- evennia/commands/default/building.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index 4bea968fa6..9eba7e2807 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -2101,7 +2101,9 @@ class CmdTypeclass(COMMAND_DEFAULT_CLASS): ) if "prototype" in self.switches: - spawner.batch_update_objects_with_prototype(prototype, objects=[obj]) + modified = spawner.batch_update_objects_with_prototype(prototype, objects=[obj]) + if modified == 0: + caller.msg("Prototype %s failed to apply." % prototype["key"]) if is_same: string = "%s updated its existing typeclass (%s).\n" % (obj.name, obj.path) @@ -2119,6 +2121,8 @@ 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: + string += " Prototype '%s' was successfully applied over the object type." % prototype["key"] caller.msg(string)