Carbon Fiber and Iron armor for 3d_armor

This commit is contained in:
Evert Prants 2018-12-17 14:25:41 +02:00
parent 339043bbac
commit da4c295e7a
No known key found for this signature in database
GPG Key ID: 1688DA83D222D0B5
29 changed files with 135 additions and 1 deletions

@ -20,6 +20,7 @@ function elepm.register_craft_type(name, def)
if have_ui and unified_inventory.register_craft_type then
unified_inventory.register_craft_type(name, {
description = def.description or name,
icon = def.icon or "elepower_machine_side.png",
width = def.inputs or 2,
height = 1,
})
@ -28,7 +29,7 @@ function elepm.register_craft_type(name, def)
if have_cg then
craftguide.register_craft_type(name, {
description = def.description,
icon = def.icon or "elepower_alloy_furnace.png",
icon = def.icon or "elepower_machine_side.png",
width = def.inputs or 2,
})
end

126
elepower_tools/armor.lua Normal file

@ -0,0 +1,126 @@
local materials = {iron = "elepower_dynamics:iron_ingot", carbon = "elepower_dynamics:carbon_sheet"}
-- Iron Armor
armor:register_armor("elepower_tools:helmet_iron", {
description = "Iron Helmet",
inventory_image = "elepower_armor_inv_helmet.png",
texture = "elepower_armor_helmet.png",
preview = "elepower_armor_helmet_preview.png",
groups = {armor_head=1, armor_heal=0, armor_use=650,
physics_speed=-0.001, physics_gravity=0.001},
armor_groups = {fleshy=8},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
armor:register_armor("elepower_tools:chestplate_iron", {
description = "Iron Chestplate",
inventory_image = "elepower_armor_inv_chestplate.png",
texture = "elepower_armor_chestplate.png",
preview = "elepower_armor_chestplate_preview.png",
groups = {armor_torso=1, armor_heal=0, armor_use=650,
physics_speed=-0.03, physics_gravity=0.03},
armor_groups = {fleshy=13},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
armor:register_armor("elepower_tools:leggings_iron", {
description = "Iron Leggings",
inventory_image = "elepower_armor_inv_leggings.png",
texture = "elepower_armor_leggings.png",
preview = "elepower_armor_leggings_preview.png",
groups = {armor_legs=1, armor_heal=0, armor_use=650,
physics_speed=-0.02, physics_gravity=0.02},
armor_groups = {fleshy=13},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
armor:register_armor("elepower_tools:boots_iron", {
description = "Iron Boots",
inventory_image = "elepower_armor_inv_boots.png",
texture = "elepower_armor_boots.png",
preview = "elepower_armor_boots_preview.png",
groups = {armor_feet=1, armor_heal=0, armor_use=650,
physics_speed=-0.001, physics_gravity=0.001},
armor_groups = {fleshy=8},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
-- Carbon Fiber Armor
armor:register_armor("elepower_tools:helmet_carbon", {
description = "Carbon Fiber Helmet",
inventory_image = "elepower_armor_inv_helmet_carbon.png",
texture = "elepower_armor_helmet_carbon.png",
preview = "elepower_armor_helmet_carbon_preview.png",
groups = {armor_head=1, armor_heal=0, armor_use=2000,
physics_speed=0.01, physics_gravity=0.01},
armor_groups = {fleshy=9},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
armor:register_armor("elepower_tools:chestplate_carbon", {
description = "Carbon Fiber Chestplate",
inventory_image = "elepower_armor_inv_chestplate_carbon.png",
texture = "elepower_armor_chestplate_carbon.png",
preview = "elepower_armor_chestplate_carbon_preview.png",
groups = {armor_torso=1, armor_heal=0, armor_use=2000,
physics_speed=0.03, physics_gravity=0.03},
armor_groups = {fleshy=14},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
armor:register_armor("elepower_tools:leggings_carbon", {
description = "Carbon Fiber Leggings",
inventory_image = "elepower_armor_inv_leggings_carbon.png",
texture = "elepower_armor_leggings_carbon.png",
preview = "elepower_armor_leggings_carbon_preview.png",
groups = {armor_legs=1, armor_heal=0, armor_use=2000,
physics_speed=0.02, physics_gravity=0.02},
armor_groups = {fleshy=14},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
armor:register_armor("elepower_tools:boots_carbon", {
description = "Carbon Fiber Boots",
inventory_image = "elepower_armor_inv_boots_carbon.png",
texture = "elepower_armor_boots_carbon.png",
preview = "elepower_armor_boots_carbon_preview.png",
groups = {armor_feet=1, armor_heal=0, armor_use=2000,
physics_speed=0.01, physics_gravity=0.01},
armor_groups = {fleshy=9},
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
for k, v in pairs(materials) do
minetest.register_craft({
output = "elepower_tools:helmet_"..k,
recipe = {
{v, v, v},
{v, "", v},
{"", "", ""},
},
})
minetest.register_craft({
output = "elepower_tools:chestplate_"..k,
recipe = {
{v, "", v},
{v, v, v},
{v, v, v},
},
})
minetest.register_craft({
output = "elepower_tools:leggings_"..k,
recipe = {
{v, v, v},
{v, "", v},
{v, "", v},
},
})
minetest.register_craft({
output = "elepower_tools:boots_"..k,
recipe = {
{v, "", v},
{v, "", v},
},
})
end

@ -1,2 +1,3 @@
elepower_papi
elepower_farming
3d_armor?

@ -15,3 +15,8 @@ dofile(modpath .. "/soldering.lua")
-- Crafting
dofile(modpath .. "/craftitems.lua")
dofile(modpath .. "/crafting.lua")
-- Armor
if minetest.get_modpath("3d_armor") then
dofile(modpath .. "/armor.lua")
end

@ -1,3 +1,4 @@
name = elepower_tools
description = Elepower powered tools!
depends = elepower_papi,elepower_farming
optional_depends = 3d_armor

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB