comparison gamelib/equipment.py @ 415:8f012ef1f64f

Start of ability to serialize game state.
author Simon Cross <hodgestar@gmail.com>
date Sat, 21 Nov 2009 12:55:08 +0000
parents bdc4757e0497
children ab4fc3fe0f96
comparison
equal deleted inserted replaced
414:9096c237928c 415:8f012ef1f64f
2 2
3 import random 3 import random
4 import sound 4 import sound
5 import imagecache 5 import imagecache
6 import animations 6 import animations
7 7 import serializer
8 class Equipment(object): 8
9
10 class Equipment(serializer.Simplifiable):
9 IS_EQUIPMENT = True 11 IS_EQUIPMENT = True
10 DRAW_LAYER = 0 12 DRAW_LAYER = 0
11 UNDER_LIMB = False 13 UNDER_LIMB = False
12 UNDER_EYE = False 14 UNDER_EYE = False
15
16 SIMPLIFY = [
17 '_buy_price',
18 '_sell_price',
19 '_name',
20 ]
13 21
14 def __init__(self): 22 def __init__(self):
15 self._buy_price = self.BUY_PRICE 23 self._buy_price = self.BUY_PRICE
16 self._sell_price = self.SELL_PRICE 24 self._sell_price = self.SELL_PRICE
17 self._name = self.NAME 25 self._name = self.NAME