Activate SSF support in allow_recruit, disallow_recruit and set_recruit.
The default for empty side= is now "all sides".
This commit is contained in:
parent
1fb57fd9d9
commit
c44e2ea3ad
1 changed files with 3 additions and 3 deletions
|
@ -119,7 +119,7 @@ function wml_actions.fire_event(cfg)
|
|||
end
|
||||
|
||||
function wml_actions.allow_recruit(cfg)
|
||||
for index, team in ipairs(wesnoth.get_sides(nil, cfg, true)) do
|
||||
for index, team in ipairs(wesnoth.get_sides(cfg)) do
|
||||
local v = team.recruit
|
||||
for type in string.gmatch(cfg.type, "[^%s,][^,]*") do
|
||||
table.insert(v, type)
|
||||
|
@ -142,7 +142,7 @@ function wml_actions.allow_extra_recruit(cfg)
|
|||
end
|
||||
|
||||
function wml_actions.disallow_recruit(cfg)
|
||||
for index, team in ipairs(wesnoth.get_sides(nil, cfg, true)) do
|
||||
for index, team in ipairs(wesnoth.get_sides(cfg)) do
|
||||
local v = team.recruit
|
||||
for w in string.gmatch(cfg.type, "[^%s,][^,]*") do
|
||||
for i, r in ipairs(v) do
|
||||
|
@ -174,7 +174,7 @@ end
|
|||
|
||||
function wml_actions.set_recruit(cfg)
|
||||
local recruit = cfg.recruit or helper.wml_error("[set_recruit] missing required recruit= attribute")
|
||||
for index, team in ipairs(wesnoth.get_sides(nil, cfg, true)) do
|
||||
for index, team in ipairs(wesnoth.get_sides(cfg)) do
|
||||
local v = {}
|
||||
for w in string.gmatch(recruit, "[^%s,][^,]*") do
|
||||
table.insert(v, w)
|
||||
|
|
Loading…
Add table
Reference in a new issue