Merge pull request #1456 from scyfris/fix_spawn_evennia

Fix locationless spawned objects
This commit is contained in:
Griatch 2017-10-01 09:44:25 +02:00 committed by GitHub
commit e09390b02b
2 changed files with 2 additions and 2 deletions

View file

@ -2718,7 +2718,7 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS):
self.caller.msg("The prototype must be a prototype key or a Python dictionary.")
return
if "noloc" in self.switches and not "location" not in prototype:
if "noloc" not in self.switches and "location" not in prototype:
prototype["location"] = self.caller.location
for obj in spawn(prototype):

View file

@ -100,7 +100,7 @@ _CREATE_OBJECT_KWARGS = ("key", "location", "home", "destination")
def _handle_dbref(inp):
dbid_to_obj(inp, ObjectDB)
return dbid_to_obj(inp, ObjectDB)
def _validate_prototype(key, prototype, protparents, visited):