Schema: Make turns validation more generic

This means other things can now easily accept the special keyword "unlimited".
This commit is contained in:
Celtic Minstrel 2021-06-18 13:53:34 -04:00
parent ecc34f0197
commit d39e6b3f42
4 changed files with 5 additions and 12 deletions

View file

@ -306,7 +306,7 @@
name="modify_turns"
max=infinite
{INSERT_TAG}
{SIMPLE_KEY value s_unsigned,turns}
{SIMPLE_KEY value s_unsigned,unlimited}
{SIMPLE_KEY add s_int}
{SIMPLE_KEY current s_unsigned}
[/tag]

View file

@ -297,7 +297,7 @@
{SIMPLE_KEY next_scenario string}
{SIMPLE_KEY map_data map_data}
{SIMPLE_KEY map_file string}
{DEFAULT_KEY turns turns unlimited}
{DEFAULT_KEY turns unsigned,unlimited unlimited}
{DEFAULT_KEY turn_at int 1}
{DEFAULT_KEY random_start_time bool,int_list no}
{DEPRECATED_KEY music string}

View file

@ -369,15 +369,8 @@
[/list]
[/type]
[type]
name="turns"
[union]
[type]
link=unsigned
[/type]
[type]
value="-1|unlimited"
[/type]
[/union]
name="unlimited"
value="-1|unlimited"
[/type]
{SUBST_TYPE coordinate}
{SUBST_TYPE coordinates}

View file

@ -51,7 +51,7 @@ Hh, Gg, Gg, Gg, Gg, Gg^Efm, Gg, Wwf, Ww, Ww, Wo, Wo, Wo, Ww, Wwf, Wwf, Gg, Gg, G
Gs^Fp, Hh, Mm, Hh^Fds, Gs^Fp, Hh, Wwf, Wwf, Ww, Wo, Wo, Wo, Wo, Ww, Wwf, Mm, Hh^Fms, Hh, Rr, Rr, Hh^Fds, Mm, Hh^Fds, Gg^Fms, Gg^Fet, Mm, Tb^Tf, Gg^Fms, Wwf, Wwf, Ww, Ww, Ww, Ww, Ww, Wwf, Wwf, Wwf, Wwf, Gg, Gg^Fms, Mm, Mm, Mm, Tb^Tf, Rr, Tb^Tf, Gg^Efm, Gg^Fet
"
random_start_time=no
turns=-1
turns=unlimited
victory_when_enemies_defeated=yes
[time]
blue=0