# HG changeset patch # User Adrianna PiƄska # Date 1316046094 -7200 # Node ID d0ed88799c4441f3c1bea30b57d1bbbf5868cd00 # Parent e461aa9d112fe070fda95025a8435e6cccaae875 mutation indicators diff -r e461aa9d112f -r d0ed88799c44 data/tiles/common/snake/snake-tail-fire.png Binary file data/tiles/common/snake/snake-tail-fire.png has changed diff -r e461aa9d112f -r d0ed88799c44 data/tiles/common/snake/snake-tail-puddle.png Binary file data/tiles/common/snake/snake-tail-puddle.png has changed diff -r e461aa9d112f -r d0ed88799c44 data/tiles/common/snake/snake-tail.png Binary file data/tiles/common/snake/snake-tail.png has changed diff -r e461aa9d112f -r d0ed88799c44 mamba/snake.py --- a/mamba/snake.py Thu Sep 15 01:50:50 2011 +0200 +++ b/mamba/snake.py Thu Sep 15 02:21:34 2011 +0200 @@ -116,6 +116,7 @@ def mutate(self, mutation): self.mutation = mutation + self.tail.show_mutation(mutation) def can_swim(self): return self.mutation == 'amphibious' @@ -295,5 +296,15 @@ class Tail(Segment): + INDICATORS = { + "flame-retardant": mutators.Overlay("snake/snake-tail-fire"), + "amphibious": mutators.Overlay("snake/snake-tail-puddle"), + } + def __init__(self, tile_pos): super(Tail, self).__init__("snake-tail", tile_pos) + + def show_mutation(self, mutation): + self._detail_mutators = (self.INDICATORS[mutation],) + self.make_images() + self.update_image() diff -r e461aa9d112f -r d0ed88799c44 source/svg/tiles/common/snake/snake-tail-fire.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/svg/tiles/common/snake/snake-tail-fire.svg Thu Sep 15 02:21:34 2011 +0200 @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff -r e461aa9d112f -r d0ed88799c44 source/svg/tiles/common/snake/snake-tail-puddle.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/source/svg/tiles/common/snake/snake-tail-puddle.svg Thu Sep 15 02:21:34 2011 +0200 @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff -r e461aa9d112f -r d0ed88799c44 source/svg/tiles/common/snake/snake-tail.svg --- a/source/svg/tiles/common/snake/snake-tail.svg Thu Sep 15 01:50:50 2011 +0200 +++ b/source/svg/tiles/common/snake/snake-tail.svg Thu Sep 15 02:21:34 2011 +0200 @@ -14,7 +14,7 @@ id="svg2" version="1.1" inkscape:version="0.48.1 r9760" - sodipodi:docname="snake-tail-r.svg"> + sodipodi:docname="snake-tail.svg"> image/svg+xml - + @@ -96,6 +96,6 @@ sodipodi:rx="62.092625" sodipodi:ry="57.461407" d="m 164.32247,105.48885 a 62.092625,57.461407 0 1 1 -124.185252,0 62.092625,57.461407 0 1 1 124.185252,0 z" - transform="matrix(0.80524861,0,0,0.87014925,17.679561,860.57113)" /> + transform="matrix(0.80524861,0,0,0.87014925,57.679561,860.57113)" />