mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 08:16:30 +01:00
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:
parent
18e5584705
commit
c3ce2ebcd7
2 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue