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:
Anonymissimus 2012-02-14 21:22:15 +00:00
parent 1fb57fd9d9
commit c44e2ea3ad

View file

@ -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)