Mercurial > rinkhals
diff gamelib/equipment.py @ 423:97dd557504a2
Override make methods for simplifiable objects.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 15:39:49 +0000 |
parents | ab4fc3fe0f96 |
children | 42777630956a |
line wrap: on
line diff
--- a/gamelib/equipment.py Sat Nov 21 15:35:23 2009 +0000 +++ b/gamelib/equipment.py Sat Nov 21 15:39:49 2009 +0000 @@ -24,6 +24,11 @@ self._sell_price = self.SELL_PRICE self._name = self.NAME + def make(cls): + """Override default Simplifiable object creation.""" + return cls() + make = classmethod(make) + def buy_price(self): return self._buy_price