mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-24 10:32:56 +00:00
Lua: Add location_set.of_raw to ease working with AI functions that return raw location sets
This commit is contained in:
parent
9c2689ac9e
commit
c1304fb441
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user