Macros: use [foreach] for MOVE_UNIT_BY
This commit is contained in:
parent
5b96bee90d
commit
b7fe0db365
1 changed files with 5 additions and 6 deletions
|
@ -312,18 +312,17 @@
|
|||
kill=yes
|
||||
[/store_unit]
|
||||
|
||||
[for]
|
||||
[foreach]
|
||||
array=MOVE_UNIT_store
|
||||
variable=MOVE_UNIT_BY_i
|
||||
[do]
|
||||
{VARIABLE_OP MOVE_UNIT_store[$MOVE_UNIT_BY_i].x add {OFFSET_X}}
|
||||
{VARIABLE_OP MOVE_UNIT_store[$MOVE_UNIT_BY_i].y add {OFFSET_Y}}
|
||||
{VARIABLE_OP this_item.x add {OFFSET_X}}
|
||||
{VARIABLE_OP this_item.y add {OFFSET_Y}}
|
||||
[unstore_unit]
|
||||
variable=MOVE_UNIT_store[$MOVE_UNIT_BY_i]
|
||||
variable=this_item
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
[/do]
|
||||
[/for]
|
||||
[/foreach]
|
||||
{CLEAR_VARIABLE MOVE_UNIT_store}
|
||||
#enddef
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue