Working on armors
1
init.lua
@ -65,3 +65,4 @@ dofile(path.."/nssm_materials.lua")
|
|||||||
dofile(path.."/nssm_spears.lua")
|
dofile(path.."/nssm_spears.lua")
|
||||||
dofile(path.."/nssm_api.lua")
|
dofile(path.."/nssm_api.lua")
|
||||||
dofile(path.."/nssm_weapons.lua")
|
dofile(path.."/nssm_weapons.lua")
|
||||||
|
--dofile(path.."/nssm_armor.lua")
|
113
nssm_armor.lua
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
if minetest.get_modpath("3d_armor") then
|
||||||
|
if minetest.get_modpath("nssm") then
|
||||||
|
local stats = {
|
||||||
|
wolf = {name="Werewolf", armor=1, heal=0, use=10, effect=mww},
|
||||||
|
white_wolf = {name="Werewolf", armor=1, heal=0, use=10, effect=www},
|
||||||
|
bloco = {name="Bloco", armor=1, heal=0, use=10, effect=bloc},
|
||||||
|
croco = {name="Crocodile", armor=1, heal=0, use=10, effect=croc},
|
||||||
|
ant = {name="", armor=1, heal=0, use=10, effect=bloc},
|
||||||
|
manticore = {name="", armor=1, heal=0, use=10, effect=mant},
|
||||||
|
--[[brass = { name="Brass", armor=1.8, heal=0, use=650 },
|
||||||
|
cast = { name="Cast Iron", armor=2.5, heal=8, use=200 },
|
||||||
|
carbon = { name="Carbon Steel", armor=2.7, heal=10, use=100 },
|
||||||
|
stainless = { name="Stainless Steel", armor=2.7, heal=10, use=75 },]]
|
||||||
|
}
|
||||||
|
local mats = {
|
||||||
|
wolf="nssm:wolf_fur",
|
||||||
|
white_wolf="nssm:white_wolf_fur",
|
||||||
|
bloco="nssm:bloco_skin",
|
||||||
|
croco="nssm:crocodile_skin",
|
||||||
|
ant="nssm:ant_esoskeleton",
|
||||||
|
manticore="nssm:manticore_fur",
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(stats) do
|
||||||
|
minetest.register_tool("nssm:helmet_"..k, {
|
||||||
|
description = v.name.." Helmet",
|
||||||
|
inventory_image = "inv_helmet_"..k..".png",
|
||||||
|
groups = {armor_head=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("nssm:chestplate_"..k, {
|
||||||
|
description = v.name.." Chestplate",
|
||||||
|
inventory_image = "inv_chestplate_"..k..".png",
|
||||||
|
groups = {armor_torso=math.floor(8*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("nssm:leggings_"..k, {
|
||||||
|
description = v.name.." Leggings",
|
||||||
|
inventory_image = "inv_leggings_"..k..".png",
|
||||||
|
groups = {armor_legs=math.floor(7*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
minetest.register_tool("nssm:boots_"..k, {
|
||||||
|
description = v.name.." Boots",
|
||||||
|
inventory_image = "inv_boots_"..k..".png",
|
||||||
|
groups = {armor_feet=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
for k, v in pairs(mats) do
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nssm:helmet_"..k,
|
||||||
|
recipe = {
|
||||||
|
{v, v, v},
|
||||||
|
{v, "", v},
|
||||||
|
{"", "", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nssm:chestplate_"..k,
|
||||||
|
recipe = {
|
||||||
|
{v, "", v},
|
||||||
|
{v, v, v},
|
||||||
|
{v, v, v},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nssm:leggings_"..k,
|
||||||
|
recipe = {
|
||||||
|
{v, v, v},
|
||||||
|
{v, "", v},
|
||||||
|
{v, "", v},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nssm:boots_"..k,
|
||||||
|
recipe = {
|
||||||
|
{v, "", v},
|
||||||
|
{v, "", v},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("shields") then
|
||||||
|
local stats = {
|
||||||
|
crab = {name="Crab", armor=1, heal=0, use=10},
|
||||||
|
ice_teeth ={name="Ice Teeth", armor=1, heal=0, use=10}
|
||||||
|
}
|
||||||
|
local mats = {
|
||||||
|
crab="nssm:crab_carapace",
|
||||||
|
ice_teeth="nssm:little_ice_tooth",
|
||||||
|
}
|
||||||
|
for a, b in pairs(stats) do
|
||||||
|
minetest.register_tool("nssm:shield_"..a, {
|
||||||
|
description = v.name.." Shield",
|
||||||
|
inventory_image = "inv_shield_"..a..".png",
|
||||||
|
groups = {armor_shield=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
|
wear = 0,
|
||||||
|
})
|
||||||
|
local m = mats[a]
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "nssm:shield_"..a,
|
||||||
|
recipe = {
|
||||||
|
{m, m, m},
|
||||||
|
{m, m, m},
|
||||||
|
{"", m, ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
BIN
textures/textures_armors/3d_armor_chestplate_snake.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/textures_armors/3d_armor_chestplate_snake_preview.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
textures/textures_armors/3d_armor_helmet_ant.png
Normal file
After Width: | Height: | Size: 458 B |
BIN
textures/textures_armors/3d_armor_inv_chestplate_snake.png
Normal file
After Width: | Height: | Size: 342 B |
BIN
textures/textures_armors/antboots.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
textures/textures_armors/antchestplate.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
textures/textures_armors/antleggins.png
Normal file
After Width: | Height: | Size: 327 B |
BIN
textures/textures_armors/blocoboots.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
textures/textures_armors/blocochestplate.png
Normal file
After Width: | Height: | Size: 828 B |
BIN
textures/textures_armors/blocohelm.png
Normal file
After Width: | Height: | Size: 743 B |
BIN
textures/textures_armors/blocoloeggins.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
textures/textures_armors/crab_shield.png
Normal file
After Width: | Height: | Size: 466 B |
BIN
textures/textures_armors/crab_shield_inv.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
textures/textures_armors/crocoboots.png
Normal file
After Width: | Height: | Size: 530 B |
BIN
textures/textures_armors/crocochestplate.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
textures/textures_armors/crocodile_helm.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
textures/textures_armors/crocoleggins.png
Normal file
After Width: | Height: | Size: 488 B |
BIN
textures/textures_armors/crown.png
Normal file
After Width: | Height: | Size: 891 B |
BIN
textures/textures_armors/crown_inv.png
Normal file
After Width: | Height: | Size: 529 B |
BIN
textures/textures_armors/ice_shield.png
Normal file
After Width: | Height: | Size: 783 B |
BIN
textures/textures_armors/ice_shield_inv.png
Normal file
After Width: | Height: | Size: 628 B |
BIN
textures/textures_armors/iceboots.png
Normal file
After Width: | Height: | Size: 692 B |
BIN
textures/textures_armors/icechestplate.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/textures_armors/icehelmet.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
textures/textures_armors/iceleggins.png
Normal file
After Width: | Height: | Size: 549 B |
BIN
textures/textures_armors/inv_boots_ant.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
textures/textures_armors/inv_boots_bloco.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
textures/textures_armors/inv_boots_croco.png
Normal file
After Width: | Height: | Size: 289 B |
BIN
textures/textures_armors/inv_boots_ice.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
textures/textures_armors/inv_boots_whitewolf.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
textures/textures_armors/inv_boots_wolf.png
Normal file
After Width: | Height: | Size: 287 B |
BIN
textures/textures_armors/inv_chestplate_ant.png
Normal file
After Width: | Height: | Size: 298 B |
BIN
textures/textures_armors/inv_chestplate_bloco.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
textures/textures_armors/inv_chestplate_croco.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
textures/textures_armors/inv_chestplate_ice.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
textures/textures_armors/inv_chestplate_whitewolf.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
textures/textures_armors/inv_chestplate_wolf.png
Normal file
After Width: | Height: | Size: 534 B |
BIN
textures/textures_armors/inv_helmet_ant.png
Normal file
After Width: | Height: | Size: 196 B |
BIN
textures/textures_armors/inv_helmet_bloco.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
textures/textures_armors/inv_helmet_croco.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
textures/textures_armors/inv_helmet_ice.png
Normal file
After Width: | Height: | Size: 617 B |
BIN
textures/textures_armors/inv_helmet_masticone.png
Normal file
After Width: | Height: | Size: 564 B |
BIN
textures/textures_armors/inv_helmet_masticone_crowned.png
Normal file
After Width: | Height: | Size: 549 B |
BIN
textures/textures_armors/inv_helmet_pumpking.png
Normal file
After Width: | Height: | Size: 463 B |
BIN
textures/textures_armors/inv_helmet_whitewolf.png
Normal file
After Width: | Height: | Size: 696 B |
BIN
textures/textures_armors/inv_helmet_wolf.png
Normal file
After Width: | Height: | Size: 670 B |
BIN
textures/textures_armors/inv_leggins_ant.png
Normal file
After Width: | Height: | Size: 238 B |
BIN
textures/textures_armors/inv_leggins_bloco.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
textures/textures_armors/inv_leggins_croco.png
Normal file
After Width: | Height: | Size: 447 B |
BIN
textures/textures_armors/inv_leggins_ice.png
Normal file
After Width: | Height: | Size: 611 B |
BIN
textures/textures_armors/inv_leggins_whitewolf.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
textures/textures_armors/inv_leggins_wolf.png
Normal file
After Width: | Height: | Size: 535 B |
BIN
textures/textures_armors/masticone_crowned.png
Normal file
After Width: | Height: | Size: 814 B |
BIN
textures/textures_armors/masticone_skull.png
Normal file
After Width: | Height: | Size: 809 B |
BIN
textures/textures_armors/prev_boots_ant.png
Normal file
After Width: | Height: | Size: 165 B |
BIN
textures/textures_armors/prev_boots_bloco.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
textures/textures_armors/prev_boots_croco.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
textures/textures_armors/prev_boots_ice.png
Normal file
After Width: | Height: | Size: 274 B |
BIN
textures/textures_armors/prev_boots_whitewolf.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
textures/textures_armors/prev_boots_wolf.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
textures/textures_armors/prev_chestplate_ant.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
textures/textures_armors/prev_chestplate_bloco.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
textures/textures_armors/prev_chestplate_croco.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
textures/textures_armors/prev_chestplate_ice.png
Normal file
After Width: | Height: | Size: 576 B |
BIN
textures/textures_armors/prev_chestplate_whitewolf.png
Normal file
After Width: | Height: | Size: 319 B |
BIN
textures/textures_armors/prev_chestplate_wolf.png
Normal file
After Width: | Height: | Size: 538 B |
BIN
textures/textures_armors/prev_crown.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
textures/textures_armors/prev_helmet_ant.png
Normal file
After Width: | Height: | Size: 216 B |
BIN
textures/textures_armors/prev_helmet_bloco.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
textures/textures_armors/prev_helmet_croco.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
textures/textures_armors/prev_helmet_ice.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
textures/textures_armors/prev_helmet_masticone.png
Normal file
After Width: | Height: | Size: 375 B |
BIN
textures/textures_armors/prev_helmet_masticone_crowned.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
textures/textures_armors/prev_helmet_pumpking.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
textures/textures_armors/prev_helmet_whitewolf.png
Normal file
After Width: | Height: | Size: 413 B |
BIN
textures/textures_armors/prev_helmet_wolf.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
textures/textures_armors/prev_leggins_ant.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
textures/textures_armors/prev_leggins_bloco.png
Normal file
After Width: | Height: | Size: 295 B |
BIN
textures/textures_armors/prev_leggins_croco.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
textures/textures_armors/prev_leggins_ice.png
Normal file
After Width: | Height: | Size: 365 B |
BIN
textures/textures_armors/prev_leggins_whitewolf.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
textures/textures_armors/prev_leggins_wolf.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
textures/textures_armors/prev_shield_crab.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
textures/textures_armors/prev_shield_ice.png
Normal file
After Width: | Height: | Size: 560 B |
BIN
textures/textures_armors/pumpking_helmet.png
Normal file
After Width: | Height: | Size: 691 B |
BIN
textures/textures_armors/white_wolf_helmet.png
Normal file
After Width: | Height: | Size: 888 B |
BIN
textures/textures_armors/whitewofleggins.png
Normal file
After Width: | Height: | Size: 432 B |
BIN
textures/textures_armors/whitewolfboots.png
Normal file
After Width: | Height: | Size: 664 B |
BIN
textures/textures_armors/whitewolfchestplate.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
textures/textures_armors/wolf_helmet.png
Normal file
After Width: | Height: | Size: 895 B |
BIN
textures/textures_armors/wolfboots.png
Normal file
After Width: | Height: | Size: 659 B |
BIN
textures/textures_armors/wolfchestplate.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/textures_armors/wolfleggins.png
Normal file
After Width: | Height: | Size: 586 B |