changeset 155:7214224b8d83

Fixed that items in the player characters inventory could not be dropped.
author KarstenBock@gmx.net
date Fri, 07 Oct 2011 14:15:06 +0200
parents b96607c8be7f
children 04de7f38429a
files src/parpg/gamemodel.py src/parpg/gamescenecontroller.py src/parpg/objects/action.py
diffstat 3 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/gamemodel.py	Thu Oct 06 16:08:00 2011 +0200
+++ b/src/parpg/gamemodel.py	Fri Oct 07 14:15:06 2011 +0200
@@ -501,7 +501,6 @@
             if self.active_map.agent_layer.getInstances(agent):
                 continue
             self.createAgent(agents[agent], agent, world)
-        self.updateObjectDB(world)
 
     def placePC(self, world):
         """Places the PlayerCharacter on the map"""
--- a/src/parpg/gamescenecontroller.py	Thu Oct 06 16:08:00 2011 +0200
+++ b/src/parpg/gamescenecontroller.py	Fri Oct 07 14:15:06 2011 +0200
@@ -360,6 +360,7 @@
             
             self.model.placeAgents(self)
             self.model.placePC(self)
+            self.model.updateObjectDB(self)
             self.model.map_change = False
             # The PlayerCharacter has an inventory, and also some 
             # filling of the ready slots in the HUD. 
--- a/src/parpg/objects/action.py	Thu Oct 06 16:08:00 2011 +0200
+++ b/src/parpg/objects/action.py	Fri Oct 07 14:15:06 2011 +0200
@@ -435,6 +435,7 @@
         self.model.deleteObject(identifier)
         self.model.addAgent(map_name, {identifier: agent_values})
         self.model.placeAgents(self.item.entity.world)
+        self.model.updateObjectDB(self.item.entity.world)
         super(DropItemAction, self).execute()
         
 class DropItemFromContainerAction(DropItemAction):