blockgame/mods/bg_api/utils_table.lua
trans_soup 91807870fe miscellaneous refactors & fixes.
move several functions into the api.

fix root growth directions.

clean up root and grass growth code.
2023-10-12 11:09:40 +02:00

17 lines
296 B
Lua

function blockgame.get_keys (tab)
local keyset = {}
local n = 0
for key, value in pairs(tab) do
n = n + 1
keyset[n] = key
end
return keyset
end
function blockgame.shallow_copy_table (tab)
local result = {}
for key, value in pairs(tab) do
result[key] = value
end
return result
end