ANL: get name from player instead of leader

This commit is contained in:
Severin Glöckner 2019-06-17 19:46:38 +02:00
parent 90a34c64db
commit 0ca9dc540f
2 changed files with 18 additions and 24 deletions

View file

@ -420,10 +420,7 @@
[event]
name=new turn
first_time_only=no
{SET_NAMES 1}
{SET_NAMES 2}
{SET_NAMES 3}
{SET_NAMES 4}
{SET_NAMES}
[/event]
# Rescuing trapped units

View file

@ -38,31 +38,28 @@
[/show_if]
#enddef
#define SET_NAMES SIDE
[if]
[have_unit]
side={SIDE}
#define SET_NAMES
[store_side]
team_name=settlers
[has_unit]
canrecruit=yes
[/have_unit]
[then]
[store_unit]
[filter]
side={SIDE}
canrecruit=yes
[/filter]
variable=leader
[/store_unit]
[/has_unit]
variable=sides
[/store_side]
[foreach]
array=sides
[do]
[set_variable]
name=player_{SIDE}.name
value=$leader.name
name=player_$this_item.side|.name
value=$this_item.current_player
[/set_variable]
[/do]
[/foreach]
[clear_variable]
name=leader
[/clear_variable]
[/then]
[/if]
[clear_variable]
name=sides
[/clear_variable]
#enddef
#define SET_SIDE_VARIABLES SIDE