Parse [terrain] config. This fixes bug #23236

This commit is contained in:
Charles Dang 2015-02-03 11:03:37 +11:00
parent dfcc26aae6
commit 84a7f3fb31

View file

@ -846,7 +846,7 @@ end
function wml_actions.terrain(cfg)
local terrain = cfg.terrain or helper.wml_error("[terrain] missing required terrain= attribute")
cfg = helper.shallow_literal(cfg)
cfg = helper.parsed(cfg)
cfg.terrain = nil
for i, loc in ipairs(wesnoth.get_locations(cfg)) do
wesnoth.set_terrain(loc[1], loc[2], terrain, cfg.layer, cfg.replace_if_failed)