Reject [terrain] with unknown terrain type
This commit is contained in:
parent
e262954c13
commit
9e08a78bf5
1 changed files with 3 additions and 0 deletions
|
@ -463,6 +463,9 @@ end
|
|||
function wml_actions.terrain(cfg)
|
||||
local terrain = cfg.terrain or wml.error("[terrain] missing required terrain= attribute")
|
||||
local layer = cfg.layer or 'both'
|
||||
if not (wesnoth.terrain_types[terrain] or (layer == "overlay" and terrain == "^")) then
|
||||
wml.error("[terrain] invalid terrain="..terrain)
|
||||
end
|
||||
if layer ~= 'both' and layer ~= 'overlay' and layer ~= 'base' then
|
||||
wml.error('[terrain] invalid layer=')
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue