hazelmud/typeclasses/objects.py

45 lines
1.4 KiB
Python

"""
Object
The Object is the "naked" base class for things in the game world.
Note that the default Character, Room and Exit does not inherit from
this Object, but from their respective default implementations in the
evennia library. If you want to use this class as a parent to change
the other types, you can do so by adding this as a multiple
inheritance.
"""
from evennia.objects.objects import DefaultObject
from evennia.utils import lazy_property
from evennia.contrib.rpg.traits import TraitProperty
from evennia.contrib.rpg.traits import TraitHandler
class ObjectParent:
pass
class Object(ObjectParent, DefaultObject):
pass
#class ObjectPlayerDefault(DefaultObject):
#class Object(ObjectParent, DefaultObject):
#
## @lazy_property
## def traits(self):
## return TraitHandler(self)
##
## @lazy_property
## def looks(self):
## return TraitHandler(self, db_attribute_key="looks")
#
# def at_object_creation(self):
# self.looks.add("ears", "Ears", trait_type="counter",
# base=0, mod=0, min=0, max=2,
# descs = {0:"human ears", 1:"cat ears", 2:"dog ears"})
# self.looks.add("tail", "Tail", trait_type="counter",
# base=0, mod=0, min=0, max=2,
# descs = {0:"no tail", 1:"cat tail", 2:"dog tail"})
#
# def return_looks(self):
# pass