comparison gamemodel.py @ 105:dc573ac08355

Fixed graphical representation of lockables, that are open, when creating the agent.
author KarstenBock@gmx.net
date Fri, 30 Sep 2011 14:11:02 +0200
parents 824f3068ef2a
children edadf3ff8a9a
comparison
equal deleted inserted replaced
104:c9afad46091b 105:dc573ac08355
465 item_data = self.items[identifier]["Entity"] 465 item_data = self.items[identifier]["Entity"]
466 item_type = item_data["containable"]["item_type"] 466 item_type = item_data["containable"]["item_type"]
467 item = self.create_item(identifier, item_data, 467 item = self.create_item(identifier, item_data,
468 world, item_type) 468 world, item_type)
469 equip.equip(obj.equip, item.equipable, slot) 469 equip.equip(obj.equip, item.equipable, slot)
470 if (obj.fifeagent and (obj.lockable and not obj.lockable.closed)):
471 obj.fifeagent.behaviour.animate("opened", repeating=True)
470 return obj 472 return obj
471 473
472 def create_item(self, identifier, item_data, world, item_type): 474 def create_item(self, identifier, item_data, world, item_type):
473 item = createEntity(item_data, identifier, world, None) 475 item = createEntity(item_data, identifier, world, None)
474 item.containable.item_type = item_type 476 item.containable.item_type = item_type