Fixed a bug in is_typeclass and cleaned up some other things in the player/object typeclass. Resolves #722.
This commit is contained in:
parent
f007de3a5e
commit
78ca2819b2
3 changed files with 26 additions and 69 deletions
|
|
@ -401,7 +401,7 @@ class TypedObject(SharedMemoryModel):
|
|||
return selfpath in typeclass
|
||||
else:
|
||||
# check parent chain
|
||||
return any(cls.path in typeclass for cls in self.__class__.mro())
|
||||
return any(hasattr(cls, "path") and cls.path in typeclass for cls in self.__class__.mro())
|
||||
|
||||
def swap_typeclass(self, new_typeclass, clean_attributes=False,
|
||||
run_start_hooks=True, no_default=True):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue