Added the ability to spawn objects with Tags.

This commit is contained in:
Griatch 2015-06-20 00:31:13 +02:00
parent 91b84213dd
commit 9dcb97060d
3 changed files with 13 additions and 6 deletions

View file

@ -857,6 +857,9 @@ class DefaultObject(ObjectDB):
if cdict.get("location"):
cdict["location"].at_object_receive(self, None)
self.at_after_move(None)
if cdict.get("tags"):
# this should be a list of tags
self.tags.add(cdict["tags"])
if cdict.get("attributes"):
# this should be a dict of attrname:value
keys, values = cdict["attributes"].keys(), cdict["attributes"].values()