MineClone2/mods/ITEMS/minetest-3d_armor/3d_armor/init.lua

290 lines
8.1 KiB
Lua
Raw Normal View History

2019-03-08 01:51:45 +02:00
local S = minetest.get_translator("3d_armor")
2015-06-29 20:55:56 +03:00
dofile(minetest.get_modpath(minetest.get_current_modname()).."/armor.lua")
-- Regisiter Head Armor
2019-03-08 01:51:45 +02:00
local longdesc = S("This is a piece of equippable armor which reduces the amount of damage you receive.")
local usage = S("To equip it, put it on the corresponding armor slot in your inventory menu.")
2017-03-18 16:43:15 +02:00
2015-06-29 20:55:56 +03:00
minetest.register_tool("3d_armor:helmet_leather", {
2019-03-08 01:51:45 +02:00
description = S("Leather Cap"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_helmet_leather.png",
groups = {armor_head=5, armor_heal=0, armor_use=100},
wear = 0,
_repair_material = "mcl_mobitems:leather",
2015-06-29 20:55:56 +03:00
})
2017-02-11 22:14:40 +02:00
minetest.register_tool("3d_armor:helmet_iron", {
2019-03-08 01:51:45 +02:00
description = S("Iron Helmet"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2017-02-14 21:33:37 +02:00
inventory_image = "3d_armor_inv_helmet_iron.png",
2015-06-29 20:55:56 +03:00
groups = {armor_head=10, armor_heal=5, armor_use=250},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:helmet_gold", {
2019-03-08 01:51:45 +02:00
description = S("Golden Helmet"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_helmet_gold.png",
groups = {armor_head=15, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:gold_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:helmet_diamond",{
2019-03-08 01:51:45 +02:00
description = S("Diamond Helmet"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_helmet_diamond.png",
groups = {armor_head=20, armor_heal=15, armor_use=750},
wear = 0,
_repair_material = "mcl_core:diamond",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:helmet_chain", {
2019-03-08 01:51:45 +02:00
description = S("Chain Helmet"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_helmet_chain.png",
groups = {armor_head=15, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
-- Regisiter Torso Armor
minetest.register_tool("3d_armor:chestplate_leather", {
2019-03-08 01:51:45 +02:00
description = S("Leather Tunic"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_chestplate_leather.png",
groups = {armor_torso=15, armor_heal=0, armor_use=100},
wear = 0,
_repair_material = "mcl_mobitems:leather",
2015-06-29 20:55:56 +03:00
})
2017-02-11 22:14:40 +02:00
minetest.register_tool("3d_armor:chestplate_iron", {
2019-03-08 01:51:45 +02:00
description = S("Iron Chestplate"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2017-02-14 21:33:37 +02:00
inventory_image = "3d_armor_inv_chestplate_iron.png",
2015-06-29 20:55:56 +03:00
groups = {armor_torso=20, armor_heal=5, armor_use=250},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:chestplate_gold", {
2019-03-08 01:51:45 +02:00
description = S("Golden Chestplate"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_chestplate_gold.png",
groups = {armor_torso=25, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:gold_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:chestplate_diamond",{
2019-03-08 01:51:45 +02:00
description = S("Diamond Chestplate"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_chestplate_diamond.png",
groups = {armor_torso=30, armor_heal=15, armor_use=750},
wear = 0,
_repair_material = "mcl_core:diamond",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:chestplate_chain", {
2019-03-08 01:51:45 +02:00
description = S("Chain Chestplate"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_chestplate_chain.png",
groups = {armor_torso=25, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
-- Regisiter Leg Armor
minetest.register_tool("3d_armor:leggings_leather", {
2019-03-08 01:51:45 +02:00
description = S("Leather Pants"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_leggings_leather.png",
groups = {armor_legs=10, armor_heal=0, armor_use=100},
wear = 0,
_repair_material = "mcl_mobitems:leather",
2015-06-29 20:55:56 +03:00
})
2017-02-11 22:14:40 +02:00
minetest.register_tool("3d_armor:leggings_iron", {
2019-03-08 01:51:45 +02:00
description = S("Iron Leggings"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2017-02-14 21:33:37 +02:00
inventory_image = "3d_armor_inv_leggings_iron.png",
2015-06-29 20:55:56 +03:00
groups = {armor_legs=15, armor_heal=5, armor_use=250},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:leggings_gold", {
2019-03-08 01:51:45 +02:00
description = S("Golden Leggings"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_leggings_gold.png",
groups = {armor_legs=20, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:gold_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:leggings_diamond",{
2019-03-08 01:51:45 +02:00
description = S("Diamond Leggings"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_leggings_diamond.png",
groups = {armor_legs=25, armor_heal=15, armor_use=750},
wear = 0,
_repair_material = "mcl_core:diamond",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:leggings_chain", {
2019-03-08 01:51:45 +02:00
description = S("Chain Leggings"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_leggings_chain.png",
groups = {armor_legs=20, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
-- Regisiter Boots
minetest.register_tool("3d_armor:boots_leather", {
2019-03-08 01:51:45 +02:00
description = S("Leather Boots"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_boots_leather.png",
groups = {armor_feet=5, armor_heal=0, armor_use=100},
wear = 0,
_repair_material = "mcl_mobitems:leather",
2015-06-29 20:55:56 +03:00
})
2017-02-11 22:14:40 +02:00
minetest.register_tool("3d_armor:boots_iron", {
2019-03-08 01:51:45 +02:00
description = S("Iron Boots"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2017-02-14 21:33:37 +02:00
inventory_image = "3d_armor_inv_boots_iron.png",
2015-06-29 20:55:56 +03:00
groups = {armor_feet=10, armor_heal=5, armor_use=250},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:boots_gold", {
2019-03-08 01:51:45 +02:00
description = S("Golden Boots"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_boots_gold.png",
groups = {armor_feet=15, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:gold_ingot",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:boots_diamond",{
2019-03-08 01:51:45 +02:00
description = S("Diamond Boots"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_boots_diamond.png",
groups = {armor_feet=20, armor_heal=15, armor_use=750},
wear = 0,
_repair_material = "mcl_core:diamond",
2015-06-29 20:55:56 +03:00
})
minetest.register_tool("3d_armor:boots_chain", {
2019-03-08 01:51:45 +02:00
description = S("Chain Boots"),
2017-03-18 16:43:15 +02:00
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usage,
2015-06-29 20:55:56 +03:00
inventory_image = "3d_armor_inv_boots_chain.png",
groups = {armor_feet=15, armor_heal=10, armor_use=500},
wear = 0,
_repair_material = "mcl_core:iron_ingot",
2015-06-29 20:55:56 +03:00
})
-- Register Craft Recipies
local craft_ingreds = {
2017-01-17 00:41:59 +02:00
leather = { "mcl_mobitems:leather" },
2017-02-11 22:14:40 +02:00
iron = { "mcl_core:iron_ingot", "mcl_core:iron_nugget" },
2017-02-01 00:32:56 +02:00
gold = { "mcl_core:gold_ingot", "mcl_core:gold_nugget" },
diamond = { "mcl_core:diamond" },
chain = { nil, "mcl_core:iron_nugget"} ,
2015-06-29 20:55:56 +03:00
}
for k, v in pairs(craft_ingreds) do
2017-01-04 11:56:38 +02:00
-- material
local m = v[1]
-- cooking result
local c = v[2]
if m ~= nil then
minetest.register_craft({
output = "3d_armor:helmet_"..k,
recipe = {
{m, m, m},
{m, "", m},
{"", "", ""},
},
})
minetest.register_craft({
output = "3d_armor:chestplate_"..k,
recipe = {
{m, "", m},
{m, m, m},
{m, m, m},
},
})
minetest.register_craft({
output = "3d_armor:leggings_"..k,
recipe = {
{m, m, m},
{m, "", m},
{m, "", m},
},
})
minetest.register_craft({
output = "3d_armor:boots_"..k,
recipe = {
{m, "", m},
{m, "", m},
},
})
end
if c ~= nil then
minetest.register_craft({
type = "cooking",
output = c,
recipe = "3d_armor:helmet_"..k,
2017-01-04 12:49:05 +02:00
cooktime = 10,
2017-01-04 11:56:38 +02:00
})
minetest.register_craft({
type = "cooking",
output = c,
recipe = "3d_armor:chestplate_"..k,
2017-01-04 12:49:05 +02:00
cooktime = 10,
2017-01-04 11:56:38 +02:00
})
minetest.register_craft({
type = "cooking",
output = c,
recipe = "3d_armor:leggings_"..k,
2017-01-04 12:49:05 +02:00
cooktime = 10,
2017-01-04 11:56:38 +02:00
})
minetest.register_craft({
type = "cooking",
output = c,
recipe = "3d_armor:boots_"..k,
2017-01-04 12:49:05 +02:00
cooktime = 10,
2017-01-04 11:56:38 +02:00
})
end
2015-06-29 20:55:56 +03:00
end