# HG changeset patch # User KarstenBock@gmx.net # Date 1316619547 -7200 # Node ID 8f1edcab56027f0dc96876a56903797d3fcdcd8e # Parent 1b1ab906e76eec0c598e3c634edfc08ba14b9b6f Functions in equip.py will now correctly set the equipable's attributes. diff -r 1b1ab906e76e -r 8f1edcab5602 components/equip.py --- a/components/equip.py Wed Sep 21 17:37:30 2011 +0200 +++ b/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