Added deepcopying of prototypes in spawner. Resolves #565.

This commit is contained in:
Griatch 2014-09-05 09:13:53 +02:00
parent 3dc35d8b6d
commit aeb17e78e4

View file

@ -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__))))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings'
@ -199,7 +199,7 @@ def spawn(*prototypes, **kwargs):
if "return_prototypes" in kwargs: if "return_prototypes" in kwargs:
# only return the parents # only return the parents
return protparents return copy.deepcopy(protparents)
objsparams = [] objsparams = []
for prototype in prototypes: for prototype in prototypes: