Change save/search_prototype, extend unittests

This commit is contained in:
Griatch 2019-02-09 16:52:02 +01:00
parent dac10eef2b
commit 0dfea46d5c
12 changed files with 154 additions and 39 deletions

View file

@ -262,7 +262,13 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
con = self.contents_cache.get(exclude=exclude)
# print "contents_get:", self, con, id(self), calledby() # DEBUG
return con
contents = property(contents_get)
def contents_set(self, *args):
"You cannot replace this property"
raise AttributeError("{}.contents is read-only. Use obj.move_to or "
"obj.location to move an object here.".format(self.__class__))
contents = property(contents_get, contents_set, contents_set)
@property
def exits(self):