Ignore:
Timestamp:
07/24/10 17:48:44 (9 years ago)
Author:
beliar
Message:

Patch by Beliar.

  • Fixed crash when picking up items
  • changed displayObjectText of GameSceneView?, it now stores the id of the instance instead of the instance.
  • getObjectById of GameState? can now be called without a map_id, the method will now use its getMapOfObject method if no map is given.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/gamestate.py

    r586 r598  
    8989        return None 
    9090     
    91     def getObjectById(self, obj_id, map_id): 
     91    def getObjectById(self, obj_id, map_id = None): 
    9292        """Gets an object by its object id and map id 
    9393           @type obj_id: String 
     
    9696           @param map_id: It id of the map containing the object. 
    9797           @returns: The object or None.""" 
     98        if not map_id: 
     99            map_id = self.getMapOfObject(obj_id) 
    98100        if not map_id in self.objects: 
    99101            self.objects[map_id] = {} 
Note: See TracChangeset for help on using the changeset viewer.