2020-02-18 14:44:54 +00:00
|
|
|
local S = minetest.get_translator("mcl_armor")
|
2019-03-07 23:51:45 +00:00
|
|
|
|
2015-06-29 17:55:56 +00:00
|
|
|
dofile(minetest.get_modpath(minetest.get_current_modname()).."/armor.lua")
|
2020-02-18 14:44:54 +00:00
|
|
|
dofile(minetest.get_modpath(minetest.get_current_modname()).."/alias.lua")
|
2015-06-29 17:55:56 +00:00
|
|
|
|
|
|
|
-- Regisiter Head Armor
|
|
|
|
|
2019-03-07 23:51:45 +00: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 14:43:15 +00:00
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:helmet_leather", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Leather Cap"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_helmet_leather.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_head=1, mcl_armor_points=1, mcl_armor_uses=56},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_mobitems:leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_leather",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:helmet_iron", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Iron Helmet"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_helmet_iron.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_head=1, mcl_armor_points=2, mcl_armor_uses=166},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:05:08 +00:00
|
|
|
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:helmet_gold", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Golden Helmet"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_helmet_gold.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_head=1, mcl_armor_points=2, mcl_armor_uses=78},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:gold_ingot",
|
2020-02-18 15:36:22 +00:00
|
|
|
sounds = {
|
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:helmet_diamond",{
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Diamond Helmet"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_helmet_diamond.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_head=1, mcl_armor_points=3, mcl_armor_uses=364, mcl_armor_toughness=2},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_diamond",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:helmet_chain", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Chain Helmet"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_helmet_chain.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_head=1, mcl_armor_points=2, mcl_armor_uses=166},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_chainmail",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_chainmail",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Regisiter Torso Armor
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:chestplate_leather", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Leather Tunic"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_chestplate_leather.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_torso=1, mcl_armor_points=3, mcl_armor_uses=81},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_mobitems:leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_leather",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:chestplate_iron", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Iron Chestplate"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_chestplate_iron.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_torso=1, mcl_armor_points=6, mcl_armor_uses=241},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:chestplate_gold", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Golden Chestplate"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_chestplate_gold.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_torso=1, mcl_armor_points=5, mcl_armor_uses=113},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:gold_ingot",
|
2020-02-18 15:36:22 +00:00
|
|
|
sounds = {
|
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:chestplate_diamond",{
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Diamond Chestplate"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_chestplate_diamond.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_torso=1, mcl_armor_points=8, mcl_armor_uses=529, mcl_armor_toughness=2},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_diamond",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:chestplate_chain", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Chain Chestplate"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_chestplate_chain.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_torso=1, mcl_armor_points=5, mcl_armor_uses=241},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_chainmail",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_chainmail",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Regisiter Leg Armor
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:leggings_leather", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Leather Pants"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_leggings_leather.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_legs=1, mcl_armor_points=2, mcl_armor_uses=76},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_mobitems:leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_leather",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:leggings_iron", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Iron Leggings"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_leggings_iron.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_legs=1, mcl_armor_points=5, mcl_armor_uses=226},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:leggings_gold", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Golden Leggings"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_leggings_gold.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_legs=1, mcl_armor_points=3, mcl_armor_uses=106},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:gold_ingot",
|
2020-02-18 15:36:22 +00:00
|
|
|
sounds = {
|
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:leggings_diamond",{
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Diamond Leggings"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_leggings_diamond.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_legs=1, mcl_armor_points=6, mcl_armor_uses=496, mcl_armor_toughness=2},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_diamond",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:leggings_chain", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Chain Leggings"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_leggings_chain.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_legs=1, mcl_armor_points=4, mcl_armor_uses=226},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_chainmail",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_chainmail",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
-- Regisiter Boots
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:boots_leather", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Leather Boots"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_boots_leather.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_feet=1, mcl_armor_points=1, mcl_armor_uses=66},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_mobitems:leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_leather",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:boots_iron", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Iron Boots"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_boots_iron.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_feet=1, mcl_armor_points=2, mcl_armor_uses=196},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:boots_gold", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Golden Boots"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_boots_gold.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_feet=1, mcl_armor_points=1, mcl_armor_uses=92},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:gold_ingot",
|
2020-02-18 15:36:22 +00:00
|
|
|
sounds = {
|
|
|
|
_mcl_armor_equip = "mcl_armor_equip_iron",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_iron",
|
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:boots_diamond",{
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Diamond Boots"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_boots_diamond.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_feet=1, mcl_armor_points=3, mcl_armor_uses=430, mcl_armor_toughness=2},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_diamond",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_diamond",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
2020-02-18 14:44:54 +00:00
|
|
|
minetest.register_tool("mcl_armor:boots_chain", {
|
2019-03-07 23:51:45 +00:00
|
|
|
description = S("Chain Boots"),
|
2017-03-18 14:43:15 +00:00
|
|
|
_doc_items_longdesc = longdesc,
|
|
|
|
_doc_items_usagehelp = usage,
|
2020-02-18 14:44:54 +00:00
|
|
|
inventory_image = "mcl_armor_inv_boots_chain.png",
|
2020-02-17 18:55:02 +00:00
|
|
|
groups = {armor_feet=1, mcl_armor_points=1, mcl_armor_uses=196},
|
2018-02-02 01:33:10 +00:00
|
|
|
_repair_material = "mcl_core:iron_ingot",
|
2020-02-18 06:33:08 +00:00
|
|
|
sounds = {
|
2020-02-18 14:44:54 +00:00
|
|
|
_mcl_armor_equip = "mcl_armor_equip_chainmail",
|
|
|
|
_mcl_armor_unequip = "mcl_armor_unequip_chainmail",
|
2020-02-18 06:33:08 +00:00
|
|
|
},
|
2020-02-18 21:17:52 +00:00
|
|
|
on_place = armor.on_armor_use,
|
|
|
|
on_secondary_use = armor.on_armor_use,
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Register Craft Recipies
|
|
|
|
|
|
|
|
local craft_ingreds = {
|
2017-01-16 22:41:59 +00:00
|
|
|
leather = { "mcl_mobitems:leather" },
|
2017-02-11 20:14:40 +00:00
|
|
|
iron = { "mcl_core:iron_ingot", "mcl_core:iron_nugget" },
|
2017-01-31 22:32:56 +00:00
|
|
|
gold = { "mcl_core:gold_ingot", "mcl_core:gold_nugget" },
|
|
|
|
diamond = { "mcl_core:diamond" },
|
|
|
|
chain = { nil, "mcl_core:iron_nugget"} ,
|
2015-06-29 17:55:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for k, v in pairs(craft_ingreds) do
|
2017-01-04 09:56:38 +00:00
|
|
|
-- material
|
|
|
|
local m = v[1]
|
|
|
|
-- cooking result
|
|
|
|
local c = v[2]
|
|
|
|
if m ~= nil then
|
|
|
|
minetest.register_craft({
|
2020-02-18 14:44:54 +00:00
|
|
|
output = "mcl_armor:helmet_"..k,
|
2017-01-04 09:56:38 +00:00
|
|
|
recipe = {
|
|
|
|
{m, m, m},
|
|
|
|
{m, "", m},
|
|
|
|
{"", "", ""},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
2020-02-18 14:44:54 +00:00
|
|
|
output = "mcl_armor:chestplate_"..k,
|
2017-01-04 09:56:38 +00:00
|
|
|
recipe = {
|
|
|
|
{m, "", m},
|
|
|
|
{m, m, m},
|
|
|
|
{m, m, m},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
2020-02-18 14:44:54 +00:00
|
|
|
output = "mcl_armor:leggings_"..k,
|
2017-01-04 09:56:38 +00:00
|
|
|
recipe = {
|
|
|
|
{m, m, m},
|
|
|
|
{m, "", m},
|
|
|
|
{m, "", m},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
2020-02-18 14:44:54 +00:00
|
|
|
output = "mcl_armor:boots_"..k,
|
2017-01-04 09:56:38 +00:00
|
|
|
recipe = {
|
|
|
|
{m, "", m},
|
|
|
|
{m, "", m},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
if c ~= nil then
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = c,
|
2020-02-18 14:44:54 +00:00
|
|
|
recipe = "mcl_armor:helmet_"..k,
|
2017-01-04 10:49:05 +00:00
|
|
|
cooktime = 10,
|
2017-01-04 09:56:38 +00:00
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = c,
|
2020-02-18 14:44:54 +00:00
|
|
|
recipe = "mcl_armor:chestplate_"..k,
|
2017-01-04 10:49:05 +00:00
|
|
|
cooktime = 10,
|
2017-01-04 09:56:38 +00:00
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = c,
|
2020-02-18 14:44:54 +00:00
|
|
|
recipe = "mcl_armor:leggings_"..k,
|
2017-01-04 10:49:05 +00:00
|
|
|
cooktime = 10,
|
2017-01-04 09:56:38 +00:00
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = c,
|
2020-02-18 14:44:54 +00:00
|
|
|
recipe = "mcl_armor:boots_"..k,
|
2017-01-04 10:49:05 +00:00
|
|
|
cooktime = 10,
|
2017-01-04 09:56:38 +00:00
|
|
|
})
|
|
|
|
end
|
2015-06-29 17:55:56 +00:00
|
|
|
end
|
2020-02-18 14:44:54 +00:00
|
|
|
|