diff gamelib/buildings.py @ 109:48019afde338

Equipment purchasing and some toolbar tweaks.
author Jeremy Thurgood <firxen@gmail.com>
date Wed, 02 Sep 2009 18:46:10 +0000
parents 437cbd856a03
children 2e3a05b9594d
line wrap: on
line diff
--- a/gamelib/buildings.py	Wed Sep 02 18:42:00 2009 +0000
+++ b/gamelib/buildings.py	Wed Sep 02 18:46:10 2009 +0000
@@ -8,6 +8,7 @@
 class Building(Sprite):
     """Base class for buildings"""
 
+    IS_BUILDING = True
     GRASSLAND = tiles.REVERSE_TILE_MAP['grassland']
 
     def __init__(self, pos):
@@ -123,7 +124,7 @@
 
 def is_building(obj):
     """Return true if obj is a build class."""
-    return hasattr(obj, "NAME")
+    return getattr(obj, "IS_BUILDING", False) and hasattr(obj, "NAME")
 
 BUILDINGS = []
 for name in dir():