Camas/mods/jewels/jewels.lua

247 lines
5.0 KiB
Lua
Raw Normal View History

--
-- Jeweled tool defs
--
2019-08-28 17:31:41 +02:00
local S = minetest.get_translator("jewels")
-- Automatic jeweling on specific tools
local tool_types = {
pick = {
steel = {
description = S("Jeweled Steel Pickaxe"),
digspeed = {
digspeed = -0.1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 1,
},
uses = {
uses = 3,
},
},
carbon_steel = {
description = S("Jeweled Carbon Steel Pickaxe"),
digspeed = {
digspeed = -0.13,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 2,
},
uses = {
uses = 5,
},
},
bronze = {
description = S("Jeweled Bronze Pickaxe"),
digspeed = {
digspeed = -0.14,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 6,
},
},
},
shovel = {
steel = {
description = S("Jeweled Steel Shovel"),
digspeed = {
digspeed = -0.1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 1,
},
uses = {
uses = 3,
},
},
carbon_steel = {
description = S("Jeweled Carbon Steel Shovel"),
digspeed = {
digspeed = -0.13,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 2,
},
uses = {
uses = 5,
},
},
bronze = {
description = S("Jeweled Bronze Shovel"),
digspeed = {
digspeed = -0.14,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 6,
},
},
},
axe = {
steel = {
description = S("Jeweled Steel Axe"),
digspeed = {
digspeed = -0.1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 2,
},
uses = {
uses = 3,
},
},
carbon_steel = {
description = S("Jeweled Carbon Steel Axe"),
digspeed = {
digspeed = -0.13,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 5,
},
},
bronze = {
description = S("Jeweled Bronze Axe"),
digspeed = {
digspeed = -0.14,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 4,
},
uses = {
uses = 6,
},
},
},
spear = {
steel = {
description = S("Jeweled Steel Spear"),
reach = {
2019-09-21 23:39:31 +02:00
range = 1,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 3,
},
uses = {
uses = 3,
},
},
carbon_steel = {
description = S("Jeweled Carbon Steel Spear"),
reach = {
2019-09-21 23:39:31 +02:00
range = 2,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 4,
},
uses = {
uses = 5,
},
},
bronze = {
description = S("Jeweled Bronze Spear"),
reach = {
2019-09-21 23:39:31 +02:00
range = 2,
},
damage = {
2017-05-18 19:40:40 +02:00
fleshy = 5,
},
uses = {
uses = 6,
},
},
},
2019-09-24 04:06:17 +02:00
shears = {
steel = {
description = S("Jeweled Steel Shears"),
2019-09-24 04:06:17 +02:00
digspeed = {
digspeed = -0.1,
},
uses = {
uses = 3,
},
},
carbon_steel = {
description = S("Jeweled Carbon Steel Shears"),
2019-09-24 04:06:17 +02:00
digspeed = {
digspeed = -0.13,
},
uses = {
uses = 5,
},
},
bronze = {
description = S("Jeweled Bronze Shears"),
2019-09-24 04:06:17 +02:00
digspeed = {
digspeed = -0.14,
},
uses = {
uses = 6,
},
},
}
}
for tool_name, tool_def in pairs(tool_types) do
for material_name, material_def in pairs(tool_def) do
for jewel_name, jewel_def in pairs(material_def) do
if jewel_name ~= "description" then
jewels.register_jewel(
"default:" .. tool_name .. "_" .. material_name,
"jewels:" .. tool_name .. "_" .. material_name .. "_" .. jewel_name,
{
stats = jewel_def,
description = material_def.description,
}
)
end
end
end
end
2015-10-19 20:46:45 +02:00
-- Broadswords
jewels.register_jewel(
"default:broadsword",
"jewels:broadsword_jeweled_pommel",
{
2019-08-28 17:31:41 +02:00
description = S("Jeweled Pommel Broadsword"),
2015-10-19 20:46:45 +02:00
overlay = "jewels_jeweled_pommel.png",
stats = {
fleshy = 2,
}
})
2015-10-19 20:46:45 +02:00
jewels.register_jewel(
"jewels:broadsword_jeweled_pommel",
"jewels:broadsword_jeweled_pommel_and_guard",
{
2019-08-28 17:31:41 +02:00
description = S("Jeweled Pommel&Guard Broadsword"),
2015-10-19 20:46:45 +02:00
overlay = "jewels_jeweled_guard.png",
stats = {
range = 1,
}
})
2015-10-19 20:46:45 +02:00
jewels.register_jewel(
"jewels:broadsword_jeweled_pommel_and_guard",
"jewels:serrated_broadsword",
{
2019-08-28 17:31:41 +02:00
description = S("Serrated Broadsword"),
2015-10-19 20:46:45 +02:00
overlay = "jewels_jeweled_blade.png",
stats = {
fleshy = 2,
range = 1,
}
})
2015-10-19 20:46:45 +02:00
default.log("jewels", "loaded")