Give error on missing role= in [role] without [auto_recall]

This commit is contained in:
Celtic Minstrel 2016-08-31 20:14:56 -04:00
parent 3ff03cc66b
commit 3f7db7f878

View file

@ -900,9 +900,17 @@ end
function wml_actions.role(cfg)
-- role= and type= are handled differently than in other tags,
-- so we need to remove them from the filter
local role = cfg.role or ""
local role = cfg.role
local filter = helper.shallow_literal(cfg)
if role == nil then
if helper.get_child("auto_recall") ~= nil then
role = ""
else
helper.wml_error("missing role= in [role]")
end
end
local types = {}
if cfg.type then