mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-10 20:10:28 +02:00
register new node schema recipes when nodes, recipes, or shapes are added, instead of after mods load
This commit is contained in:
@ -7,7 +7,7 @@ stairsplus.util = {
|
||||
end,
|
||||
|
||||
table_is_empty = function(t)
|
||||
return not next(t)
|
||||
return next(t) == nil
|
||||
end,
|
||||
|
||||
table_sort_keys = function(t, sort_function)
|
||||
@ -54,21 +54,6 @@ stairsplus.util = {
|
||||
return true
|
||||
end,
|
||||
|
||||
check_call = function(func)
|
||||
-- wrap a function w/ logic to avoid crashing the game
|
||||
local f = function(...)
|
||||
local status, out = pcall(func, ...)
|
||||
if status then
|
||||
return out
|
||||
else
|
||||
local message = ("Error (func): %s %s"):format(out, dump({...}))
|
||||
stairsplus.log("error", message)
|
||||
error(message)
|
||||
end
|
||||
end
|
||||
return f
|
||||
end,
|
||||
|
||||
get_location_string = function(inv)
|
||||
local location = inv:get_location()
|
||||
if location.type == "node" then
|
||||
|
Reference in New Issue
Block a user