def __init__(self, name, description, inventory=None, up=None, down=None, north=None, south=None, east=None, west=None, displayAutomatically=False): if inventory is None: inventory = InventoryManager(inside=True, on=False, under=False) self.name = name self.__class__.registry[name] = self self.description = description self.directions = dict() self.directions['up'] = up self.directions['down'] = down self.directions['north'] = north self.directions['south'] = south self.directions['east'] = east self.directions['west'] = west GameEntity.__init__(self, name=name, description=description, inventory=inventory, displayAutomatically=displayAutomatically)
def __init__(self, name, description=None, inventory=None, aliases=None, exposeInventory=False, displayAutomatically=True, shortDescription=None, displayName=None, recurseAutomatically=True): if inventory is None: inventory = InventoryManager(on=False, under=False, inside=True) inventory.slots['inside'].exposed = False GameEntity.__init__(self, name=name, description=description, inventory=inventory, aliases=aliases, exposeInventory=exposeInventory, displayAutomatically=displayAutomatically, shortDescription=shortDescription, displayName=displayName, recurseAutomatically=recurseAutomatically) self.__class__.registry[name] = self
def __init__(self, name, displayName=None, description=None, shortDescription=None, inventory=None, aliases=None, isGettable=False, displayAutomatically=True): GameEntity.__init__(self, name=name, description=description, shortDescription=shortDescription, inventory=inventory, aliases=aliases, isGettable=isGettable, displayAutomatically=displayAutomatically) self.__class__.registry[name] = self self.displayName = displayName if displayName is not None: self.names.add(displayName.lower())