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
28
mods/futil/util/equals.lua
Normal file
28
mods/futil/util/equals.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
local table_size = futil.table.size
|
||||
|
||||
local function equals(a, b)
|
||||
local t = type(a)
|
||||
|
||||
if t ~= type(b) then
|
||||
return false
|
||||
end
|
||||
|
||||
if t ~= "table" then
|
||||
return a == b
|
||||
elseif a == b then
|
||||
return true
|
||||
end
|
||||
|
||||
local size_a = 0
|
||||
|
||||
for key, value in pairs(a) do
|
||||
if not equals(value, b[key]) then
|
||||
return false
|
||||
end
|
||||
size_a = size_a + 1
|
||||
end
|
||||
|
||||
return size_a == table_size(b)
|
||||
end
|
||||
|
||||
futil.equals = equals
|
Loading…
Add table
Add a link
Reference in a new issue