[Lua] Mark location_set.values as private

This commit is contained in:
Celtic Minstrel 2024-02-04 15:31:43 -05:00 committed by Celtic Minstrel
parent b6da8a705f
commit dd24051c17
2 changed files with 3 additions and 4 deletions

View file

@ -602,11 +602,10 @@ ai_helper.split = wesnoth.deprecate_api('ai_helper.split', 'stringx.split', 3, '
---@return integer
---@return integer
function ai_helper.get_LS_xy(index)
local tmp_set = LS.create()
tmp_set.values[index] = 1
local tmp_set = LS.of_raw{[index] = true}
local xy = tmp_set:to_pairs()[1]
return xy[1], xy[2]
return xy.x, xy.y
end
--------- Location, position or hex related helper functions ----------

View file

@ -16,7 +16,7 @@ end
---A set of locations, with an optional associated value for each one.
---@class location_set : { [location]: any }
---@field values table<integer, any>
---@field private values table<integer, any>
---@operator bnot:location_set
---@operator band:location_set
---@operator bor:location_set