Aaron Suen df19716624 Make everything diggable by hand.
This should keep players from being able to trap
themselves permanently by burying or sealing
themselves inside a room with no tools, in theory.

Adjust silk touch logic to prevent presence of dig times
by hand from tripping it.

This may affect game balance of things like not being
able to punch trees in the early game, but since dig
times by hand are so very long, hopefully the effect
will be small.

Item drops are left as-is for now; it just takes a LOT
of patience to dig something without the right tool.
2019-12-29 11:51:25 -05:00

28 lines
735 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local math, minetest, nodecore, pairs
= math, minetest, nodecore, pairs
local math_pow
= math.pow
-- LUALOCALS > ---------------------------------------------------------
local toolcaps = nodecore.toolcaps({
uses = 0,
crumbly = 1,
snappy = 1,
thumpy = 1
})
local gcaps = toolcaps.groupcaps
for k, v in pairs(nodecore.tool_basetimes) do
gcaps[k] = gcaps[k] or {uses = 0, times = {}}
for n = 1, 100 do
gcaps[k].times[n] = gcaps[k].times[n] or (10 * v * math_pow(2, n))
end
end
minetest.register_item(":", {
["type"] = "none",
wield_image = "nc_player_hand.png",
wield_scale = {x = 4, y = 8, z = 3},
tool_capabilities = toolcaps
})