Schema: Fix declaring guard_x/y/loc as required keys in stationed_guard MicroAI (they are optional)
This commit is contained in:
parent
932dca3982
commit
b9ff0c51fe
2 changed files with 17 additions and 1 deletions
|
@ -148,7 +148,7 @@
|
|||
{DEPRECATED_KEY id string}
|
||||
{REQUIRED_KEY distance s_unsigned}
|
||||
{REQUIRED_KEYS_LOC_OR_XY station string s_unsigned}
|
||||
{REQUIRED_KEYS_LOC_OR_XY guard string s_unsigned}
|
||||
{OPTIONAL_KEYS_LOC_OR_XY guard string s_unsigned}
|
||||
{DEFAULT_KEY ca_score s_unsigned 300000}
|
||||
[/case]
|
||||
[case]
|
||||
|
|
|
@ -55,6 +55,22 @@
|
|||
[/if]
|
||||
#enddef
|
||||
|
||||
#define OPTIONAL_KEYS_LOC_OR_XY KEY_BASE TYPE_LOC TYPE_XY
|
||||
[if]
|
||||
glob_on_{KEY_BASE}_x=*
|
||||
[or]
|
||||
glob_on_{KEY_BASE}_y=*
|
||||
[/or]
|
||||
[then]
|
||||
{REQUIRED_KEY {KEY_BASE}_x {TYPE_XY}}
|
||||
{REQUIRED_KEY {KEY_BASE}_y {TYPE_XY}}
|
||||
[/then]
|
||||
[else]
|
||||
{SIMPLE_KEY {KEY_BASE}_loc {TYPE_LOC}}
|
||||
[/else]
|
||||
[/if]
|
||||
#enddef
|
||||
|
||||
[tag]
|
||||
name="$action_wml"
|
||||
max=0
|
||||
|
|
Loading…
Add table
Reference in a new issue