# HG changeset patch # User KarstenBock@gmx.net # Date 1316619547 -7200 # Node ID 853ec1b277c7cbc8abb774239475727e693d20f7 # Parent c045f97b7dbcd802744b9f6a6b5adaf2894a3168 Functions in equip.py will now correctly set the equipable's attributes. diff -r c045f97b7dbc -r 853ec1b277c7 src/parpg/components/equip.py --- a/src/parpg/components/equip.py Wed Sep 21 17:37:30 2011 +0200 +++ b/src/parpg/components/equip.py Wed Sep 21 17:39:07 2011 +0200 @@ -37,6 +37,8 @@ try: old_item = getattr(wearer, slot) setattr(wearer, slot, equipable) + equipable.in_slot = slot + equipable.wearer = wearer return old_item except AttributeError: raise SlotInvalidError(slot) @@ -53,7 +55,10 @@ def take_equipable(wearer, slot): """Remove equipable from the given slot and return it""" item = get_equipable(wearer, slot) - setattr(wearer, slot, None) + setattr(wearer, slot, None) + if item: + item.in_slot = None + item.wearer = None return item \ No newline at end of file