Fix WFL in [random_placement] not receiving the size variable
This commit is contained in:
parent
d0283e8a38
commit
9d8d57b16d
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ wesnoth.wml_actions.random_placement = function(cfg)
|
||||||
if type(num_items) == "string" then
|
if type(num_items) == "string" then
|
||||||
if num_items:match('^%s%(.*%)%s$') then
|
if num_items:match('^%s%(.*%)%s$') then
|
||||||
local params = {size = #locs}
|
local params = {size = #locs}
|
||||||
local result = wesnoth.eval_formula(num_items)
|
local result = wesnoth.eval_formula(num_items, params)
|
||||||
num_items = math.floor(tonumber(result))
|
num_items = math.floor(tonumber(result))
|
||||||
elseif num_items:match('^%d+%%$') then
|
elseif num_items:match('^%d+%%$') then
|
||||||
num_items = tonumber(num_items:sub(1,-2))
|
num_items = tonumber(num_items:sub(1,-2))
|
||||||
|
|
Loading…
Add table
Reference in a new issue