Schema: Fix a few more cases of keys and tags not accepting variable substitution

This commit is contained in:
Celtic Minstrel 2018-04-04 22:31:40 -04:00
parent e83371b40c
commit d080c69356
4 changed files with 12 additions and 5 deletions

View file

@ -50,7 +50,7 @@
name="$filter_adjacent"
max=0
super="$filter_unit"
{SIMPLE_KEY count s_int}
{SIMPLE_KEY count s_range_list}
{SIMPLE_KEY adjacent dir_list}
{SIMPLE_KEY is_enemy s_bool}
[/tag]

View file

@ -403,6 +403,7 @@
{SUBST_TYPE coordinates}
{SUBST_TYPE range_list}
{SUBST_TYPE terrain_code}
{SUBST_TYPE dir}
[tag]
name="root"
min=1

View file

@ -1,6 +1,12 @@
# Note that basic.cfg must also be included for these to work!
[type]
name="subst"
# Basically, if there's a non-final $ in it, just give up on trying to validate it
value=".*\$.+"
[/type]
#define SUBST_TYPE BASE
[type]
name=s_{BASE}
@ -9,8 +15,7 @@
link={BASE}
[/type]
[type]
# Basically, if there's a non-final $ in it, just give up on trying to validate it
value=".*\$.+"
link=subst
[/type]
[/union]
[/type]

View file

@ -6,7 +6,7 @@
{SIMPLE_KEY variation string}
{SIMPLE_KEY side s_int}
{SIMPLE_KEY id string}
{SIMPLE_KEY gender gender}
{SIMPLE_KEY gender gender,subst}
{SIMPLE_KEY name t_string}
{DEFAULT_KEY unrenamable s_bool no}
{DEFAULT_KEY canrecruit s_bool no}
@ -41,6 +41,7 @@
{DATA_TAG variables 0 1}
[tag]
name="modifications"
{INSERT_TAG}
[link]
name="units/$modifications/trait"
[/link]
@ -86,7 +87,7 @@
{SIMPLE_KEY x s_coordinate}
{SIMPLE_KEY y s_coordinate}
{SIMPLE_KEY location_id string}
{SIMPLE_KEY facing dir}
{SIMPLE_KEY facing s_dir}
{SIMPLE_KEY goto_x s_int}
{SIMPLE_KEY goto_y s_int}
{SIMPLE_KEY hitpoints s_int}