[3d_armor] Remove technic's armor data
@ -1,9 +0,0 @@
|
|||||||
[mod] Technic Armor [technic_armor]
|
|
||||||
===================================
|
|
||||||
|
|
||||||
Adds tin, silver and technic materials to 3d_armor.
|
|
||||||
Requires technic (technic_worldgen at least) mod.
|
|
||||||
|
|
||||||
Depends: 3d_armor, technic_worldgen
|
|
||||||
|
|
||||||
Source code and textures by poet.nohit and numzero
|
|
@ -1,3 +0,0 @@
|
|||||||
3d_armor
|
|
||||||
technic_worldgen
|
|
||||||
moreores?
|
|
@ -1 +0,0 @@
|
|||||||
Adds tin, silver and technic materials to 3d_armor.
|
|
@ -1,56 +0,0 @@
|
|||||||
local stats = {
|
|
||||||
lead = { name="Lead", material="technic:lead_ingot", armor=1.6, heal=0, use=500, radiation=80*1.1 },
|
|
||||||
brass = { name="Brass", material="technic:brass_ingot", armor=1.8, heal=0, use=650, radiation=43 },
|
|
||||||
cast = { name="Cast Iron", material="technic:cast_iron_ingot", armor=2.5, heal=8, use=200, radiation=40 },
|
|
||||||
carbon = { name="Carbon Steel", material="technic:carbon_steel_ingot", armor=2.7, heal=10, use=100, radiation=40 },
|
|
||||||
stainless = { name="Stainless Steel", material="technic:stainless_steel_ingot", armor=2.7, heal=10, use=75, radiation=40 },
|
|
||||||
}
|
|
||||||
if minetest.get_modpath("moreores") then
|
|
||||||
stats.tin = { name="Tin", material="moreores:tin_ingot", armor=1.6, heal=0, use=750, radiation=37 }
|
|
||||||
stats.silver = { name="Silver", material="moreores:silver_ingot", armor=1.8, heal=6, use=650, radiation=53 }
|
|
||||||
end
|
|
||||||
|
|
||||||
local parts = {
|
|
||||||
helmet = { place="head", name="Helmet", level=5, radlevel = 0.10, craft={{1,1,1},{1,0,1}} },
|
|
||||||
chestplate = { place="torso", name="Chestplate", level=8, radlevel = 0.35, craft={{1,0,1},{1,1,1},{1,1,1}} },
|
|
||||||
leggings = { place="legs", name="Leggings", level=7, radlevel = 0.15, craft={{1,1,1},{1,0,1},{1,0,1}} },
|
|
||||||
boots = { place="feet", name="Boots", level=4, radlevel = 0.10, craft={{1,0,1},{1,0,1}} },
|
|
||||||
}
|
|
||||||
if minetest.get_modpath("shields") then
|
|
||||||
parts.shield = { place="shield", name="Shield", level=5, radlevel=0.00, craft={{1,1,1},{1,1,1},{0,1,0}} }
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Makes a craft recipe based on a template
|
|
||||||
-- template is a recipe-like table but indices are used instead of actual item names:
|
|
||||||
-- 0 means nothing, everything else is treated as an index in the materials table
|
|
||||||
local function make_recipe(template, materials)
|
|
||||||
local recipe = {}
|
|
||||||
for j, trow in ipairs(template) do
|
|
||||||
local rrow = {}
|
|
||||||
for i, tcell in ipairs(trow) do
|
|
||||||
if tcell == 0 then
|
|
||||||
rrow[i] = ""
|
|
||||||
else
|
|
||||||
rrow[i] = materials[tcell]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
recipe[j] = rrow
|
|
||||||
end
|
|
||||||
return recipe
|
|
||||||
end
|
|
||||||
|
|
||||||
for key, armor in pairs(stats) do
|
|
||||||
for partkey, part in pairs(parts) do
|
|
||||||
local partname = "technic_armor:"..partkey.."_"..key
|
|
||||||
minetest.register_tool(partname, {
|
|
||||||
description = armor.name.." "..part.name,
|
|
||||||
inventory_image = "technic_armor_inv_"..partkey.."_"..key..".png",
|
|
||||||
groups = {["armor_"..part.place]=math.floor(part.level*armor.armor), armor_heal=armor.heal, armor_use=armor.use, armor_radiation=math.floor(part.radlevel*armor.radiation)},
|
|
||||||
wear = 0,
|
|
||||||
})
|
|
||||||
minetest.register_craft({
|
|
||||||
output = partname,
|
|
||||||
recipe = make_recipe(part.craft, {armor.material}),
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 464 B |
Before Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 476 B |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 490 B |
Before Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 538 B |
Before Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 624 B |