diff gamelib/equipment.py @ 200:67d10f7e0159

selected chickens are selected
author Adrianna Pińska <adrianna.pinska@gmail.com>
date Fri, 04 Sep 2009 19:51:19 +0000
parents 355eaae40b1f
children 3074784c93f4
line wrap: on
line diff
--- a/gamelib/equipment.py	Fri Sep 04 19:49:30 2009 +0000
+++ b/gamelib/equipment.py	Fri Sep 04 19:51:19 2009 +0000
@@ -128,6 +128,7 @@
 class Accoutrement(Equipment):
     """Things which are not equipment, but are displayed in the same way"""
     IS_EQUIPMENT = False
+    IS_ACCOUTREMENT = True
     BUY_PRICE = 0
     SELL_PRICE = 0
 
@@ -157,6 +158,9 @@
 def is_armour(obj):
     return is_equipment(obj) and getattr(obj, 'IS_ARMOUR', False)
 
+def is_accoutrement(obj):
+    return not getattr(obj, "IS_EQUIPMENT", False) and hasattr(obj, "NAME") and getattr(obj, 'IS_ACCOUTREMENT', False)
+
 EQUIPMENT = []
 for name in dir():
     obj = eval(name)