mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-05 07:43:02 +00:00
Starbeamrainbowlabs
db7b20d485
Also, you can return a value from dofile()!!!! This changes everything.
13 lines
367 B
Lua
13 lines
367 B
Lua
--- Creates a table that stores data in keys.
|
|
-- @source https://riptutorial.com/lua/example/13407/search-for-an-item-in-a-list
|
|
-- @param list table The table of values to convert to keys.
|
|
-- @return table The table of (key => true) pairs.
|
|
local function makeset(list)
|
|
local set = {}
|
|
for _, l in ipairs(list) do
|
|
set[l] = true
|
|
end
|
|
return set
|
|
end
|
|
|
|
return makeset
|