nalc/nalc_default/tools.lua
2018-08-27 21:25:56 +02:00

95 lines
2.6 KiB
Lua

minetest.register_tool(
"nalc_default:pick_gold",
{
description = "Golden Pickaxe",
inventory_image = "default_tool_goldpick.png",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level = 3,
groupcaps = {
cracky = {times = {[1] = 2.80, [2] = 1.15, [3] = 0.65}, uses = 15, maxlevel = 3},
crumbly = {times = {[1] = 2.0, [2] = 0.9, [3] = 0.36}, uses = 5, maxlevel = 2},
},
damage_groups = {fleshy = 4},
},
})
minetest.register_tool(
"nalc_default:shovel_gold",
{
description = "Golden Shovel",
inventory_image = "default_tool_goldshovel.png",
wield_image = "default_tool_goldshovel.png^[transformR90",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level = 1,
groupcaps = {
crumbly = {times = {[1] = 1.40, [2] = 0.60, [3] = 0.35}, uses = 15, maxlevel = 3},
},
damage_groups = {fleshy = 4},
},
})
minetest.register_tool(
"nalc_default:axe_gold",
{
description = "Golden Axe",
inventory_image = "default_tool_goldaxe.png",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level = 1,
groupcaps = {
choppy = {times = {[1] = 3.08, [2] = 1.27, [3] = 0.72}, uses = 15, maxlevel = 3},
snappy = {times = {[3] = 0.125}, uses = 0, maxlevel = 1},
},
damage_groups = {fleshy = 4},
},
})
minetest.register_tool(
"nalc_default:sword_gold",
{
description = "Golden Sword",
inventory_image = "default_tool_goldsword.png",
tool_capabilities = {
full_punch_interval = 0.8,
max_drop_level = 1,
groupcaps = {
snappy = {times = {[1] = 1.9, [2] = 0.85, [3] = 0.125}, uses = 10, maxlevel = 3},
},
damage_groups = {fleshy = 5},
}
})
-- Toolranks
if minetest.get_modpath("toolranks") then
minetest.override_item(
"nalc_default:pick_gold",
{
original_description = "Golden Pickaxe",
description = toolranks.create_description("Golden Pickaxe", 0, 1),
after_use = toolranks.new_afteruse
})
minetest.override_item(
"nalc_default:axe_gold",
{
original_description = "Golden Axe",
description = toolranks.create_description("Golden Axe", 0, 1),
after_use = toolranks.new_afteruse
})
minetest.override_item(
"nalc_default:shovel_gold",
{
original_description = "Golden Shovel",
description = toolranks.create_description("Golden Shovel", 0, 1),
after_use = toolranks.new_afteruse
})
end
-- Aliases
minetest.register_alias("default:pick_gold", "nalc_default:pick_gold")
minetest.register_alias("default:shovel_gold", "nalc_default:shovel_gold")
minetest.register_alias("default:axe_gold", "nalc_default:axe_gold")
minetest.register_alias("default:sword_gold", "nalc_default:sword_gold")