Mercurial > parpg-core
comparison src/parpg/objects/action.py @ 157:db6403c1a7a1
Fixed that dropped items cannot be picked up.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 07 Oct 2011 14:36:36 +0200 |
parents | 7214224b8d83 |
children | 9ba129380af8 |
comparison
equal
deleted
inserted
replaced
156:04de7f38429a | 157:db6403c1a7a1 |
---|---|
430 coords = (self.model.game_state.getObjectById("PlayerCharacter"). | 430 coords = (self.model.game_state.getObjectById("PlayerCharacter"). |
431 fifeagent.behaviour.getLocation().getExactLayerCoordinates() | 431 fifeagent.behaviour.getLocation().getExactLayerCoordinates() |
432 ) | 432 ) |
433 agent_values["Position"] = (coords.x, coords.y) | 433 agent_values["Position"] = (coords.x, coords.y) |
434 agent_values["Rotation"] = 0 | 434 agent_values["Rotation"] = 0 |
435 agent_values["Map"] = map_name | |
435 self.model.deleteObject(identifier) | 436 self.model.deleteObject(identifier) |
436 self.model.addAgent(map_name, {identifier: agent_values}) | 437 self.model.addAgent(self.model.ALL_AGENTS_KEY, |
438 {identifier: agent_values}) | |
437 self.model.placeAgents(self.item.entity.world) | 439 self.model.placeAgents(self.item.entity.world) |
438 self.model.updateObjectDB(self.item.entity.world) | 440 self.model.updateObjectDB(self.item.entity.world) |
439 super(DropItemAction, self).execute() | 441 super(DropItemAction, self).execute() |
440 | 442 |
441 class DropItemFromContainerAction(DropItemAction): | 443 class DropItemFromContainerAction(DropItemAction): |