minetest-3d_armor/3d_armor/armor.lua

306 lines
9.8 KiB
Lua
Raw Normal View History

2017-03-31 20:54:12 +02:00
local S = function(s) return s end
if minetest.global_exists("intllib") then
S = intllib.Getter()
end
minetest.register_alias("adminboots","3d_armor:boots_admin")
minetest.register_alias("adminhelmet","3d_armor:helmet_admin")
minetest.register_alias("adminchestplate","3d_armor:chestplate_admin")
minetest.register_alias("adminleggings","3d_armor:leggings_admin")
2014-04-13 21:17:11 +02:00
armor:register_armor("3d_armor:helmet_admin", {
2017-03-31 20:54:12 +02:00
description = S("Admin Helmet"),
inventory_image = "3d_armor_inv_helmet_admin.png",
armor_groups = {fleshy=100},
groups = {armor_head=1, armor_heal=100, armor_use=0, armor_water=1,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
return
end,
})
armor:register_armor("3d_armor:chestplate_admin", {
2017-03-31 20:54:12 +02:00
description = S("Admin Chestplate"),
inventory_image = "3d_armor_inv_chestplate_admin.png",
armor_groups = {fleshy=100},
groups = {armor_torso=1, armor_heal=100, armor_use=0,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
return
end,
})
armor:register_armor("3d_armor:leggings_admin", {
2017-03-31 20:54:12 +02:00
description = S("Admin Leggings"),
inventory_image = "3d_armor_inv_leggings_admin.png",
armor_groups = {fleshy=100},
groups = {armor_legs=1, armor_heal=100, armor_use=0,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
return
end,
})
armor:register_armor("3d_armor:boots_admin", {
2017-03-31 20:54:12 +02:00
description = S("Admin Boots"),
inventory_image = "3d_armor_inv_boots_admin.png",
armor_groups = {fleshy=100},
groups = {armor_feet=1, armor_heal=100, armor_use=0,
not_in_creative_inventory=1},
on_drop = function(itemstack, dropper, pos)
2014-04-21 20:10:24 +02:00
return
end,
})
2013-06-22 20:31:57 +02:00
2017-03-18 18:23:50 +01:00
if armor.materials.wood then
armor:register_armor("3d_armor:helmet_wood", {
2017-03-31 20:54:12 +02:00
description = S("Wood Helmet"),
inventory_image = "3d_armor_inv_helmet_wood.png",
armor_groups = {fleshy=5},
groups = {armor_head=1, armor_heal=0, armor_use=2000},
})
armor:register_armor("3d_armor:chestplate_wood", {
2017-03-31 20:54:12 +02:00
description = S("Wood Chestplate"),
inventory_image = "3d_armor_inv_chestplate_wood.png",
armor_groups = {fleshy=10},
groups = {armor_torso=1, armor_heal=0, armor_use=2000},
})
armor:register_armor("3d_armor:leggings_wood", {
2017-03-31 20:54:12 +02:00
description = S("Wood Leggings"),
inventory_image = "3d_armor_inv_leggings_wood.png",
armor_groups = {fleshy=5},
groups = {armor_legs=1, armor_heal=0, armor_use=2000},
})
armor:register_armor("3d_armor:boots_wood", {
2017-03-31 20:54:12 +02:00
description = S("Wood Boots"),
inventory_image = "3d_armor_inv_boots_wood.png",
armor_groups = {fleshy=5},
groups = {armor_feet=1, armor_heal=0, armor_use=2000},
})
2013-06-22 20:31:57 +02:00
end
2017-03-18 18:23:50 +01:00
if armor.materials.cactus then
armor:register_armor("3d_armor:helmet_cactus", {
2017-03-31 20:54:12 +02:00
description = S("Cactus Helmet"),
inventory_image = "3d_armor_inv_helmet_cactus.png",
armor_groups = {fleshy=5},
groups = {armor_head=1, armor_heal=0, armor_use=1000},
})
armor:register_armor("3d_armor:chestplate_cactus", {
2017-03-31 20:54:12 +02:00
description = S("Cactus Chestplate"),
inventory_image = "3d_armor_inv_chestplate_cactus.png",
armor_groups = {fleshy=10},
groups = {armor_torso=1, armor_heal=0, armor_use=1000},
})
armor:register_armor("3d_armor:leggings_cactus", {
2017-03-31 20:54:12 +02:00
description = S("Cactus Leggings"),
inventory_image = "3d_armor_inv_leggings_cactus.png",
armor_groups = {fleshy=5},
groups = {armor_legs=1, armor_heal=0, armor_use=1000},
})
armor:register_armor("3d_armor:boots_cactus", {
2017-03-31 20:54:12 +02:00
description = S("Cactus Boots"),
inventory_image = "3d_armor_inv_boots_cactus.png",
armor_groups = {fleshy=5},
groups = {armor_feet=1, armor_heal=0, armor_use=1000},
})
end
2017-03-18 18:23:50 +01:00
if armor.materials.steel then
armor:register_armor("3d_armor:helmet_steel", {
2017-03-31 20:54:12 +02:00
description = S("Steel Helmet"),
inventory_image = "3d_armor_inv_helmet_steel.png",
armor_groups = {fleshy=10},
groups = {armor_head=1, armor_heal=0, armor_use=500},
})
armor:register_armor("3d_armor:chestplate_steel", {
2017-03-31 20:54:12 +02:00
description = S("Steel Chestplate"),
inventory_image = "3d_armor_inv_chestplate_steel.png",
armor_groups = {fleshy=15},
groups = {armor_torso=1, armor_heal=0, armor_use=500},
})
armor:register_armor("3d_armor:leggings_steel", {
2017-03-31 20:54:12 +02:00
description = S("Steel Leggings"),
inventory_image = "3d_armor_inv_leggings_steel.png",
armor_groups = {fleshy=15},
groups = {armor_legs=1, armor_heal=0, armor_use=500},
})
armor:register_armor("3d_armor:boots_steel", {
2017-03-31 20:54:12 +02:00
description = S("Steel Boots"),
inventory_image = "3d_armor_inv_boots_steel.png",
armor_groups = {fleshy=10},
groups = {armor_feet=1, armor_heal=0, armor_use=500},
})
end
2017-03-18 18:23:50 +01:00
if armor.materials.bronze then
armor:register_armor("3d_armor:helmet_bronze", {
2017-03-31 20:54:12 +02:00
description = S("Bronze Helmet"),
inventory_image = "3d_armor_inv_helmet_bronze.png",
armor_groups = {fleshy=10},
groups = {armor_head=1, armor_heal=6, armor_use=250},
})
armor:register_armor("3d_armor:chestplate_bronze", {
2017-03-31 20:54:12 +02:00
description = S("Bronze Chestplate"),
inventory_image = "3d_armor_inv_chestplate_bronze.png",
armor_groups = {fleshy=15},
groups = {armor_torso=1, armor_heal=6, armor_use=250},
})
armor:register_armor("3d_armor:leggings_bronze", {
2017-03-31 20:54:12 +02:00
description = S("Bronze Leggings"),
inventory_image = "3d_armor_inv_leggings_bronze.png",
armor_groups = {fleshy=15},
groups = {armor_legs=1, armor_heal=6, armor_use=250},
})
armor:register_armor("3d_armor:boots_bronze", {
2017-03-31 20:54:12 +02:00
description = S("Bronze Boots"),
inventory_image = "3d_armor_inv_boots_bronze.png",
armor_groups = {fleshy=10},
groups = {armor_feet=1, armor_heal=6, armor_use=250},
})
end
2017-03-18 18:23:50 +01:00
if armor.materials.diamond then
armor:register_armor("3d_armor:helmet_diamond", {
2017-03-31 20:54:12 +02:00
description = S("Diamond Helmet"),
inventory_image = "3d_armor_inv_helmet_diamond.png",
armor_groups = {fleshy=15},
groups = {armor_head=1, armor_heal=12, armor_use=100},
})
armor:register_armor("3d_armor:chestplate_diamond", {
2017-03-31 20:54:12 +02:00
description = S("Diamond Chestplate"),
inventory_image = "3d_armor_inv_chestplate_diamond.png",
armor_groups = {fleshy=20},
groups = {armor_torso=1, armor_heal=12, armor_use=100},
})
armor:register_armor("3d_armor:leggings_diamond", {
2017-03-31 20:54:12 +02:00
description = S("Diamond Leggings"),
inventory_image = "3d_armor_inv_leggings_diamond.png",
armor_groups = {fleshy=20},
groups = {armor_legs=1, armor_heal=12, armor_use=100},
})
armor:register_armor("3d_armor:boots_diamond", {
2017-03-31 20:54:12 +02:00
description = S("Diamond Boots"),
inventory_image = "3d_armor_inv_boots_diamond.png",
armor_groups = {fleshy=15},
groups = {armor_feet=1, armor_heal=12, armor_use=100},
})
end
2017-03-18 18:23:50 +01:00
if armor.materials.gold then
armor:register_armor("3d_armor:helmet_gold", {
2017-03-31 20:54:12 +02:00
description = S("Gold Helmet"),
inventory_image = "3d_armor_inv_helmet_gold.png",
armor_groups = {fleshy=10},
groups = {armor_head=1, armor_heal=6, armor_use=250},
})
armor:register_armor("3d_armor:chestplate_gold", {
2017-03-31 20:54:12 +02:00
description = S("Gold Chestplate"),
inventory_image = "3d_armor_inv_chestplate_gold.png",
armor_groups = {fleshy=15},
groups = {armor_torso=1, armor_heal=6, armor_use=250},
})
armor:register_armor("3d_armor:leggings_gold", {
2017-03-31 20:54:12 +02:00
description = S("Gold Leggings"),
inventory_image = "3d_armor_inv_leggings_gold.png",
armor_groups = {fleshy=15},
groups = {armor_legs=1, armor_heal=6, armor_use=250},
})
armor:register_armor("3d_armor:boots_gold", {
2017-03-31 20:54:12 +02:00
description = S("Gold Boots"),
inventory_image = "3d_armor_inv_boots_gold.png",
armor_groups = {fleshy=10},
groups = {armor_feet=1, armor_heal=6, armor_use=250},
})
end
2017-03-18 18:23:50 +01:00
if armor.materials.mithril then
armor:register_armor("3d_armor:helmet_mithril", {
2017-03-31 20:54:12 +02:00
description = S("Mithril Helmet"),
inventory_image = "3d_armor_inv_helmet_mithril.png",
armor_groups = {fleshy=15},
groups = {armor_head=1, armor_heal=12, armor_use=50},
})
armor:register_armor("3d_armor:chestplate_mithril", {
2017-03-31 20:54:12 +02:00
description = S("Mithril Chestplate"),
inventory_image = "3d_armor_inv_chestplate_mithril.png",
armor_groups = {fleshy=20},
groups = {armor_torso=1, armor_heal=12, armor_use=50},
})
armor:register_armor("3d_armor:leggings_mithril", {
2017-03-31 20:54:12 +02:00
description = S("Mithril Leggings"),
inventory_image = "3d_armor_inv_leggings_mithril.png",
armor_groups = {fleshy=20},
groups = {armor_legs=1, armor_heal=12, armor_use=50},
})
armor:register_armor("3d_armor:boots_mithril", {
2017-03-31 20:54:12 +02:00
description = S("Mithril Boots"),
inventory_image = "3d_armor_inv_boots_mithril.png",
armor_groups = {fleshy=15},
groups = {armor_feet=1, armor_heal=12, armor_use=50},
})
end
2017-03-18 18:23:50 +01:00
if armor.materials.crystal then
armor:register_armor("3d_armor:helmet_crystal", {
2017-03-31 20:54:12 +02:00
description = S("Crystal Helmet"),
inventory_image = "3d_armor_inv_helmet_crystal.png",
armor_groups = {fleshy=15},
groups = {armor_head=1, armor_heal=12, armor_use=50, armor_fire=1},
})
armor:register_armor("3d_armor:chestplate_crystal", {
2017-03-31 20:54:12 +02:00
description = S("Crystal Chestplate"),
inventory_image = "3d_armor_inv_chestplate_crystal.png",
armor_groups = {fleshy=20},
groups = {armor_torso=1, armor_heal=12, armor_use=50, armor_fire=1},
})
armor:register_armor("3d_armor:leggings_crystal", {
2017-03-31 20:54:12 +02:00
description = S("Crystal Leggings"),
inventory_image = "3d_armor_inv_leggings_crystal.png",
armor_groups = {fleshy=20},
groups = {armor_legs=1, armor_heal=12, armor_use=50, armor_fire=1},
})
armor:register_armor("3d_armor:boots_crystal", {
2017-03-31 20:54:12 +02:00
description = S("Crystal Boots"),
inventory_image = "3d_armor_inv_boots_crystal.png",
armor_groups = {fleshy=15},
groups = {armor_feet=1, armor_heal=12, armor_use=50, physics_speed=1,
physics_jump=0.5, armor_fire=1},
})
2014-04-08 23:03:01 +02:00
end
2017-03-18 18:23:50 +01:00
for k, v in pairs(armor.materials) do
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({
output = "3d_armor:boots_"..k,
recipe = {
{v, "", v},
{v, "", v},
},
})
end