Aaron Suen f893f613c3 API refinements.
- Make node match operate on only one of node or stack, depending
  on whether node defers to stack via is_stack_only.  This should
  hopefully prevent future pummel recipe issues.
- Add new core stack API.  Needs to be deployed in a lot of places.
- Start work on system for allowing flammable containers; they
  eject their potentially non-flammable contents.
2019-02-23 09:44:22 -05:00

37 lines
887 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()
minetest.register_craftitem(modname .. ":chip", {
description = "Stone Chip",
inventory_image = modname .. "_stone.png"
})
nodecore.register_craft({
label = "break cobble to chips",
action = "pummel",
nodes = {
{match = "nc_terrain:cobble_loose", replace = "air"}
},
items = {
{name = modname .. ":chip", count = 8, scatter = 5}
},
toolgroups = {cracky = 2},
itemscatter = 5
})
nodecore.register_craft({
label = "repack chips to cobble",
action = "pummel",
nodes = {
{
match = {name = modname .. ":chip", count = 8},
replace = "nc_terrain:cobble_loose"
}
},
toolgroups = {thumpy = 2}
})