Give error on missing role= in [role] without [auto_recall]
This commit is contained in:
parent
3ff03cc66b
commit
3f7db7f878
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue