mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +01:00
Added a give command to the default command set. As part of this also fixed some bugs in how object typeclasses were compared.
This commit is contained in:
parent
949da47917
commit
c615693a2a
8 changed files with 53 additions and 21 deletions
|
|
@ -157,10 +157,9 @@ class TypeClass(object):
|
|||
dbobj-recognized comparison
|
||||
"""
|
||||
try:
|
||||
return other == self or other == _GA(self, dbobj) or other == _GA(self, dbobj).user
|
||||
return _GA(_GA(self, "dbobj"), "dbid") == _GA(_GA(other, "dbobj"), "dbid")
|
||||
except AttributeError:
|
||||
# if self.dbobj.user fails it means the two previous comparisons failed already
|
||||
return False
|
||||
return id(self) == id(other)
|
||||
|
||||
|
||||
def __delattr__(self, propname):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue