Skip to content

Commit

Permalink
Update the schema for [terrain_mask]
Browse files Browse the repository at this point in the history
  • Loading branch information
stevecotton committed Feb 28, 2021
1 parent 9e16776 commit 37bf7f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions data/schema/core/actionwml.cfg
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions data/schema/game_config.cfg
Expand Up @@ -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
Expand Down
14 changes: 3 additions & 11 deletions 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
Expand Down Expand Up @@ -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
Expand All @@ -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=
Expand Down

0 comments on commit 37bf7f9

Please sign in to comment.