validate [screen_fade] required parameters
This commit is contained in:
parent
124cf1ccf0
commit
dbbee82d9c
1 changed files with 2 additions and 2 deletions
|
@ -728,8 +728,8 @@ function wml_actions.color_adjust(cfg)
|
|||
end
|
||||
|
||||
function wml_actions.screen_fade(cfg)
|
||||
local color = {cfg.red or 0, cfg.green or 0, cfg.blue or 0, cfg.alpha}
|
||||
wesnoth.interface.screen_fade(color, cfg.duration)
|
||||
local color = {cfg.red or 0, cfg.green or 0, cfg.blue or 0, tonumber(cfg.alpha) or wml.error("invalid alpha in [screen_fade]")}
|
||||
wesnoth.interface.screen_fade(color, tonumber(cfg.duration) or wml.error("invalid duration in [screen_fade]"))
|
||||
end
|
||||
|
||||
function wml_actions.end_turn(cfg)
|
||||
|
|
Loading…
Add table
Reference in a new issue