Mercurial > parpg-core
comparison src/parpg/objects/action.py @ 158:9ba129380af8
PickUpAction now calls updateObjectDB of the GameModel class.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 07 Oct 2011 14:43:42 +0200 |
parents | db6403c1a7a1 |
children | ede6f6b31bf8 |
comparison
equal
deleted
inserted
replaced
157:db6403c1a7a1 | 158:9ba129380af8 |
---|---|
412 def execute(self): | 412 def execute(self): |
413 real_item = self.item.containable | 413 real_item = self.item.containable |
414 self.item.fifeagent = None | 414 self.item.fifeagent = None |
415 player = self.model.game_state.getObjectById("PlayerCharacter") | 415 player = self.model.game_state.getObjectById("PlayerCharacter") |
416 self.model.moveObject(self.item.general.identifier, None) | 416 self.model.moveObject(self.item.general.identifier, None) |
417 self.model.updateObjectDB(self.item.world) | |
417 container.put_item(player.container, real_item) | 418 container.put_item(player.container, real_item) |
418 super(PickUpAction, self).execute() | 419 super(PickUpAction, self).execute() |
419 | 420 |
420 class DropItemAction(Action): | 421 class DropItemAction(Action): |
421 """Action for dropping an items on a map""" | 422 """Action for dropping an items on a map""" |