modified AI_CONTROLLER_ALLOW_LEADER_CONTROL macro...

...to show a better menu item description and to allow I18N of menu
item description
This commit is contained in:
Iurii Chernyi 2009-09-24 00:06:28 +00:00
parent db53a8b27e
commit 9563cfd035

View file

@ -386,15 +386,38 @@
#define AI_CONTROLLER_ALLOW_LEADER_CONTROL SIDE_CONTROLLER SIDE_CONTROLLED
[set_menu_item]
description="Ask AI {SIDE_CONTROLLED} leader to move here"
[show_if]
side={SIDE_CONTROLLER}
[/show_if]
[command]
{CLEAR_AI_ALWAYS_ASPECT_LEADER_GOAL {SIDE_CONTROLLED} }
{MODIFY_AI_ADD_ASPECT {SIDE_CONTROLLED} leader_goal {AI_ASPECT_LEADER_GOAL_MOVE_TO $x1 $y1} }
[/command]
[/set_menu_item]
[store_unit]
[filter]
side={SIDE_CONTROLLED}
canrecruit=yes
[/filter]
kill=no
variable=ally_leader
[/store_unit]
[if]
[variable]
name=ally_leader.length
greater_than=0
[/variable]
[then]
[set_menu_item]
id=ai_controller_leader_control_{SIDE_CONTROLLED}
description= _ "Ask $ally_leader.name (leader of side $ally_leader.side) to move here"
[show_if]
side={SIDE_CONTROLLER}
#TODO: show only if ally leader is alive
[/show_if]
[command]
{CLEAR_AI_ALWAYS_ASPECT_LEADER_GOAL {SIDE_CONTROLLED} }
{MODIFY_AI_ADD_ASPECT {SIDE_CONTROLLED} leader_goal {AI_ASPECT_LEADER_GOAL_MOVE_TO $x1 $y1} }
[/command]
[/set_menu_item]
[/then]
[/if]
{CLEAR_VARIABLE ally_leader}
#enddef