diff 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
line wrap: on
line diff
--- a/gamelib/equipment.py	Sat Nov 21 12:48:12 2009 +0000
+++ b/gamelib/equipment.py	Sat Nov 21 12:55:08 2009 +0000
@@ -4,13 +4,21 @@
 import sound
 import imagecache
 import animations
+import serializer
 
-class Equipment(object):
+
+class Equipment(serializer.Simplifiable):
     IS_EQUIPMENT = True
     DRAW_LAYER = 0
     UNDER_LIMB = False
     UNDER_EYE = False
 
+    SIMPLIFY = [
+        '_buy_price',
+        '_sell_price',
+        '_name',
+    ]
+
     def __init__(self):
         self._buy_price = self.BUY_PRICE
         self._sell_price = self.SELL_PRICE