mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-04 23:33:01 +00:00
Starbeamrainbowlabs
db7b20d485
Also, you can return a value from dofile()!!!! This changes everything.
13 lines
381 B
Lua
13 lines
381 B
Lua
|
|
--- Looks to see whether a given table contains a given value.
|
|
-- @param tbl table The table to look in.
|
|
-- @param target any The target to look for.
|
|
-- @returns bool Whether the table contains the given target or not.
|
|
local function contains(tbl, target)
|
|
for key, value in ipairs(tbl) do
|
|
if value == target then return true end
|
|
end
|
|
return false
|
|
end
|
|
|
|
return table_contains
|