Update all units of type and side after selection with is_game_override
This commit is contained in:
parent
0c0f9ba997
commit
27e5dd50d2
1 changed files with 3 additions and 0 deletions
|
@ -142,6 +142,9 @@ function pickadvance.pick_advance(unit)
|
|||
if dialog_result.is_game_override then
|
||||
local key = "pickadvance_side" .. unit.side .. "_" .. orig_options_sanitized
|
||||
wml.variables[key] = table.concat(dialog_result.game_override, ",")
|
||||
for _, u in ipairs(wesnoth.units.find_on_map{side=unit.side, type=unit.type}) do
|
||||
set_advances(u, dialog_result.unit_override)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue