view gamelib/icons.py @ 425:1d0cc37b4e14

Add method for clearing all chickens (will be useful later). Cache animal positions only just before night starts. Range-check position before adding it to the cache.
author Simon Cross <hodgestar@gmail.com>
date Sat, 21 Nov 2009 15:55:32 +0000
parents fe1e9c18d4d7
children 7b5e4b6dd889
line wrap: on
line source

"""Constant definitions for the icons we use"""

from pgu.gui import Image

import imagecache

KILLED_FOX = Image(imagecache.load_image('icons/killed_fox.png'))
CHKN_ICON = Image(imagecache.load_image('icons/chkn.png'))
EMPTY_NEST_ICON = Image(imagecache.load_image('sprites/nest.png'))

def animal_icon(animal):
    return Image(animal.image_left)