Aaron Suen c5ebe7f35a Fix stick firestarting.
Wasn't working when wielding more than one stick/staff, due to
implied count check added to fix log-stack-splitting issue.
2019-02-21 14:27:06 -05:00

31 lines
794 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()
minetest.register_node(modname .. ":stick", {
description = "Stick",
drawtype = "nodebox",
node_box = nodecore.fixedbox(-1/16, -0.5, -1/16, 1/16, 0, 1/16),
tiles = {
modname .. "_tree_top.png",
modname .. "_tree_top.png",
modname .. "_tree_side.png"
},
paramtype = "light",
groups = {
firestick = 1,
snappy = 1,
flammable = 2,
falling_repose = 1
}
})
nodecore.register_leaf_drops(function(pos, node, list)
list[#list + 1] = {
name = modname .. ":stick",
prob = 0.2 * (node.param2 * node.param2)}
end)