mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-22 19:03:43 +01:00
Table check
This commit is contained in:
parent
60b09a27f7
commit
3f9d7bc12d
4
init.lua
4
init.lua
@ -183,6 +183,10 @@ function craftguide.register_craft(def)
|
|||||||
def.grid = {}
|
def.grid = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not is_table(def.key) then
|
||||||
|
def.key = {}
|
||||||
|
end
|
||||||
|
|
||||||
local cp = copy(def.grid)
|
local cp = copy(def.grid)
|
||||||
sort(cp, function(a, b)
|
sort(cp, function(a, b)
|
||||||
return #a > #b
|
return #a > #b
|
||||||
|
Loading…
Reference in New Issue
Block a user