ANL: refactor variable

- store only what is needed
- free variable
This commit is contained in:
Severin Glöckner 2019-06-12 02:30:31 +02:00
parent 2683563fb3
commit acc17f310c

View file

@ -15,10 +15,10 @@
[/have_unit]
[/show_if]
[command]
[store_side]
[store_gold]
side=$side_number
variable=worker
[/store_side]
variable=gold
[/store_gold]
[store_unit]
[filter]
@ -32,6 +32,7 @@
name=finished
value=no
[/set_variable]
[while]
[variable]
name=finished
@ -101,7 +102,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=15
[/variable]
@ -125,7 +126,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=6
[/variable]
@ -148,7 +149,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=4
[/variable]
@ -173,7 +174,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=1
[/variable]
@ -257,7 +258,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=25
[/variable]
@ -284,7 +285,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=25
[/variable]
@ -311,7 +312,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=3
[/variable]
@ -339,7 +340,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=5
[/variable]
@ -395,7 +396,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=1
[/variable]
@ -426,7 +427,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=2
[/variable]
@ -451,7 +452,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=3
[/variable]
@ -526,7 +527,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=6
[/variable]
@ -552,7 +553,7 @@
[command]
[if]
[variable]
name=worker.gold
name=gold
greater_than_equal_to=7
[/variable]
@ -595,7 +596,7 @@
[/while]
[clear_variable]
name=finished
name=finished,gold
[/clear_variable]
[/command]
[/set_menu_item]