Register capabilities for tool heads

This allows tool heads to be used in crafting,
esp. presscraft.  Note that certain tiers do not
have tool heads, like stone and infused.
This commit is contained in:
Aaron Suen 2020-09-29 21:10:26 -04:00
parent e776723a3f
commit ed2cfc18a1
2 changed files with 13 additions and 1 deletions

View File

@ -20,7 +20,16 @@ local function toolhead(name, groups, prills)
description = "## Lode " .. name .. " Head",
inventory_image = modname .. "_#.png^[mask:" ..
modname .. "_toolhead_" .. n .. ".png",
stack_max = 1
stack_max = 1,
tool_head_capabilities = toolcap(4),
bytemper = function(t, d)
if t.name == "tempered" then
d.tool_head_capabilities = toolcap(5)
else if t.name == "hot" then
d.tool_head_capabilities = toolcap(3)
end
end
end
})
nodecore.register_lode("tool_" .. n, {

View File

@ -18,6 +18,9 @@ local function toolhead(name, from, group, sticks)
choppy = 1,
flammable = 2
},
tool_head_capabilities = nodecore.toolcaps({
[group] = 2
}),
sounds = nodecore.sounds("nc_tree_woody")
})
local m = modname .. ":tool_" .. name:lower()