Skip to content

Commit

Permalink
Supersede probability/animation village macros with optional arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ln-zookeeper committed Dec 23, 2016
1 parent ea55e7d commit 2519c43
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 49 deletions.
12 changes: 6 additions & 6 deletions data/core/terrain-graphics.cfg
Expand Up @@ -321,10 +321,10 @@

#Drake villages
#20% 20% 20% 20% 20%
{NEW:VILLAGE_A3 *^Vd 200 village/drake1-A}{VILLAGE_PROBABILITY 20}
{NEW:VILLAGE_A3 *^Vd 100 village/drake2-A}{VILLAGE_PROBABILITY 25}
{NEW:VILLAGE *^Vd village/drake3}{VILLAGE_PROBABILITY 33}
{NEW:VILLAGE *^Vd village/drake4}{VILLAGE_PROBABILITY 50}
{NEW:VILLAGE *^Vd village/drake1-A PROB=20 ANIM=[01~03] TIME=200}
{NEW:VILLAGE *^Vd village/drake2-A PROB=25 ANIM=[01~03] TIME=100}
{NEW:VILLAGE *^Vd village/drake3 PROB=33}
{NEW:VILLAGE *^Vd village/drake4 PROB=50}
{NEW:VILLAGE *^Vd village/drake5}

#Orcish villages
Expand Down Expand Up @@ -362,8 +362,8 @@
# {NEW:VILLAGE *^Vm village/coast2}{VILLAGE_PROBABILITY 24}
# {NEW:VILLAGE *^Vm village/coast3}{VILLAGE_PROBABILITY 29}
# {NEW:VILLAGE *^Vm village/coast4}{VILLAGE_PROBABILITY 35}
{NEW:VILLAGE_TOD_P *^Vm 80 village/coast}
{NEW:VILLAGE_A4 *^Vm 140 village/coast_5-A}
{NEW:VILLAGE_TOD_P *^Vm 80 village/coast}
{NEW:VILLAGE *^Vm village/coast_5-A ANIM=[01~04] TIME=140}

#
# > O V E R L A Y S <
Expand Down
58 changes: 15 additions & 43 deletions data/core/terrain-graphics/new-macros.cfg
Expand Up @@ -1859,6 +1859,16 @@ transition#endarg
#enddef

#define NEW:VILLAGE TERRAINLIST IMAGESTEM

#arg PROB
100#endarg

#arg ANIM
#endarg

#arg TIME
#endarg

[terrain_graphics]
map="
, *
Expand All @@ -1873,8 +1883,10 @@ transition#endarg
set_no_flag=village
[/tile]

probability={PROB}

[image]
name={IMAGESTEM}@V.png
name={IMAGESTEM}@V{ANIM}.png:{TIME}
variations=";2;3;4;5;6;7"
layer=0
base=90,144
Expand All @@ -1884,27 +1896,7 @@ transition#endarg
#enddef

#define NEW:VILLAGE_A3 TERRAINLIST TIME IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"

[tile]
pos=1
type={TERRAINLIST}
set_no_flag=village
[/tile]

[image]
name={IMAGESTEM}[01~03].png:{TIME}
layer=0
base=90,144
center=90,144
[/image]
[/terrain_graphics]
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~03]) (TIME={TIME})}
#enddef

#define NEW:VILLAGE_TOD_P TERRAINLIST PROB IMAGESTEM
Expand Down Expand Up @@ -1938,27 +1930,7 @@ transition#endarg
#enddef

#define NEW:VILLAGE_A4 TERRAINLIST TIME IMAGESTEM
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"

[tile]
pos=1
type={TERRAINLIST}
set_no_flag=village
[/tile]

[image]
name={IMAGESTEM}[01~04].png:{TIME}
layer=0
base=90,144
center=90,144
[/image]
[/terrain_graphics]
{NEW:VILLAGE {TERRAINLIST} {IMAGESTEM} (ANIM=[01~04]) (TIME={TIME})}
#enddef

# This hacky macro will hopefully be replaced with a more elegant way of passing
Expand Down

0 comments on commit 2519c43

Please sign in to comment.