nodecore-cd2025/mods/nc_api/util_node_is.lua
Aaron Suen bd0f201469 Allow excess items in recipe stacks (by default), eject excess.
This makes it a little easier to discover recipes, since you now
generally don't have to get the exact count right anymore; just
make sure you at least have enough.
2019-03-12 21:52:00 -04:00

14 lines
455 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
function nodecore.buildable_to(thing)
if not thing.name then
thing = nodecore.underride(thing, minetest.get_node(thing))
end
if thing.name == "ignore" then return end
local def = minetest.registered_items[thing.name] or {}
return def.buildable_to
end