Made the "get to work" and "oversee research" menus not invalidate undo...
...if you cancel them and renamed the CAPTURE_VILLAGE macro to ANL_CAPTURE_VILLAGE to prevent conflicts.
This commit is contained in:
parent
0a0396d22b
commit
436d4eceb5
3 changed files with 103 additions and 83 deletions
|
@ -28,7 +28,7 @@
|
|||
[/disallow_recruit]
|
||||
#enddef
|
||||
|
||||
#define CAPTURE_VILLAGE
|
||||
#define ANL_CAPTURE_VILLAGE
|
||||
[capture_village]
|
||||
x=$x1
|
||||
y=$y1
|
||||
|
|
|
@ -74,100 +74,118 @@
|
|||
x=$x1
|
||||
y=$y1
|
||||
[/filter]
|
||||
kill=no
|
||||
variable=unit
|
||||
[/store_unit]
|
||||
|
||||
{VARIABLE finished_options no}
|
||||
[while]
|
||||
{CONDITION finished_options equals no}
|
||||
[do]
|
||||
{VARIABLE finished_options no}
|
||||
{VARIABLE cancelled no}
|
||||
|
||||
[while]
|
||||
{CONDITION finished_options equals no}
|
||||
[do]
|
||||
# wmlindent: start ignoring
|
||||
[message]
|
||||
speaker=unit
|
||||
caption="Research"
|
||||
[message]
|
||||
speaker=unit
|
||||
caption="Research"
|
||||
#wmllint: display on
|
||||
message= _ "We are currently studying $player_$side_number|.research.current_target|. To which end would you have our scholars devote their minds?
|
||||
|
||||
message= _ "We are currently studying $player_$side_number|.research.current_target|. To which end would you have our scholars devote their minds?
|
||||
|
||||
Our farms produce $player_$side_number|.farming.gold|g
|
||||
Our mines produce $player_$side_number|.mining.gold|g
|
||||
"
|
||||
"
|
||||
#wmllint: display off
|
||||
|
||||
[option]
|
||||
message= _ "Continue as before"
|
||||
[command]
|
||||
{VARIABLE finished_options yes}
|
||||
[/command]
|
||||
[/option]
|
||||
[option]
|
||||
message= _ "Continue as before"
|
||||
[command]
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE cancelled yes}
|
||||
[/command]
|
||||
[/option]
|
||||
# wmlindent: stop ignoring
|
||||
# Farming
|
||||
|
||||
[option]
|
||||
message= {MENU_IMG_TXT "items/flower4.png" _"@Agriculture
|
||||
# Farming
|
||||
|
||||
[option]
|
||||
message= {MENU_IMG_TXT "items/flower4.png" _"@Agriculture
|
||||
Farmers produce +1 gold
|
||||
Study Progress: $player_$side_number|.farming.progress|/$player_$side_number|.farming.target"}
|
||||
[command]
|
||||
{VARIABLE player_$side_number|.research.current_target "agriculture"}
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE_OP unit.moves format 0}
|
||||
[/command]
|
||||
[/option]
|
||||
|
||||
# Mining
|
||||
|
||||
[option]
|
||||
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@Mining
|
||||
[command]
|
||||
{VARIABLE player_$side_number|.research.current_target "agriculture"}
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE_OP unit.moves format 0}
|
||||
[/command]
|
||||
[/option]
|
||||
|
||||
# Mining
|
||||
|
||||
[option]
|
||||
message= {MENU_IMG_TXT "items/gold-coins-small.png" _"@Mining
|
||||
Miners produce +1 gold
|
||||
Study Progress: $player_$side_number|.mining.progress|/$player_$side_number|.mining.target"}
|
||||
[command]
|
||||
{VARIABLE player_$side_number|.research.current_target "mining"}
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE_OP unit.moves format 0}
|
||||
[/command]
|
||||
[/option]
|
||||
|
||||
#Warfare
|
||||
|
||||
[option]
|
||||
message= {MENU_IMG_TXT "wesnoth-icon.png" _"@Warfare
|
||||
[command]
|
||||
{VARIABLE player_$side_number|.research.current_target "mining"}
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE_OP unit.moves format 0}
|
||||
[/command]
|
||||
[/option]
|
||||
|
||||
#Warfare
|
||||
|
||||
[option]
|
||||
message= {MENU_IMG_TXT "wesnoth-icon.png" _"@Warfare
|
||||
Allows you to recruit a new type of unit
|
||||
Study Progress: $player_$side_number|.warfare.progress|/$player_$side_number|.warfare.target"}
|
||||
[show_if]
|
||||
{CONDITION player_$side_number|.troop_1 equals no}
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_2 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_3 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_4 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_5 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_6 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_7 equals no}
|
||||
[/or]
|
||||
[/show_if]
|
||||
[show_if]
|
||||
{CONDITION player_$side_number|.troop_1 equals no}
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_2 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_3 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_4 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_5 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_6 equals no}
|
||||
[/or]
|
||||
[or]
|
||||
{CONDITION player_$side_number|.troop_7 equals no}
|
||||
[/or]
|
||||
[/show_if]
|
||||
|
||||
[command]
|
||||
{VARIABLE player_$side_number|.research.current_target "warfare"}
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE_OP unit.moves format 0}
|
||||
[/command]
|
||||
[/option]
|
||||
[/message]
|
||||
[/do]
|
||||
[/while]
|
||||
|
||||
[command]
|
||||
{VARIABLE player_$side_number|.research.current_target "warfare"}
|
||||
{VARIABLE finished_options yes}
|
||||
{VARIABLE_OP unit.moves format 0}
|
||||
[/command]
|
||||
[/option]
|
||||
|
||||
[/message]
|
||||
[/do]
|
||||
[/while]
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
[/unstore_unit]
|
||||
[/command]
|
||||
[if]
|
||||
[variable]
|
||||
name=cancelled
|
||||
not_equals=yes
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
[allow_undo][/allow_undo]
|
||||
[/else]
|
||||
[/if]
|
||||
[/command]
|
||||
[/set_menu_item]
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -46,7 +46,9 @@
|
|||
[option]
|
||||
message= _ "Nothing"
|
||||
[command]
|
||||
{VARIABLE finished yes}
|
||||
{VARIABLE finished yes}
|
||||
|
||||
[allow_undo][/allow_undo]
|
||||
[/command]
|
||||
[/option]
|
||||
|
||||
|
@ -91,7 +93,7 @@ message= {MENU_IMG_TXT2 "terrain/village/human-tile.png" _"@Build Village" _"`Co
|
|||
[then]
|
||||
{COMPLETE_ACTION (-15)}
|
||||
{MODIFY_TERRAIN "Gg^Vh" $x1 $y1}
|
||||
{CAPTURE_VILLAGE}
|
||||
{ANL_CAPTURE_VILLAGE}
|
||||
{BUILD_SOUND_1}
|
||||
[/then]
|
||||
[/if]
|
||||
|
@ -189,7 +191,7 @@ message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" _"@Build Mine" _"
|
|||
[then]
|
||||
{COMPLETE_ACTION (-25)}
|
||||
{MODIFY_TERRAIN "Hh^Vhh" $x1 $y1}
|
||||
{CAPTURE_VILLAGE}
|
||||
{ANL_CAPTURE_VILLAGE}
|
||||
{BUILD_SOUND_1}
|
||||
[/then]
|
||||
[/if]
|
||||
|
@ -210,7 +212,7 @@ message= {MENU_IMG_TXT2 "terrain/village/human-mountain-tile.png" _"@Build Mine"
|
|||
[then]
|
||||
{COMPLETE_ACTION (-25)}
|
||||
{MODIFY_TERRAIN "Mm^Vhh" $x1 $y1}
|
||||
{CAPTURE_VILLAGE}
|
||||
{ANL_CAPTURE_VILLAGE}
|
||||
{BUILD_SOUND_1}
|
||||
[/then]
|
||||
[/if]
|
||||
|
@ -384,7 +386,7 @@ message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" _"@Establish Univeristy
|
|||
[then]
|
||||
{COMPLETE_ACTION (-7)}
|
||||
{MODIFY_TERRAIN "Gg^Ve" $x1 $y1}
|
||||
{CAPTURE_VILLAGE}
|
||||
{ANL_CAPTURE_VILLAGE}
|
||||
{BUILD_SOUND_2}
|
||||
[/then]
|
||||
[/if]
|
||||
|
|
Loading…
Add table
Reference in a new issue