Skip to content

Commit

Permalink
Schema: Fix a few more cases of keys and tags not accepting variable …
Browse files Browse the repository at this point in the history
…substitution
  • Loading branch information
CelticMinstrel committed Oct 24, 2018
1 parent e83371b commit d080c69
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/schema/filters/unit.cfg
Expand Up @@ -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]
1 change: 1 addition & 0 deletions data/schema/game_config.cfg
Expand Up @@ -403,6 +403,7 @@
{SUBST_TYPE coordinates}
{SUBST_TYPE range_list}
{SUBST_TYPE terrain_code}
{SUBST_TYPE dir}
[tag]
name="root"
min=1
Expand Down
9 changes: 7 additions & 2 deletions data/schema/types/subst.cfg
@@ -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}
Expand All @@ -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]
Expand Down
5 changes: 3 additions & 2 deletions data/schema/units/single.cfg
Expand Up @@ -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}
Expand Down Expand Up @@ -41,6 +41,7 @@
{DATA_TAG variables 0 1}
[tag]
name="modifications"
{INSERT_TAG}
[link]
name="units/$modifications/trait"
[/link]
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit d080c69

Please sign in to comment.