From 44da16d66a3a5417572f66176096e6a80195c68c Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 27 Jul 2021 23:52:13 -0400 Subject: [PATCH] Lua API: Use the new location_set complement in the place_shroud deprecation wrapper --- data/lua/core/sides.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/data/lua/core/sides.lua b/data/lua/core/sides.lua index 91e0ef8ff2e..9ff3fa065d7 100644 --- a/data/lua/core/sides.lua +++ b/data/lua/core/sides.lua @@ -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)