changeset 171:7f03365c098d

ReplaceItem in UseAction will now delete the old object from the database and the world.
author KarstenBock@gmx.net
date Sun, 09 Oct 2011 14:43:47 +0200
parents 371b17bc9113
children 2d671e57badb
files src/parpg/objects/action.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/objects/action.py	Sun Oct 09 14:39:02 2011 +0200
+++ b/src/parpg/objects/action.py	Sun Oct 09 14:43:47 2011 +0200
@@ -399,6 +399,8 @@
                 container.put_item(containable.container, 
                                    new_item.containable,
                                    containable.slot)
+                self.model.deleteObject(self.item.general.identifier)
+                self.item.delete()
                 self.view.hud.inventory.updateImages()
         super(UseAction, self).execute()