mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 15:01:42 +00:00
Lua API: Use the new location_set complement in the place_shroud deprecation wrapper
This commit is contained in:
parent
300b4492b8
commit
44da16d66a
@ -50,14 +50,8 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
|
||||
wesnoth.sides.override_shroud(side, {})
|
||||
else
|
||||
local ls = wesnoth.require "location_set"
|
||||
local clear = ls.of_shroud_data(shroud)
|
||||
shroud = ls.create()
|
||||
for x,y in wesnoth.current.map:iter() do
|
||||
if not clear(x,y) then
|
||||
shroud:insert(x,y)
|
||||
end
|
||||
end
|
||||
wesnoth.sides.place_shroud(side, shroud:to_pairs())
|
||||
shroud = ls.of_shroud_data(shroud)
|
||||
wesnoth.sides.place_shroud(side, (~shroud):to_pairs())
|
||||
end
|
||||
else
|
||||
wesnoth.sides.place_shroud(side, shroud)
|
||||
|
Loading…
x
Reference in New Issue
Block a user