Ignore:
Timestamp:
12/07/09 01:59:14 (10 years ago)
Author:
b0rland_parpg
Message:

Ticket #107: patch by b0rland
Extended inventory with findByID method. Added tests.

File:
1 edited

Legend:

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

    r424 r436  
    262262        if self.containergui: 
    263263            self.containergui.hideContainer() 
     264 
     265    def findItemByID(self, ID): 
     266        for i in self.items : 
     267            if self.items[i].ID == ID: 
     268                return self.items[i] 
     269        return None 
    264270         
    265271class Living (object): 
Note: See TracChangeset for help on using the changeset viewer.