Lua: Add location_set.of_raw to ease working with AI functions that return raw location sets

This commit is contained in:
Celtic Minstrel 2021-07-02 02:02:32 -04:00
parent 9c2689ac9e
commit c1304fb441

View File

@ -301,6 +301,10 @@ function location_set.create()
return setmetatable({ values = {} }, locset_meta)
end
function location_set.of_raw(data)
return setmetatable({ values = data }, locset_meta)
end
function location_set.of_pairs(t)
local s = location_set.create()
s:of_pairs(t)