From 37bf7f933328b117779bfe87e3044aad25276e6f Mon Sep 17 00:00:00 2001 From: Steve Cotton Date: Sun, 28 Feb 2021 15:47:00 +0100 Subject: [PATCH] Update the schema for [terrain_mask] --- data/schema/core/actionwml.cfg | 1 + data/schema/game_config.cfg | 3 +-- data/test/scenarios/test_terrain_mask.cfg | 14 +++----------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/data/schema/core/actionwml.cfg b/data/schema/core/actionwml.cfg index f87ba8c79a6..ea3187aea24 100644 --- a/data/schema/core/actionwml.cfg +++ b/data/schema/core/actionwml.cfg @@ -201,6 +201,7 @@ {SIMPLE_KEY mask_file string} {SIMPLE_KEY alignment mask_alignment} {DEFAULT_KEY border s_bool no} + {DEFAULT_KEY ignore_special_locations s_bool no} [tag] name="rule" max=infinite diff --git a/data/schema/game_config.cfg b/data/schema/game_config.cfg index 7f8fe0c486e..8e4b5cbb5a1 100644 --- a/data/schema/game_config.cfg +++ b/data/schema/game_config.cfg @@ -90,8 +90,7 @@ [/type] [type] name=mask_alignment - value="even|odd" - # TODO: Document the third option once we finalize its name + value="even|odd|raw" [/type] [type] name=ai_usage diff --git a/data/test/scenarios/test_terrain_mask.cfg b/data/test/scenarios/test_terrain_mask.cfg index 66b8a88b48c..8bc51c380c7 100644 --- a/data/test/scenarios/test_terrain_mask.cfg +++ b/data/test/scenarios/test_terrain_mask.cfg @@ -1,14 +1,4 @@ - -full_mask="_s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s -_s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s -_s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s -_s, _s, _s, _s, _s, _s, _s, Kha, _s, _s, _s, _s, _s, Kha, _s, _s, _s, _s -_s, _s, _s, _s, _s, _s, _s, Cha, _s, _s, _s, _s, _s, Cha, _s, _s, _s, _s -_s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s -_s, _s, _s, foo Chs, _s, Chs, _s, Ch, _s, Ch, _s, Chs, _s, Ch, _s, bar Ch, _s, _s -_s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s -_s, _s, _s, Chs, _s, Chs, _s, Ch, _s, Ch, _s, Chs, _s, Ch, _s, Ch, _s, _s -_s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s, _s" +# wmllint: no translatables #define TERRAIN_MASK_TEST SUFFIX MASK #arg POS @@ -123,6 +113,7 @@ Hh, Hh"#enddef {TERRAIN_MASK_TEST align_raw_on_even {HILLS_SQUARE} (POS=10,1) (ALIGNMENT=raw) (POST_MASK={ASSERT_LOCATION_TERRAIN_SQUARE_2X2 10 1 10 2 11 1 11 2 Hh})} # The deprecated alignment modes work +#ifndef SCHEMA_SHOULD_SKIP_THIS {TERRAIN_MASK_TEST deprecated_border_no {HILLS_SQUARE} (POS=1,1) (POST_MASK= [+terrain_mask] border=no @@ -137,6 +128,7 @@ Hh, Hh"#enddef [/terrain_mask] {ASSERT_LOCATION_TERRAIN_SQUARE_2X2 0 0 0 1 1 0 1 1 Hh} )} +#endif # Terrain rules work {TERRAIN_MASK_TEST rule_basic {HILLS_SQUARE} (POS=7,3) (RULES={TERRAIN_RULE_SIMPLE Kha^Kov Hh Ko}{TERRAIN_RULE_SIMPLE Cha^Kov Hh Co}) (POST_MASK=