Changeset 599


Ignore:
Timestamp:
07/24/10 18:30:27 (9 years ago)
Author:
beliar
Message:

Patch by Beliar.

  • Items will now be dropped at the players feet. The way before was done cause the generic image was too big.
  • The inventory gui will now be updated when an item is picked up.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/objects/action.py

    r596 r599  
    290290        super(PickUpAction, self).__init__(controller, commands) 
    291291        self.map_item = map_item 
    292  
     292        self.view = controller.view 
     293         
    293294    def execute(self): 
    294295        real_item = self.model.createContainerObject(self.map_item.item) 
     
    296297        self.model.game_state.player_character.\ 
    297298                                inventory.placeItem(real_item) 
     299        self.view.hud.inventory.updateInventoryButtons() 
    298300        super(PickUpAction, self).execute() 
    299301         
     
    317319        coords = self.model.game_state.player_character.\ 
    318320                                        getLocation().getExactLayerCoordinates() 
    319         map_item_values["Position"] = (coords.x - 1.0, coords.y + 1.0) 
     321        map_item_values["Position"] = (coords.x, coords.y) 
    320322        map_item_values["Rotation"] = 0 
    321323        map_item_values["item"] = item_data 
Note: See TracChangeset for help on using the changeset viewer.