Skip to content

Commit

Permalink
ANL: remove superfluous temp variables
Browse files Browse the repository at this point in the history
The other variables in that event are not needed either, left them in for
readability for the time being.

[ci skip]

(cherry-picked from commit 7a29fc1)
  • Loading branch information
sevu committed Oct 7, 2018
1 parent 5ad3216 commit 4d15d7e
Showing 1 changed file with 8 additions and 44 deletions.
52 changes: 8 additions & 44 deletions data/multiplayer/scenarios/ANL_utils/ANL_auto_working.cfg
Expand Up @@ -30,15 +30,6 @@
[foreach]
array=researchers
[do]
[set_variable]
name=temp_x
value=$this_item.x
[/set_variable]
[set_variable]
name=temp_y
value=$this_item.y
[/set_variable]

[set_variable]
name=credited_side
value=$this_item.side
Expand All @@ -56,7 +47,7 @@
[/set_variable]

[scroll_to]
x,y=$temp_x,$temp_y
x,y=$this_item.x,$this_item.y
[/scroll_to]

[unstore_unit]
Expand Down Expand Up @@ -133,15 +124,6 @@
[foreach]
array=harvesters
[do]
[set_variable]
name=temp_x
value=$this_item.x
[/set_variable]
[set_variable]
name=temp_y
value=$this_item.y
[/set_variable]

[set_variable]
name=credited_side
value=$this_item.side
Expand All @@ -157,9 +139,9 @@
amount=$amount
[/gold]

{MODIFY_TERRAIN "Re" $temp_x $temp_y}
{MODIFY_TERRAIN "Re" $this_item.x $this_item.y}
[remove_item]
x,y=$temp_x,$temp_y
x,y=$this_item.x,$this_item.y
[/remove_item]

[set_variable]
Expand All @@ -168,7 +150,7 @@
[/set_variable]

[scroll_to]
x,y=$temp_x,$temp_y
x,y=$this_item.x,$this_item.y
[/scroll_to]

[unstore_unit]
Expand Down Expand Up @@ -204,23 +186,14 @@
[foreach]
array=planters
[do]
[set_variable]
name=temp_x
value=$this_item.x
[/set_variable]
[set_variable]
name=temp_y
value=$this_item.y
[/set_variable]

# auto-plant
{MODIFY_TERRAIN "Re^Gvs" $temp_x $temp_y }
{MODIFY_TERRAIN "Re^Gvs" $this_item.x $this_item.y }

[remove_item]
x,y=$temp_x,$temp_y
x,y=$this_item.x,$this_item.y
[/remove_item]
[item]
x,y=$temp_x,$temp_y
x,y=$this_item.x,$this_item.y
image=items/flower4.png
[/item]

Expand Down Expand Up @@ -289,15 +262,6 @@
[foreach]
array=miners
[do]
[set_variable]
name=temp_x
value=$this_item.x
[/set_variable]
[set_variable]
name=temp_y
value=$this_item.y
[/set_variable]

[set_variable]
name=credited_side
value=$this_item.side
Expand All @@ -314,7 +278,7 @@
[/gold]

[scroll_to]
x,y=$temp_x,$temp_y
x,y=$this_item.x,$this_item.y
[/scroll_to]

[set_variable]
Expand Down

0 comments on commit 4d15d7e

Please sign in to comment.