Greatly simplify the CLEAR_FOG and UNCLEAR_FOG macros...
...now that [hide_unit] accepts a SUF.
This commit is contained in:
parent
88245b8ff9
commit
724e666ed6
1 changed files with 2 additions and 40 deletions
|
@ -122,54 +122,20 @@
|
|||
# for the duration of an event: always use {UNCLEAR_FOG} (below) before the
|
||||
# event exits, or otherwise you'll be left with fake fog clearer units on
|
||||
# the map.
|
||||
[if]
|
||||
[have_unit]
|
||||
type=Fog Clearer
|
||||
[/have_unit]
|
||||
|
||||
[then]
|
||||
[set_variable]
|
||||
name=fog_clearer_i
|
||||
add=1
|
||||
[/set_variable]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
[set_variable]
|
||||
name=fog_clearer_i
|
||||
value=1
|
||||
[/set_variable]
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[unit]
|
||||
side={SIDE}
|
||||
type=Fog Clearer
|
||||
id=fog_clearer_$fog_clearer_i
|
||||
x,y={X},{Y}
|
||||
max_moves={RADIUS}
|
||||
[/unit]
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
id=fog_clearer_$fog_clearer_i
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=new_fog_clearer
|
||||
[/store_unit]
|
||||
|
||||
[hide_unit]
|
||||
x,y=$new_fog_clearer.x,$new_fog_clearer.y
|
||||
type=Fog Clearer
|
||||
[/hide_unit]
|
||||
|
||||
[redraw]
|
||||
side={SIDE}
|
||||
[/redraw]
|
||||
|
||||
[clear_variable]
|
||||
name=new_fog_clearer
|
||||
[/clear_variable]
|
||||
#enddef
|
||||
|
||||
#define UNCLEAR_FOG
|
||||
|
@ -180,10 +146,6 @@
|
|||
animate=no
|
||||
fire_event=no
|
||||
[/kill]
|
||||
|
||||
[clear_variable]
|
||||
name=fog_clearer_i
|
||||
[/clear_variable]
|
||||
#enddef
|
||||
|
||||
#define SET_LABEL X Y STRING
|
||||
|
@ -206,7 +168,7 @@
|
|||
[label]
|
||||
x={X}
|
||||
y={Y}
|
||||
text="" # wmllint: ignore
|
||||
text="" # wmllint: ignore
|
||||
[/label]
|
||||
#enddef
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue