Used helper.shallow_literal instead of cfg.__shallow_literal

This commit is contained in:
Elvish_Hunter 2016-04-13 15:46:20 +02:00
parent d6747f5098
commit d6308cc6f7

View file

@ -1793,9 +1793,9 @@ function wml_actions.set_variable(cfg)
local var = wesnoth.get_variable(name)
if cfg.value ~= nil then -- check for nil because user may try to set a variable as false
wesnoth.set_variable(name, cfg.__shallow_parsed.value)
wesnoth.set_variable(name, cfg.value)
elseif cfg.literal ~= nil then
wesnoth.set_variable(name, cfg.__shallow_literal.literal)
wesnoth.set_variable(name, helper.shallow_literal(cfg).literal)
elseif cfg.to_variable then
wesnoth.set_variable(name, wesnoth.get_variable(cfg.to_variable))
elseif cfg.add then