diff --git a/data/schema/filters/unit.cfg b/data/schema/filters/unit.cfg index 5c4208d5b7d4..7fcbb17ba0ce 100644 --- a/data/schema/filters/unit.cfg +++ b/data/schema/filters/unit.cfg @@ -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] diff --git a/data/schema/game_config.cfg b/data/schema/game_config.cfg index 04f0bd93bda5..5b0e32959a25 100644 --- a/data/schema/game_config.cfg +++ b/data/schema/game_config.cfg @@ -403,6 +403,7 @@ {SUBST_TYPE coordinates} {SUBST_TYPE range_list} {SUBST_TYPE terrain_code} + {SUBST_TYPE dir} [tag] name="root" min=1 diff --git a/data/schema/types/subst.cfg b/data/schema/types/subst.cfg index 34f2a5f2a738..f2b2d73bfcda 100644 --- a/data/schema/types/subst.cfg +++ b/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} @@ -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] diff --git a/data/schema/units/single.cfg b/data/schema/units/single.cfg index 1c5dd495c014..d95003e8be54 100644 --- a/data/schema/units/single.cfg +++ b/data/schema/units/single.cfg @@ -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}