def __init__ (self, ID, name = 'Wooden Crate', \ text = 'A battered crate', gfx = 'crate', **kwargs): events = {'takeAllButton':self.close, 'closeButton':self.close} ImmovableContainer.__init__(self, ID = ID, name = name, gfx = gfx, \ text = text, events = events, **kwargs) self.placeItem(CarryableItem(ID=987,name="Dagger456"))
def prepareStateForSaving(self, state): """Prepares state for saving @type state: dictionary @param state: State of the object """ ImmovableContainer.prepareStateForSaving(self, state) del state["behaviour"]
def __init__ (self, object_id, agent_layer=None, name = 'Footlocker', text = 'A Footlocker', gfx = 'lock_box_metal01', **kwargs): ImmovableContainer.__init__(self, ID = object_id, name = name, gfx = gfx, text = text, **kwargs) self.behaviour = None self.attributes.append("AnimatedContainer") self.createBehaviour(agent_layer)
def __init__ (self, ID, agent_layer=None, name = 'Footlocker', \ text = 'A Footlocker', gfx = 'lock_box_metal01', **kwargs): events = {'takeAllButton':self.close, 'closeButton':self.close} ImmovableContainer.__init__(self, ID = ID, name = name, gfx = gfx, \ text = text, events = events, **kwargs) self.placeItem(CarryableItem(ID=987,name="Dagger456")) fife.InstanceActionListener.__init__(self) self.layer = agent_layer self.agent = self.layer.getInstance(self.ID) self.agent.addActionListener(self) self.state = _AGENT_STATE_CLOSED self.agent.act('closed', self.agent.getLocation())
def __init__ (self, ID, name = 'Wooden Crate', \ text = 'A battered crate', gfx = 'crate', **kwargs): ImmovableContainer.__init__(self, ID = ID, name = name, gfx = gfx, \ text = text, **kwargs)