Table check

This commit is contained in:
Jean-Patrick Guerrero 2019-09-25 12:44:49 +02:00
parent 60b09a27f7
commit 3f9d7bc12d
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ function craftguide.register_craft(def)
def.grid = {}
end
if not is_table(def.key) then
def.key = {}
end
local cp = copy(def.grid)
sort(cp, function(a, b)
return #a > #b