Mercurial > rinkhals
diff gamelib/animal.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 | 9096c237928c |
children | d110d55c8449 |
line wrap: on
line diff
--- a/gamelib/animal.py Sat Nov 21 12:48:12 2009 +0000 +++ b/gamelib/animal.py Sat Nov 21 12:55:08 2009 +0000 @@ -11,14 +11,23 @@ import sound import equipment import animations +import serializer -class Animal(Sprite): +class Animal(Sprite, serializer.Simplifiable): """Base class for animals""" STEALTH = 0 VISION_BONUS = 0 VISION_RANGE_PENALTY = 10 + SIMPLIFY = [ + 'pos', + 'equipment', + 'accoutrements', + 'abode', + 'facing', + ] + def __init__(self, image_left, image_right, tile_pos): # Create the animal somewhere far off screen Sprite.__init__(self, image_left, (-1000, -1000))