Fix locationless spawned objects

Spawned objects were not getting locations assigned to them.  By default
the locations should be assigned to the caller's location.
This commit is contained in:
Scyfris Talivinsky 2017-09-30 18:18:54 -07:00 committed by Griatch
parent 18e5584705
commit c3ce2ebcd7
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):