2013-06-22 20:31:57 +02:00
|
|
|
dofile(minetest.get_modpath(minetest.get_current_modname()).."/armor.lua")
|
2013-11-12 22:22:52 +01:00
|
|
|
local use_moreores = minetest.get_modpath("moreores")
|
2013-04-11 21:56:35 +02:00
|
|
|
|
2013-03-26 22:02:48 +01:00
|
|
|
-- Regisiter Head Armor
|
|
|
|
|
|
|
|
minetest.register_tool("3d_armor:helmet_wood", {
|
|
|
|
description = "Wood Helmet",
|
|
|
|
inventory_image = "3d_armor_inv_helmet_wood.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_head=5, armor_heal=0, armor_use=2000},
|
2013-03-26 22:02:48 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-03-15 21:27:58 +01:00
|
|
|
minetest.register_tool("3d_armor:helmet_steel", {
|
|
|
|
description = "Steel Helmet",
|
|
|
|
inventory_image = "3d_armor_inv_helmet_steel.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_head=10, armor_heal=0, armor_use=500},
|
2013-03-15 21:27:58 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-04-11 21:56:35 +02:00
|
|
|
minetest.register_tool("3d_armor:helmet_bronze", {
|
|
|
|
description = "Bronze Helmet",
|
|
|
|
inventory_image = "3d_armor_inv_helmet_bronze.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_head=10, armor_heal=6, armor_use=250},
|
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool("3d_armor:helmet_diamond", {
|
|
|
|
description = "Diamond Helmet",
|
|
|
|
inventory_image = "3d_armor_inv_helmet_diamond.png",
|
|
|
|
groups = {armor_head=15, armor_heal=12, armor_use=100},
|
2013-04-11 21:56:35 +02:00
|
|
|
wear = 0,
|
2013-03-15 21:27:58 +01:00
|
|
|
})
|
|
|
|
|
2013-11-12 22:22:52 +01:00
|
|
|
if use_moreores then
|
|
|
|
minetest.register_tool("3d_armor:helmet_mithril", {
|
|
|
|
description = "Mithril Helmet",
|
|
|
|
inventory_image = "3d_armor_inv_helmet_mithril.png",
|
|
|
|
groups = {armor_head=15, armor_heal=12, armor_use=50},
|
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
end
|
2013-06-22 20:31:57 +02:00
|
|
|
|
2013-03-26 22:02:48 +01:00
|
|
|
-- Regisiter Torso Armor
|
2013-03-15 21:27:58 +01:00
|
|
|
|
2013-03-26 22:02:48 +01:00
|
|
|
minetest.register_tool("3d_armor:chestplate_wood", {
|
|
|
|
description = "Wood Chestplate",
|
|
|
|
inventory_image = "3d_armor_inv_chestplate_wood.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_torso=10, armor_heal=0, armor_use=2000},
|
2013-03-15 21:27:58 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-03-26 22:02:48 +01:00
|
|
|
minetest.register_tool("3d_armor:chestplate_steel", {
|
|
|
|
description = "Steel Chestplate",
|
|
|
|
inventory_image = "3d_armor_inv_chestplate_steel.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_torso=15, armor_heal=0, armor_use=500},
|
2013-03-15 21:27:58 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-04-11 21:56:35 +02:00
|
|
|
minetest.register_tool("3d_armor:chestplate_bronze", {
|
|
|
|
description = "Bronze Chestplate",
|
|
|
|
inventory_image = "3d_armor_inv_chestplate_bronze.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_torso=15, armor_heal=6, armor_use=250},
|
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool("3d_armor:chestplate_diamond", {
|
|
|
|
description = "Diamond Chestplate",
|
|
|
|
inventory_image = "3d_armor_inv_chestplate_diamond.png",
|
|
|
|
groups = {armor_torso=20, armor_heal=12, armor_use=100},
|
2013-04-11 21:56:35 +02:00
|
|
|
wear = 0,
|
2013-03-15 21:27:58 +01:00
|
|
|
})
|
|
|
|
|
2013-11-12 22:22:52 +01:00
|
|
|
if use_moreores then
|
|
|
|
minetest.register_tool("3d_armor:chestplate_mithril", {
|
|
|
|
description = "Mithril Chestplate",
|
|
|
|
inventory_image = "3d_armor_inv_chestplate_mithril.png",
|
|
|
|
groups = {armor_torso=20, armor_heal=12, armor_use=50},
|
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
end
|
2013-06-22 20:31:57 +02:00
|
|
|
|
2013-03-26 22:02:48 +01:00
|
|
|
-- Regisiter Leg Armor
|
|
|
|
|
|
|
|
minetest.register_tool("3d_armor:leggings_wood", {
|
|
|
|
description = "Wood Leggings",
|
|
|
|
inventory_image = "3d_armor_inv_leggings_wood.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_legs=5, armor_heal=0, armor_use=2000},
|
2013-03-26 22:02:48 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool("3d_armor:leggings_steel", {
|
|
|
|
description = "Steel Leggings",
|
|
|
|
inventory_image = "3d_armor_inv_leggings_steel.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_legs=15, armor_heal=0, armor_use=500},
|
2013-03-26 22:02:48 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-04-11 21:56:35 +02:00
|
|
|
minetest.register_tool("3d_armor:leggings_bronze", {
|
|
|
|
description = "Bronze Leggings",
|
|
|
|
inventory_image = "3d_armor_inv_leggings_bronze.png",
|
2013-06-22 20:31:57 +02:00
|
|
|
groups = {armor_legs=15, armor_heal=6, armor_use=250},
|
2013-04-11 21:56:35 +02:00
|
|
|
wear = 0,
|
2013-03-15 21:27:58 +01:00
|
|
|
})
|
|
|
|
|
2013-06-22 20:31:57 +02:00
|
|
|
minetest.register_tool("3d_armor:leggings_diamond", {
|
|
|
|
description = "Diamond Leggings",
|
|
|
|
inventory_image = "3d_armor_inv_leggings_diamond.png",
|
|
|
|
groups = {armor_legs=20, armor_heal=12, armor_use=100},
|
|
|
|
wear = 0,
|
|
|
|
})
|
2013-03-26 22:02:48 +01:00
|
|
|
|
2013-11-12 22:22:52 +01:00
|
|
|
if use_moreores then
|
|
|
|
minetest.register_tool("3d_armor:leggings_mithril", {
|
|
|
|
description = "Mithril Leggings",
|
|
|
|
inventory_image = "3d_armor_inv_leggings_mithril.png",
|
|
|
|
groups = {armor_legs=20, armor_heal=12, armor_use=50},
|
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2013-06-22 20:31:57 +02:00
|
|
|
-- Regisiter Boots
|
|
|
|
|
|
|
|
minetest.register_tool("3d_armor:boots_wood", {
|
|
|
|
description = "Wood Boots",
|
|
|
|
inventory_image = "3d_armor_inv_boots_wood.png",
|
|
|
|
groups = {armor_feet=5, armor_heal=0, armor_use=2000},
|
2013-03-26 22:02:48 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-06-22 20:31:57 +02:00
|
|
|
minetest.register_tool("3d_armor:boots_steel", {
|
|
|
|
description = "Steel Boots",
|
|
|
|
inventory_image = "3d_armor_inv_boots_steel.png",
|
|
|
|
groups = {armor_feet=10, armor_heal=0, armor_use=500},
|
2013-03-26 22:02:48 +01:00
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
|
2013-06-22 20:31:57 +02:00
|
|
|
minetest.register_tool("3d_armor:boots_bronze", {
|
|
|
|
description = "Bronze Boots",
|
|
|
|
inventory_image = "3d_armor_inv_boots_bronze.png",
|
|
|
|
groups = {armor_feet=10, armor_heal=6, armor_use=250},
|
2013-03-26 22:02:48 +01:00
|
|
|
wear = 0,
|
2013-03-15 21:27:58 +01:00
|
|
|
})
|
|
|
|
|
2013-06-22 20:31:57 +02:00
|
|
|
minetest.register_tool("3d_armor:boots_diamond", {
|
|
|
|
description = "Diamond Boots",
|
|
|
|
inventory_image = "3d_armor_inv_boots_diamond.png",
|
|
|
|
groups = {armor_feet=15, armor_heal=12, armor_use=100},
|
2013-04-11 21:56:35 +02:00
|
|
|
wear = 0,
|
2013-03-15 21:27:58 +01:00
|
|
|
})
|
|
|
|
|
2013-11-12 22:22:52 +01:00
|
|
|
if use_moreores then
|
|
|
|
minetest.register_tool("3d_armor:boots_mithril", {
|
|
|
|
description = "Mithril Boots",
|
|
|
|
inventory_image = "3d_armor_inv_boots_mithril.png",
|
|
|
|
groups = {armor_feet=15, armor_heal=12, armor_use=50},
|
|
|
|
wear = 0,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2013-04-11 21:56:35 +02:00
|
|
|
-- Register Craft Recipies
|
|
|
|
|
|
|
|
local craft_ingreds = {
|
|
|
|
wood = "default:wood",
|
|
|
|
steel = "default:steel_ingot",
|
|
|
|
bronze = "default:bronze_ingot",
|
2013-06-22 20:31:57 +02:00
|
|
|
diamond = "default:diamond",
|
2013-11-12 22:22:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if use_moreores then
|
|
|
|
craft_ingreds.mithril = "moreores:mithril_ingot"
|
|
|
|
end
|
2013-04-11 21:56:35 +02:00
|
|
|
|
2013-04-17 19:57:27 +02:00
|
|
|
for k, v in pairs(craft_ingreds) do
|
2013-04-11 21:56:35 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "3d_armor:helmet_"..k,
|
|
|
|
recipe = {
|
|
|
|
{v, v, v},
|
|
|
|
{v, "", v},
|
|
|
|
{"", "", ""},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "3d_armor:chestplate_"..k,
|
|
|
|
recipe = {
|
|
|
|
{v, "", v},
|
|
|
|
{v, v, v},
|
|
|
|
{v, v, v},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "3d_armor:leggings_"..k,
|
|
|
|
recipe = {
|
|
|
|
{v, v, v},
|
|
|
|
{v, "", v},
|
|
|
|
{v, "", v},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
minetest.register_craft({
|
2013-06-22 20:31:57 +02:00
|
|
|
output = "3d_armor:boots_"..k,
|
2013-04-11 21:56:35 +02:00
|
|
|
recipe = {
|
2013-06-22 20:31:57 +02:00
|
|
|
{v, "", v},
|
|
|
|
{v, "", v},
|
2013-04-11 21:56:35 +02:00
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
2013-03-15 21:27:58 +01:00
|
|
|
|