2017-05-17 17:57:14 +02:00
|
|
|
|
2015-09-01 17:15:24 +02:00
|
|
|
--
|
2017-05-17 17:57:14 +02:00
|
|
|
-- Tool definitions
|
2015-09-01 17:15:24 +02:00
|
|
|
--
|
|
|
|
|
2019-08-28 17:31:41 +02:00
|
|
|
local S = minetest.get_translator("default")
|
|
|
|
|
2019-08-31 00:29:35 +02:00
|
|
|
local creative_digtime = 0
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-19 23:04:11 +02:00
|
|
|
local tool_levels = nil
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2019-09-24 01:28:01 +02:00
|
|
|
local creative_digtable = {
|
|
|
|
crumbly = {
|
|
|
|
[3] = creative_digtime,
|
|
|
|
[2] = creative_digtime,
|
|
|
|
[1] = creative_digtime,
|
|
|
|
},
|
|
|
|
choppy = {
|
|
|
|
[3] = creative_digtime,
|
|
|
|
[2] = creative_digtime,
|
|
|
|
[1] = creative_digtime,
|
|
|
|
},
|
|
|
|
cracky = {
|
|
|
|
[3] = creative_digtime,
|
|
|
|
[2] = creative_digtime,
|
|
|
|
[1] = creative_digtime,
|
|
|
|
},
|
|
|
|
snappy = {
|
|
|
|
[3] = creative_digtime,
|
|
|
|
[2] = creative_digtime,
|
|
|
|
[1] = creative_digtime,
|
|
|
|
},
|
|
|
|
dig_immediate = {
|
|
|
|
[3] = 0,
|
|
|
|
[2] = math.min(creative_digtime, 0.5),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-09-01 17:15:24 +02:00
|
|
|
-- Creative mode/hand defs
|
2017-06-27 21:13:30 +02:00
|
|
|
if minetest.settings:get_bool("creative_mode") == true then
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_levels = {
|
2019-09-24 01:28:01 +02:00
|
|
|
wood = creative_digtable,
|
|
|
|
stone = creative_digtable,
|
|
|
|
wrought_iron = creative_digtable,
|
|
|
|
steel = creative_digtable,
|
|
|
|
carbon_steel = creative_digtable,
|
|
|
|
bronze = creative_digtable,
|
2015-09-01 17:15:24 +02:00
|
|
|
}
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_item(
|
2015-09-01 17:15:24 +02:00
|
|
|
":",
|
|
|
|
{
|
|
|
|
type = "none",
|
|
|
|
wield_image = "wieldhand.png",
|
2017-05-11 03:23:21 +02:00
|
|
|
wield_scale = {x=1.0,y=1.0,z=2.0},
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level = 0,
|
|
|
|
groupcaps = {
|
|
|
|
fleshy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
crumbly = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
choppy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
cracky = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
snappy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
2019-09-24 02:34:19 +02:00
|
|
|
handy = {times={[1]=creative_digtime,[2]=creative_digtime,[3]=creative_digtime}, uses=0, maxlevel=1},
|
2015-09-01 17:15:24 +02:00
|
|
|
oddly_breakable_by_hand = {times={[1]=creative_digtime,[2]=creative_digtime,[3]=creative_digtime}, uses=0, maxlevel=3},
|
2019-09-24 01:28:01 +02:00
|
|
|
dig_immediate = {times={[2]=math.min(creative_digtime, 0.5), [3]=0}, uses=0, maxlevel=1},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 1}
|
2019-09-10 14:28:43 +02:00
|
|
|
},
|
|
|
|
range = 20,
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
else
|
|
|
|
tool_levels = {
|
|
|
|
wood = {
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly = {
|
|
|
|
[3] = 1.6,
|
|
|
|
[2] = 2.0,
|
|
|
|
},
|
|
|
|
choppy = {
|
|
|
|
[3] = 2.6,
|
|
|
|
[2] = 3.0,
|
|
|
|
},
|
|
|
|
cracky = {
|
|
|
|
[3] = 3.8,
|
|
|
|
[2] = 4.2,
|
|
|
|
},
|
|
|
|
snappy = {
|
|
|
|
[3] = 0.5,
|
|
|
|
[2] = 1.0,
|
|
|
|
},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
stone = {
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly = {
|
|
|
|
[3] = 1.3,
|
|
|
|
[2] = 1.7,
|
|
|
|
},
|
|
|
|
choppy = {
|
|
|
|
[3] = 2.3,
|
|
|
|
[2] = 2.7,
|
|
|
|
},
|
|
|
|
cracky = {
|
|
|
|
[3] = 3.3,
|
|
|
|
[2] = 3.7,
|
|
|
|
},
|
|
|
|
snappy = {
|
|
|
|
[3] = 0.4,
|
|
|
|
[2] = 0.9,
|
|
|
|
},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-17 17:57:14 +02:00
|
|
|
wrought_iron = {
|
|
|
|
crumbly = {
|
|
|
|
[3] = 1.0,
|
|
|
|
[2] = 1.4,
|
|
|
|
},
|
|
|
|
choppy = {
|
|
|
|
[3] = 2.0,
|
|
|
|
[2] = 2.4,
|
|
|
|
},
|
|
|
|
cracky = {
|
|
|
|
[3] = 2.8,
|
|
|
|
[2] = 3.2,
|
|
|
|
},
|
|
|
|
snappy = {
|
|
|
|
[3] = 0.3,
|
|
|
|
[2] = 0.8,
|
|
|
|
},
|
|
|
|
},
|
2015-09-01 17:15:24 +02:00
|
|
|
steel = {
|
2017-05-17 17:57:14 +02:00
|
|
|
crumbly = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 0.9,
|
|
|
|
[2] = 1.2,
|
2017-05-17 17:57:14 +02:00
|
|
|
[1] = 3.5,
|
|
|
|
},
|
|
|
|
choppy = {
|
|
|
|
[3] = 1.7,
|
|
|
|
[2] = 2.1,
|
2017-05-18 00:11:24 +02:00
|
|
|
[1] = 3.2,
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
|
|
|
cracky = {
|
|
|
|
[3] = 2.3,
|
|
|
|
[2] = 2.7,
|
|
|
|
[1] = 3.8,
|
|
|
|
},
|
|
|
|
snappy = {
|
|
|
|
[3] = 0.2,
|
|
|
|
[2] = 0.7,
|
|
|
|
[1] = 1.2,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
carbon_steel = {
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 0.6,
|
|
|
|
[2] = 1.0,
|
|
|
|
[1] = 2.7,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
choppy = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 1.2,
|
|
|
|
[2] = 1.8,
|
|
|
|
[1] = 2.6,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
cracky = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 1.8,
|
|
|
|
[2] = 2.3,
|
|
|
|
[1] = 3.3,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
snappy = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 0.2,
|
|
|
|
[2] = 0.5,
|
|
|
|
[1] = 1.0,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
},
|
2017-05-17 17:57:14 +02:00
|
|
|
bronze = {
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 0.3,
|
|
|
|
[2] = 0.7,
|
|
|
|
[1] = 2.3,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
choppy = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 0.6,
|
|
|
|
[2] = 1.1,
|
|
|
|
[1] = 1.8,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
cracky = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 1.4,
|
|
|
|
[2] = 1.9,
|
|
|
|
[1] = 2.7,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
|
|
|
snappy = {
|
2017-05-18 00:11:24 +02:00
|
|
|
[3] = 0.1,
|
|
|
|
[2] = 0.3,
|
|
|
|
[1] = 0.7,
|
2017-05-11 03:23:21 +02:00
|
|
|
},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_item(
|
2015-09-01 17:15:24 +02:00
|
|
|
":",
|
|
|
|
{
|
|
|
|
type = "none",
|
|
|
|
wield_image = "wieldhand.png",
|
2017-05-11 03:23:21 +02:00
|
|
|
wield_scale = {x=1.0,y=1.0,z=2.0},
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level = 0,
|
|
|
|
groupcaps = {
|
2019-09-24 02:34:19 +02:00
|
|
|
fleshy = {times={[2]=1.6, [3]=1.0}, uses=0, maxlevel=1},
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly = {times={[2]=3.2, [3]=2.1}, uses=0, maxlevel=1},
|
|
|
|
choppy = {times={[2]=3.5, [3]=3.8}, uses=0, maxlevel=1},
|
2019-09-17 01:31:43 +02:00
|
|
|
cracky = {times={[3]=8.5}, uses=0, maxlevel=1},
|
2017-05-11 03:23:21 +02:00
|
|
|
snappy = {times={[1]=2.5, [2]=2.0, [3]=1.5}, uses=0, maxlevel=1},
|
2019-09-24 02:34:19 +02:00
|
|
|
handy = {times={[1]=1.0,[2]=0.5,[3]=0.25}, uses=0, maxlevel=1},
|
2019-09-26 18:44:18 +02:00
|
|
|
oddly_breakable_by_hand = {times={[1]=7.0,[2]=5.5,[3]=4.0}, uses=0, maxlevel=1},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 1}
|
2019-09-10 14:28:43 +02:00
|
|
|
},
|
|
|
|
range = 4,
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
end
|
|
|
|
|
2016-02-02 22:26:04 +01:00
|
|
|
-- "Creative" Tool
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2016-02-02 22:26:04 +01:00
|
|
|
"default:creative_tool",
|
|
|
|
{
|
2019-08-28 17:46:43 +02:00
|
|
|
description = S("Creative Tool"),
|
2016-02-02 22:26:04 +01:00
|
|
|
inventory_image = "default_creative_tool.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 0.5,
|
|
|
|
max_drop_level = 0,
|
|
|
|
groupcaps = {
|
|
|
|
fleshy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
crumbly = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
choppy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
cracky = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
|
|
|
snappy = {times={[1]=creative_digtime, [2]=creative_digtime, [3]=creative_digtime}, uses=0, maxlevel=1},
|
2019-09-24 02:34:19 +02:00
|
|
|
handy = {times={[1]=creative_digtime,[2]=creative_digtime,[3]=creative_digtime}, uses=0, maxlevel=1},
|
2016-02-02 22:26:04 +01:00
|
|
|
oddly_breakable_by_hand = {times={[1]=creative_digtime,[2]=creative_digtime,[3]=creative_digtime}, uses=0, maxlevel=3},
|
2019-09-24 01:28:01 +02:00
|
|
|
dig_immediate = {times={[2]=math.min(creative_digtime, 0.5), [3]=0}, uses=0, maxlevel=1},
|
2016-02-02 22:26:04 +01:00
|
|
|
},
|
2019-09-10 14:28:43 +02:00
|
|
|
range = 20,
|
2016-02-02 22:26:04 +01:00
|
|
|
damage_groups = {fleshy = 1}
|
2019-09-14 09:52:07 +02:00
|
|
|
},
|
|
|
|
groups = { no_item_drop = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2016-02-02 22:26:04 +01:00
|
|
|
|
2015-09-01 17:15:24 +02:00
|
|
|
-- Pickaxes
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:pick_wood",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wooden Pickaxe"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_pick_wood.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-11 03:23:21 +02:00
|
|
|
cracky={times=tool_levels.wood.cracky, uses=10, maxlevel=1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 2}
|
|
|
|
},
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { pickaxe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:pick_stone",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Stone Pickaxe"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_pick_stone.png",
|
|
|
|
tool_capabilities = {
|
2017-05-17 17:57:14 +02:00
|
|
|
max_drop_level = 0,
|
|
|
|
groupcaps = {
|
|
|
|
cracky = {times = tool_levels.stone.cracky, uses = 20, maxlevel = 1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 3}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { pickaxe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:pick_wrought_iron",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wrought Iron Pickaxe"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_pick_wrought_iron.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
cracky={times=tool_levels.wrought_iron.cracky, uses=15, maxlevel=2}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 4}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { pickaxe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:pick_steel",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Steel Pickaxe"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_pick_steel.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
cracky={times=tool_levels.steel.cracky, uses=30, maxlevel=2}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 5}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { pickaxe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2017-05-17 17:57:14 +02:00
|
|
|
"default:pick_carbon_steel",
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Carbon Steel Pickaxe"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_pick_carbon_steel.png",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
cracky={times=tool_levels.carbon_steel.cracky, uses=40, maxlevel=2}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 5}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { pickaxe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:pick_bronze",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Bronze Pickaxe"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_pick_bronze.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
cracky={times=tool_levels.bronze.cracky, uses=30, maxlevel=2}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 5}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { pickaxe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
|
|
|
-- Shovels
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:shovel_wood",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wooden Shovel"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_shovel_wood.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly={times=tool_levels.wood.crumbly, uses=10, maxlevel=1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 2}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { shovel = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:shovel_stone",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Stone Shovel"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_shovel_stone.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-11 03:23:21 +02:00
|
|
|
crumbly={times=tool_levels.stone.crumbly, uses=20, maxlevel=1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 3}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { shovel = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:shovel_wrought_iron",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wrought Iron Shovel"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_shovel_wrought_iron.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
crumbly={times=tool_levels.wrought_iron.crumbly, uses=15, maxlevel=2}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 4}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { shovel = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:shovel_steel",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Steel Shovel"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_shovel_steel.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
crumbly={times=tool_levels.steel.crumbly, uses=30, maxlevel=2}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 5}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { shovel = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2017-05-17 17:57:14 +02:00
|
|
|
"default:shovel_carbon_steel",
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Carbon Steel Shovel"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_shovel_carbon_steel.png",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
crumbly={times=tool_levels.carbon_steel.crumbly, uses=40, maxlevel=2}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 5}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { shovel = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:shovel_bronze",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Bronze Shovel"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_shovel_bronze.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
crumbly={times=tool_levels.bronze.crumbly, uses=30, maxlevel=2}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 5}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { shovel = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
|
|
|
-- Axes
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:axe_wood",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wooden Axe"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_axe_wood.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-11 03:23:21 +02:00
|
|
|
choppy={times=tool_levels.wood.choppy, uses=10, maxlevel=1},
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[2]=1.20, [3]=0.60}, uses=20, maxlevel=1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 3}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { axe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:axe_stone",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Stone Axe"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_axe_stone.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-11 03:23:21 +02:00
|
|
|
choppy={times=tool_levels.stone.choppy, uses=20, maxlevel=1},
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[2]=1.10, [3]=0.40}, uses=25, maxlevel=1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 4}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { axe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:axe_wrought_iron",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wrought Iron Axe"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_axe_wrought_iron.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
choppy={times=tool_levels.wrought_iron.choppy, uses=15, maxlevel=2},
|
|
|
|
fleshy={times={[2]=1.00, [3]=0.20}, uses=30, maxlevel=1}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 5}
|
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { axe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:axe_steel",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Steel Axe"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_axe_steel.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
choppy={times=tool_levels.steel.choppy, uses=30, maxlevel=2},
|
|
|
|
fleshy={times={[2]=1.00, [3]=0.20}, uses=35, maxlevel=1}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 6}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { axe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2017-05-17 17:57:14 +02:00
|
|
|
"default:axe_carbon_steel",
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Carbon Steel Axe"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_axe_carbon_steel.png",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
choppy={times=tool_levels.carbon_steel.choppy, uses=40, maxlevel=2},
|
2015-09-01 17:15:24 +02:00
|
|
|
fleshy={times={[2]=1.00, [3]=0.20}, uses=40, maxlevel=1}
|
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 6}
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { axe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:axe_bronze",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Bronze Axe"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_axe_bronze.png",
|
|
|
|
tool_capabilities = {
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
choppy={times=tool_levels.bronze.choppy, uses=30, maxlevel=2},
|
2017-05-17 17:57:14 +02:00
|
|
|
fleshy={times={[2]=1.00, [3]=0.20}, uses=40, maxlevel=1}
|
|
|
|
},
|
2017-05-18 01:23:29 +02:00
|
|
|
damage_groups = {fleshy = 6}
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { axe = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
|
|
|
-- Spears
|
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:spear_wood",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wooden Spear"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_spear_wood.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_spear_wood.png^[transformR90",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[2]=1.10, [3]=0.60}, uses=10, maxlevel=1},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 4}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { spear = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:spear_stone",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Stone Spear"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_spear_stone.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_spear_stone.png^[transformR90",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 5}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { spear = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:spear_wrought_iron",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wrought Iron Spear"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_spear_wrought_iron.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_spear_wrought_iron.png^[transformR90",
|
2017-05-17 17:57:14 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=15, maxlevel=2},
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 6}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { spear = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-09-01 17:15:24 +02:00
|
|
|
"default:spear_steel",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Steel Spear"),
|
2015-09-01 17:15:24 +02:00
|
|
|
inventory_image = "default_spear_steel.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_spear_steel.png^[transformR90",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=30, maxlevel=2},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
2017-05-17 17:57:14 +02:00
|
|
|
damage_groups = {fleshy = 10}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { spear = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2017-05-17 17:57:14 +02:00
|
|
|
"default:spear_carbon_steel",
|
2015-09-01 17:15:24 +02:00
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Carbon Steel Spear"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_spear_carbon_steel.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_spear_carbon_steel.png^[transformR90",
|
2015-09-01 17:15:24 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=40, maxlevel=2},
|
2015-09-01 17:15:24 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 10}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { spear = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:spear_bronze",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Bronze Spear"),
|
2017-05-17 17:57:14 +02:00
|
|
|
inventory_image = "default_spear_bronze.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_spear_bronze.png^[transformR90",
|
2017-05-17 17:57:14 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2017-05-18 01:23:29 +02:00
|
|
|
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=30, maxlevel=2},
|
2017-05-17 17:57:14 +02:00
|
|
|
},
|
|
|
|
damage_groups = {fleshy = 10}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { spear = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-09-01 17:15:24 +02:00
|
|
|
|
2015-10-19 20:46:45 +02:00
|
|
|
-- Broadsword
|
2017-05-11 03:23:21 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-10-19 20:46:45 +02:00
|
|
|
"default:broadsword",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Broadsword"),
|
2015-10-19 20:46:45 +02:00
|
|
|
inventory_image = "default_broadsword.png",
|
|
|
|
wield_image = "default_broadsword.png",
|
|
|
|
wield_scale = {x = 2.0, y = 2.0, z = 1.0},
|
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 4.0,
|
2015-10-19 20:50:42 +02:00
|
|
|
damage_groups = {fleshy = 12}
|
2019-08-31 14:06:32 +02:00
|
|
|
},
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-08-31 14:06:32 +02:00
|
|
|
groups = { sword = 1 },
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-10-19 20:46:45 +02:00
|
|
|
|
2015-10-18 02:31:07 +02:00
|
|
|
-- Other
|
2017-05-11 03:23:21 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-10-18 02:31:07 +02:00
|
|
|
"default:shears",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Wrought Iron Shears"),
|
2015-10-18 02:31:07 +02:00
|
|
|
inventory_image = "default_shears.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_shears.png^[transformR90",
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-09-24 03:48:27 +02:00
|
|
|
groups = { shears = 1, sheep_cuts = 100 },
|
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
|
|
|
snappy={times=tool_levels.wrought_iron.snappy, uses=15, maxlevel=1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:shears_steel",
|
|
|
|
{
|
|
|
|
description = S("Steel Shears"),
|
|
|
|
inventory_image = "default_shears_steel.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_shears_steel.png^[transformR90",
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-09-24 03:48:27 +02:00
|
|
|
groups = { shears = 1, sheep_cuts = 200 },
|
2019-09-24 01:56:27 +02:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
2019-09-24 03:48:27 +02:00
|
|
|
snappy={times=tool_levels.steel.snappy, uses=30, maxlevel=1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:shears_carbon_steel",
|
|
|
|
{
|
|
|
|
description = S("Carbon Steel Shears"),
|
|
|
|
inventory_image = "default_shears_carbon_steel.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_shears_carbon_steel.png^[transformR90",
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-09-24 03:48:27 +02:00
|
|
|
groups = { shears = 1, sheep_cuts = 266 },
|
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
|
|
|
snappy={times=tool_levels.carbon_steel.snappy, uses=40, maxlevel=1},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_tool(
|
|
|
|
"default:shears_bronze",
|
|
|
|
{
|
|
|
|
description = S("Bronze Shears"),
|
|
|
|
inventory_image = "default_shears_bronze.png",
|
2019-09-26 19:25:34 +02:00
|
|
|
wield_image = "default_shears_bronze.png^[transformR90",
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2019-09-24 03:48:27 +02:00
|
|
|
groups = { shears = 1, sheep_cuts = 200 },
|
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=1,
|
|
|
|
groupcaps={
|
|
|
|
snappy={times=tool_levels.bronze.snappy, uses=30, maxlevel=1},
|
2019-09-24 01:56:27 +02:00
|
|
|
},
|
|
|
|
},
|
2017-05-17 17:57:14 +02:00
|
|
|
})
|
2015-10-18 02:31:07 +02:00
|
|
|
|
2017-05-12 04:29:55 +02:00
|
|
|
minetest.register_tool(
|
2015-10-18 02:31:07 +02:00
|
|
|
"default:flint_and_steel",
|
|
|
|
{
|
2019-08-28 17:31:41 +02:00
|
|
|
description = S("Flint and Steel"),
|
2015-10-18 02:31:07 +02:00
|
|
|
inventory_image = "default_flint_and_steel.png",
|
2019-10-24 18:08:18 +02:00
|
|
|
sound = { breaks = "default_tool_breaks" },
|
2015-10-18 02:31:07 +02:00
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
2017-05-17 17:57:14 +02:00
|
|
|
if pointed_thing == nil then return end
|
|
|
|
if pointed_thing.type ~= "node" then return end
|
|
|
|
|
|
|
|
local pos = pointed_thing.under
|
2019-09-25 21:54:22 +02:00
|
|
|
if minetest.is_protected(pos, user:get_player_name()) and
|
|
|
|
not minetest.check_player_privs(user, "protection_bypass") then
|
|
|
|
minetest.record_protection_violation(pos, user:get_player_name())
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
2017-05-17 17:57:14 +02:00
|
|
|
local node = minetest.get_node(pos)
|
|
|
|
local nodename = node.name
|
|
|
|
|
|
|
|
if nodename == "default:torch_weak" then
|
|
|
|
minetest.set_node(
|
|
|
|
pos,
|
|
|
|
{
|
|
|
|
name = "default:torch",
|
|
|
|
param = node.param,
|
|
|
|
param2 = node.param2
|
|
|
|
})
|
|
|
|
|
2019-08-31 00:07:26 +02:00
|
|
|
if not minetest.settings:get_bool("creative_mode") then
|
|
|
|
itemstack:add_wear(800)
|
|
|
|
end
|
2017-05-17 17:57:14 +02:00
|
|
|
elseif nodename == "default:torch_dead" then
|
|
|
|
minetest.set_node(
|
|
|
|
pos,
|
|
|
|
{
|
|
|
|
name = "default:torch_weak",
|
|
|
|
param = node.param,
|
|
|
|
param2 = node.param2
|
|
|
|
})
|
|
|
|
|
2019-08-31 00:07:26 +02:00
|
|
|
if not minetest.settings:get_bool("creative_mode") then
|
|
|
|
itemstack:add_wear(800)
|
|
|
|
end
|
2017-05-17 17:57:14 +02:00
|
|
|
elseif nodename == "tnt:tnt" then
|
|
|
|
local y = minetest.registered_nodes["tnt:tnt"]
|
|
|
|
if y ~= nil then
|
|
|
|
y.on_punch(pos, node, user)
|
|
|
|
|
2019-08-31 00:07:26 +02:00
|
|
|
if not minetest.settings:get_bool("creative_mode") then
|
|
|
|
itemstack:add_wear(800)
|
|
|
|
end
|
2017-05-17 17:57:14 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return itemstack
|
|
|
|
end,
|
|
|
|
})
|
2015-10-18 02:31:07 +02:00
|
|
|
|
2017-05-10 19:19:28 +02:00
|
|
|
default.log("tools", "loaded")
|