mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 14:26: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
|
|
@ -387,13 +387,11 @@ class Object(TypeClass):
|
|||
parent doesn't work.
|
||||
"""
|
||||
try:
|
||||
return _GA(_GA(self, "dbobj"),"dbid") == other \
|
||||
or _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid")
|
||||
return _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid")
|
||||
except AttributeError:
|
||||
# compare players instead
|
||||
try:
|
||||
return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == other \
|
||||
or _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid")
|
||||
return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid")
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue