nalc/nalc_default/tools.lua

95 lines
2.5 KiB
Lua
Raw Normal View History

2018-08-27 21:25:56 +02:00
minetest.register_tool(
2018-12-12 00:19:32 +01:00
":nalc:pick_gold",
2018-08-27 21:25:56 +02:00
{
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(
2018-12-12 00:19:32 +01:00
":nalc:shovel_gold",
2018-08-27 21:25:56 +02:00
{
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(
2018-12-12 00:19:32 +01:00
":nalc:axe_gold",
2018-08-27 21:25:56 +02:00
{
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(
2018-12-12 00:19:32 +01:00
":nalc:sword_gold",
2018-08-27 21:25:56 +02:00
{
description = "Golden Sword",
inventory_image = "default_tool_goldsword.png",
tool_capabilities = {
2018-12-12 00:19:32 +01:00
full_punch_interval = 1,
2018-08-27 21:25:56 +02:00
max_drop_level = 1,
groupcaps = {
2018-12-12 00:19:32 +01:00
snappy = {times = {[1] = 1.9, [2] = 0.85, [3] = 0.125}, uses = 20, maxlevel = 3},
2018-08-27 21:25:56 +02:00
},
2018-12-12 00:19:32 +01:00
damage_groups = {fleshy = 7},
2018-08-27 21:25:56 +02:00
}
})
-- Toolranks
if minetest.get_modpath("toolranks") then
minetest.override_item(
2018-12-12 00:19:32 +01:00
"nalc:pick_gold",
2018-08-27 21:25:56 +02:00
{
original_description = "Golden Pickaxe",
description = toolranks.create_description("Golden Pickaxe", 0, 1),
after_use = toolranks.new_afteruse
})
minetest.override_item(
2018-12-12 00:19:32 +01:00
"nalc:axe_gold",
2018-08-27 21:25:56 +02:00
{
original_description = "Golden Axe",
description = toolranks.create_description("Golden Axe", 0, 1),
after_use = toolranks.new_afteruse
})
minetest.override_item(
2018-12-12 00:19:32 +01:00
"nalc:shovel_gold",
2018-08-27 21:25:56 +02:00
{
original_description = "Golden Shovel",
description = toolranks.create_description("Golden Shovel", 0, 1),
after_use = toolranks.new_afteruse
})
end
-- Aliases
2018-12-12 00:19:32 +01:00
minetest.register_alias("default:pick_gold", "nalc:pick_gold")
minetest.register_alias("default:shovel_gold", "nalc:shovel_gold")
minetest.register_alias("default:axe_gold", "nalc:axe_gold")
minetest.register_alias("default:sword_gold", "nalc:sword_gold")