Mercurial > rinkhals
comparison gamelib/equipment.py @ 569:3ec614e6fd4a
Replace monolithic sell equipment tool with a tool for each type of equipment.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 28 Nov 2009 19:59:46 +0000 |
parents | 05e0c3fd20ec |
children | 441077fab928 |
comparison
equal
deleted
inserted
replaced
568:e813365af567 | 569:3ec614e6fd4a |
---|---|
228 NAME = "Nestegg" | 228 NAME = "Nestegg" |
229 CHICKEN_IMAGE_FILE = 'sprites/equip_egg.png' | 229 CHICKEN_IMAGE_FILE = 'sprites/equip_egg.png' |
230 DRAW_LAYER = 14 | 230 DRAW_LAYER = 14 |
231 | 231 |
232 def is_equipment(obj): | 232 def is_equipment(obj): |
233 """Return true if obj is a build class.""" | 233 """Return true if obj is an equipment class.""" |
234 return getattr(obj, "IS_EQUIPMENT", False) and hasattr(obj, "NAME") | 234 return getattr(obj, "IS_EQUIPMENT", False) and hasattr(obj, "NAME") |
235 | 235 |
236 def is_weapon(obj): | 236 def is_weapon(obj): |
237 return is_equipment(obj) and getattr(obj, 'IS_WEAPON', False) | 237 return is_equipment(obj) and getattr(obj, 'IS_WEAPON', False) |
238 | 238 |