Skip to content

Commit

Permalink
Fix misleading function name in [endlevel] definition
Browse files Browse the repository at this point in the history
The name gave the impression that it returns an integer,
which is not guaranteed.
  • Loading branch information
CelticMinstrel committed Oct 24, 2018
1 parent b2a6f9d commit 96f1547
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/lua/wml/endlevel.lua
Expand Up @@ -35,7 +35,7 @@ function wesnoth.wml_actions.endlevel(cfg)
local there_is_a_human_defeat = false
local there_is_a_local_human_victory = false
local there_is_a_local_human_defeat = false
local bool_int = function(b)
local bool_num = function(b)
if b == true then
return 1
elseif b == false then
Expand Down Expand Up @@ -66,9 +66,9 @@ function wesnoth.wml_actions.endlevel(cfg)
end
end
if side_result.bonus ~= nil then
v.carryover_bonus = bool_int(side_result.bonus)
v.carryover_bonus = bool_num(side_result.bonus)
elseif cfg.bonus ~= nil then
v.carryover_bonus = bool_int(cfg.bonus)
v.carryover_bonus = bool_num(cfg.bonus)
end
if side_result.carryover_add ~= nil then
v.carryover_add = side_result.carryover_add
Expand Down

0 comments on commit 96f1547

Please sign in to comment.