From aeb17e78e4739875bc8f5b3915bafd3079290562 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 5 Sep 2014 09:13:53 +0200 Subject: [PATCH] Added deepcopying of prototypes in spawner. Resolves #565. --- src/utils/spawner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/spawner.py b/src/utils/spawner.py index 94805dc5e3..b4bbdc3113 100644 --- a/src/utils/spawner.py +++ b/src/utils/spawner.py @@ -69,7 +69,7 @@ many traits with a normal goblin. """ -import os, sys +import os, sys, copy sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings' @@ -199,7 +199,7 @@ def spawn(*prototypes, **kwargs): if "return_prototypes" in kwargs: # only return the parents - return protparents + return copy.deepcopy(protparents) objsparams = [] for prototype in prototypes: