Added an easy-to-use macro that can be used in scenarios...
...to display a warning when the AI is playing a side it doesn't know how to play.
This commit is contained in:
parent
e7d41dfd80
commit
50978161c6
1 changed files with 42 additions and 0 deletions
|
@ -109,3 +109,45 @@ Gg , 1 Gg , 2 Gg , Gg
|
|||
Gg , Gg , Gg , Gg
|
||||
"
|
||||
#enddef
|
||||
|
||||
#define AI_CANT_PLAY SIDES
|
||||
# Displays a standard warning at the start of the first AI turn for each
|
||||
# given side about the AI not knowing how to play this side properly. Use
|
||||
# this to tag sides intended solely for human players in special multiplayer
|
||||
# scenarios (ones with shops, custom right-click options and such).
|
||||
#
|
||||
# Example:
|
||||
# ! {AI_CANT_PLAY 1,2,3,4}
|
||||
[event]
|
||||
name=ai turn
|
||||
first_time_only=no
|
||||
|
||||
[if]
|
||||
[have_unit]
|
||||
side=$side_number
|
||||
|
||||
[and]
|
||||
side={SIDES}
|
||||
[/and]
|
||||
[/have_unit]
|
||||
|
||||
[variable]
|
||||
name=side_$side_number|_ai_warning_displayed
|
||||
not_equals=yes
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[message]
|
||||
speaker=narrator
|
||||
message= _ "The computer player might not be able to play side $side_number properly in this scenario. Side $side_number is intended to be played by a human player."
|
||||
image=icons/icon-ai.png
|
||||
[/message]
|
||||
|
||||
[set_variable]
|
||||
name=side_$side_number|_ai_warning_displayed
|
||||
value=yes
|
||||
[/set_variable]
|
||||
[/then]
|
||||
[/if]
|
||||
[/event]
|
||||
#enddef
|
||||
|
|
Loading…
Add table
Reference in a new issue