register new node schema recipes when nodes, recipes, or shapes are added, instead of after mods load

This commit is contained in:
flux
2022-09-22 12:55:29 -07:00
parent 7414e274af
commit 6e16c54cc3
4 changed files with 62 additions and 60 deletions

View File

@ -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