Charakterbewegungen hinzugefügt, Deko hinzugefügt, Kochrezepte angepasst
This commit is contained in:
parent
95945c0306
commit
a0c893ca0b
1124 changed files with 64294 additions and 763 deletions
41
mods/cozylights/helpers.lua
Normal file
41
mods/cozylights/helpers.lua
Normal file
|
@ -0,0 +1,41 @@
|
|||
function cozylights:dump(o)
|
||||
if type(o) == 'table' then
|
||||
local s = '{ '
|
||||
for k,v in pairs(o) do
|
||||
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||
s = s .. '['..k..'] = ' .. cozylights:dump(v) .. ','
|
||||
end
|
||||
return s .. '} '
|
||||
else
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
|
||||
function cozylights:finalize(table)
|
||||
return setmetatable({}, {
|
||||
__index = table,
|
||||
__newindex = nil
|
||||
})
|
||||
end
|
||||
|
||||
function cozylights:prealloc(table, amount, default_val)
|
||||
for i = 1, amount do
|
||||
table[i] = default_val
|
||||
end
|
||||
end
|
||||
|
||||
function cozylights:mod_loaded(str)
|
||||
if minetest.get_modpath(str) ~= nil then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function cozylights:findIn(value,array)
|
||||
for i=1, #array do
|
||||
if array[i] == value then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue