Added deepcopying of prototypes in spawner. Resolves #565.
This commit is contained in:
parent
3dc35d8b6d
commit
aeb17e78e4
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue