mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 11:35:12 +00:00
don't use __shallow_literal directly
the passed config might not be a vconfig.
This commit is contained in:
parent
1eefcddc17
commit
4c955e7461
@ -933,7 +933,7 @@ end
|
||||
function wml_actions.harm_unit(cfg)
|
||||
local filter = helper.get_child(cfg, "filter") or helper.wml_error("[harm_unit] missing required [filter] tag")
|
||||
-- we need to use shallow_literal field, to avoid raising an error if $this_unit (not yet assigned) is used
|
||||
if not cfg.__shallow_literal.amount then helper.wml_error("[harm_unit] has missing required amount= attribute") end
|
||||
if not helper.shallow_literal(cfg).amount then helper.wml_error("[harm_unit] has missing required amount= attribute") end
|
||||
local variable = cfg.variable -- kept out of the way to avoid problems
|
||||
local _ = wesnoth.textdomain "wesnoth"
|
||||
-- #textdomain wesnoth
|
||||
|
Loading…
x
Reference in New Issue
Block a user