Mercurial > parpg-source
comparison objects/action.py @ 145:46570c1ee4ca
Changed DropItemFromContainerAction to work with components.
author | KarstenBock@gmx.net |
---|---|
date | Sun, 09 Oct 2011 20:50:01 +0200 |
parents | 658e06a20fa5 |
children |
comparison
equal
deleted
inserted
replaced
144:86b9b181ad1c | 145:46570c1ee4ca |
---|---|
451 super(DropItemFromContainerAction, self).__init__(controller, item, commands) | 451 super(DropItemFromContainerAction, self).__init__(controller, item, commands) |
452 self.container_gui = container_gui | 452 self.container_gui = container_gui |
453 | 453 |
454 def execute(self): | 454 def execute(self): |
455 super(DropItemFromContainerAction, self).execute() | 455 super(DropItemFromContainerAction, self).execute() |
456 self.item.in_container.takeItem(self.item) | 456 container.remove_item(self.item.container, self.item.slot) |
457 self.container_gui.updateImages() | 457 self.container_gui.updateImages() |
458 | 458 |
459 class BrewBeerAction(Action): | 459 class BrewBeerAction(Action): |
460 """Action for brewing beer in a pot""" | 460 """Action for brewing beer in a pot""" |
461 def __init__(self, controller, pot, commands = None): | 461 def __init__(self, controller, pot, commands = None): |