Ignore:
Timestamp:
03/19/10 01:08:21 (10 years ago)
Author:
b0rland_parpg
Message:

Ticket #229: patch by b0rland

  • Slightly updated the interaction between dialog gui and inventories/actors
  • Fixed the 'give box' stage of fedex quest
  • Added a dummy image for box
File:
1 edited

Legend:

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

    r480 r532  
    286286        if inventory == None: 
    287287            self.inventory = Inventory() 
     288            self.inventory.placeItem(CarryableItem(ID = 632, 
     289                                                   name = "box", 
     290                                                   image = "/gui/inv_images/inv_box.png")) 
     291 
    288292        else: 
    289293            self.inventory = inventory 
     
    331335        self.behaviour.pc = pc.behaviour.agent 
    332336        self.behaviour.idle() 
     337         
     338    def give (self, item, actor): 
     339        """Gives the specified item to the different actor. Raises an exception if the item was invalid or not found 
     340           @type item: Carryable 
     341           @param item: The item object to give 
     342           @param actor: Person to give item to""" 
     343        if item == None:  
     344            raise ValueError("I don't have %s" % item.name) 
     345        self.inventory.takeItem(item) 
     346        actor.inventory.placeItem(item)            
    333347     
    334348    def setup(self): 
Note: See TracChangeset for help on using the changeset viewer.