# HG changeset patch # User KarstenBock@gmx.net # Date 1316694568 -7200 # Node ID 65aa498791edbb4e7d0eae6d68d36b90496e1d90 # Parent 334f7aea6386ec062b4c8b58b3683018e2666c7d The addObject method of the GameState class now accepts an object_id parameter, instead of it getting that value from the object. diff -r 334f7aea6386 -r 65aa498791ed src/parpg/gamestate.py --- a/src/parpg/gamestate.py Wed Sep 21 19:52:35 2011 +0200 +++ b/src/parpg/gamestate.py Thu Sep 22 14:29:28 2011 +0200 @@ -28,16 +28,17 @@ self.npcs_met = set() - def addObject(self, map_id, game_object): + def addObject(self, object_id, map_id, game_object): """Adds an object to the objects and object_ids dictionaries. + @param object_id: ID of the object + @type object_id: str @param map_id: ID of the map the object is on. If the object is in a container this has to be None + @type map_id: str or None @param object: object to be added @type object: GameObject - @type map_id: str or None """ - object_id = game_object.fifeagent.identifier if not self.object_ids.has_key(object_id): if map_id: self.objects[map_id][object_id] = game_object