From 9cc2f3db02eaef63d875d593a148e478dc725ae5 Mon Sep 17 00:00:00 2001 From: number Zero Date: Sun, 10 Apr 2016 17:56:33 +0300 Subject: [PATCH] Radiation protection support added --- 3d_armor/armor.conf.example | 4 + 3d_armor/armor.lua | 14 +- README.md | 13 +- hazmat_suit/README.txt | 10 ++ hazmat_suit/depends.txt | 2 + hazmat_suit/description.txt | 1 + hazmat_suit/init.lua | 126 +++++++++++++++ .../textures/hazmat_suit_inv_boots_hazmat.png | Bin 0 -> 198 bytes .../hazmat_suit_inv_chestplate_hazmat.png | Bin 0 -> 160 bytes .../hazmat_suit_inv_helmet_hazmat.png | Bin 0 -> 248 bytes .../hazmat_suit_inv_leggings_hazmat.png | Bin 0 -> 189 bytes .../hazmat_suit_inv_sleeve_hazmat.png | Bin 0 -> 189 bytes .../textures/hazmat_suit_inv_suit_hazmat.png | Bin 0 -> 302 bytes .../textures/hazmat_suit_suit_hazmat.png | Bin 0 -> 792 bytes .../hazmat_suit_suit_hazmat_preview.png | Bin 0 -> 1005 bytes technic_armor/README.txt | 6 +- technic_armor/depends.txt | 2 + technic_armor/init.lua | 153 +++++++----------- .../textures/technic_armor_boots_lead.png | Bin 0 -> 499 bytes .../technic_armor_boots_lead_preview.png | Bin 0 -> 423 bytes .../technic_armor_chestplate_lead.png | Bin 0 -> 1419 bytes .../technic_armor_chestplate_lead_preview.png | Bin 0 -> 936 bytes .../textures/technic_armor_helmet_lead.png | Bin 0 -> 868 bytes .../technic_armor_helmet_lead_preview.png | Bin 0 -> 430 bytes .../textures/technic_armor_inv_boots_lead.png | Bin 0 -> 268 bytes .../technic_armor_inv_chestplate_lead.png | Bin 0 -> 361 bytes .../technic_armor_inv_helmet_lead.png | Bin 0 -> 293 bytes .../technic_armor_inv_leggings_lead.png | Bin 0 -> 287 bytes .../technic_armor_inv_shield_lead.png | Bin 0 -> 707 bytes .../textures/technic_armor_leggings_lead.png | Bin 0 -> 586 bytes .../technic_armor_leggings_lead_preview.png | Bin 0 -> 535 bytes .../textures/technic_armor_shield_lead.png | Bin 0 -> 740 bytes .../technic_armor_shield_lead_preview.png | Bin 0 -> 1146 bytes 33 files changed, 224 insertions(+), 107 deletions(-) create mode 100644 hazmat_suit/README.txt create mode 100644 hazmat_suit/depends.txt create mode 100644 hazmat_suit/description.txt create mode 100644 hazmat_suit/init.lua create mode 100644 hazmat_suit/textures/hazmat_suit_inv_boots_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_inv_chestplate_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_inv_helmet_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_inv_leggings_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_inv_sleeve_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_inv_suit_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_suit_hazmat.png create mode 100644 hazmat_suit/textures/hazmat_suit_suit_hazmat_preview.png create mode 100644 technic_armor/textures/technic_armor_boots_lead.png create mode 100644 technic_armor/textures/technic_armor_boots_lead_preview.png create mode 100644 technic_armor/textures/technic_armor_chestplate_lead.png create mode 100644 technic_armor/textures/technic_armor_chestplate_lead_preview.png create mode 100644 technic_armor/textures/technic_armor_helmet_lead.png create mode 100644 technic_armor/textures/technic_armor_helmet_lead_preview.png create mode 100644 technic_armor/textures/technic_armor_inv_boots_lead.png create mode 100644 technic_armor/textures/technic_armor_inv_chestplate_lead.png create mode 100644 technic_armor/textures/technic_armor_inv_helmet_lead.png create mode 100644 technic_armor/textures/technic_armor_inv_leggings_lead.png create mode 100644 technic_armor/textures/technic_armor_inv_shield_lead.png create mode 100644 technic_armor/textures/technic_armor_leggings_lead.png create mode 100644 technic_armor/textures/technic_armor_leggings_lead_preview.png create mode 100644 technic_armor/textures/technic_armor_shield_lead.png create mode 100644 technic_armor/textures/technic_armor_shield_lead_preview.png diff --git a/3d_armor/armor.conf.example b/3d_armor/armor.conf.example index c6122c5..75e072d 100644 --- a/3d_armor/armor.conf.example +++ b/3d_armor/armor.conf.example @@ -55,3 +55,7 @@ ARMOR_LEVEL_MULTIPLIER = 1 -- eg: ARMOR_HEAL_MULTIPLIER = 0 will disable healing altogether. ARMOR_HEAL_MULTIPLIER = 1 +-- You can use this to increase or decrease overall armor radiation protection, +-- eg: ARMOR_RADIATION_MULTIPLIER = 0 will completely disable radiation protection. +-- Note: patched technic mod is required +ARMOR_RADIATION_MULTIPLIER = 1 diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 1b733d8..cf4de66 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -6,6 +6,7 @@ ARMOR_DROP = minetest.get_modpath("bones") ~= nil ARMOR_DESTROY = false ARMOR_LEVEL_MULTIPLIER = 1 ARMOR_HEAL_MULTIPLIER = 1 +ARMOR_RADIATION_MULTIPLIER = 1 ARMOR_MATERIALS = { wood = "group:wood", cactus = "default:cactus", @@ -18,8 +19,8 @@ ARMOR_MATERIALS = { } ARMOR_FIRE_PROTECT = minetest.get_modpath("ethereal") ~= nil ARMOR_FIRE_NODES = { - {"default:lava_source", 5, 4}, - {"default:lava_flowing", 5, 4}, + {"default:lava_source", 5, 8}, + {"default:lava_flowing", 5, 8}, {"fire:basic_flame", 3, 4}, {"fire:permanent_flame", 3, 4}, {"ethereal:crystal_spike", 2, 1}, @@ -73,6 +74,7 @@ if minetest.get_modpath("inventory_plus") then .."label[5,1;Level: armor_level]" .."label[5,1.5;Heal: armor_heal]" .."label[5,2;Fire: armor_fire]" + .."label[5,2.5;Radiation: armor_radiation]" .."list[current_player;main;0,4.5;8,4;]" if minetest.get_modpath("crafting") then inventory_plus.get_formspec = function(player, page) @@ -95,6 +97,7 @@ elseif minetest.get_modpath("unified_inventory") then .."label[5.0,"..(fy + 0.0)..";Level: "..armor.def[name].level.."]" .."label[5.0,"..(fy + 0.5)..";Heal: "..armor.def[name].heal.."]" .."label[5.0,"..(fy + 1.0)..";Fire: "..armor.def[name].fire.."]" + .."label[5.0,"..(fy + 1.5)..";Radiation: "..armor.def[name].radiation.."]" .."listring[current_player;main]" .."listring[detached:"..name.."_armor;armor]" return {formspec=formspec} @@ -143,6 +146,7 @@ armor.set_player_armor = function(self, player) local armor_heal = 0 local armor_fire = 0 local armor_water = 0 + local armor_radiation = 0 local state = 0 local items = 0 local elements = {} @@ -171,6 +175,7 @@ armor.set_player_armor = function(self, player) armor_heal = armor_heal + (def.groups["armor_heal"] or 0) armor_fire = armor_fire + (def.groups["armor_fire"] or 0) armor_water = armor_water + (def.groups["armor_water"] or 0) + armor_radiation = armor_radiation + (def.groups["armor_radiation"] or 0) for kk,vv in ipairs(self.physics) do local o_value = def.groups["physics_"..vv] if o_value then @@ -199,6 +204,7 @@ armor.set_player_armor = function(self, player) end armor_level = armor_level * ARMOR_LEVEL_MULTIPLIER armor_heal = armor_heal * ARMOR_HEAL_MULTIPLIER + armor_radiation = armor_radiation * ARMOR_RADIATION_MULTIPLIER if #textures > 0 then armor_texture = table.concat(textures, "^") end @@ -206,6 +212,7 @@ armor.set_player_armor = function(self, player) if armor_level > 0 then armor_groups.level = math.floor(armor_level / 20) armor_groups.fleshy = 100 - armor_level + armor_groups.radiation = 100 - armor_radiation end player:set_armor_groups(armor_groups) player:set_physics_override(physics_o) @@ -220,6 +227,7 @@ armor.set_player_armor = function(self, player) self.def[name].gravity = physics_o.gravity self.def[name].fire = armor_fire self.def[name].water = armor_water + self.def[name].radiation = armor_radiation self:update_player_visuals(player) end @@ -260,6 +268,7 @@ armor.get_armor_formspec = function(self, name) formspec = formspec:gsub("armor_level", armor.def[name].level) formspec = formspec:gsub("armor_heal", armor.def[name].heal) formspec = formspec:gsub("armor_fire", armor.def[name].fire) + formspec = formspec:gsub("armor_radiation", armor.def[name].radiation) return formspec end @@ -408,6 +417,7 @@ minetest.register_on_joinplayer(function(player) gravity = 1, fire = 0, water = 0, + radiation = 0, } armor.textures[name] = { skin = armor.default_skin..".png", diff --git a/README.md b/README.md index 22c86a5..54548bf 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,18 @@ If you do not want shields then simply remove the shields folder from the modpac [mod] Technic Armor [technic_armor] ----------------------------------- -Depends: 3d_armor +Depends: 3d_armor, technic_worldgen Adds tin, silver and technic materials to 3d_armor. -Requires technic mod to be installed for craft registration. +Requires technic (technic_worldgen at least) mod. + +[mod] Hazmat Suit [hazmat_suit] +------------------------------- + +Depends: 3d_armor, technic + +Adds hazmat suit to 3d_armor. It protects rather well from fire (if enabled in configuration) and radiation, and it has built-in oxygen supply. +Requires technic mod. [mod] 3d Armor Stand [3d_armor_stand] ------------------------------------- @@ -58,4 +66,3 @@ Requires technic mod to be installed for craft registration. Depends: 3d_armor Adds a chest-like armor stand for armor storage and display. - diff --git a/hazmat_suit/README.txt b/hazmat_suit/README.txt new file mode 100644 index 0000000..eb61e26 --- /dev/null +++ b/hazmat_suit/README.txt @@ -0,0 +1,10 @@ +[mod] Hazmat Suit [hazmat_suit] +=================================== + +Adds hazmat suit to 3d_armor. It protects rather well from fire (if enabled in configuration) and radiation, and it has built-in oxygen supply. +Requires technic mod. + +Depends: 3d_armor, technic + +Source code by numZero +Textures by HybridDog and numZero diff --git a/hazmat_suit/depends.txt b/hazmat_suit/depends.txt new file mode 100644 index 0000000..c83abc0 --- /dev/null +++ b/hazmat_suit/depends.txt @@ -0,0 +1,2 @@ +3d_armor +technic diff --git a/hazmat_suit/description.txt b/hazmat_suit/description.txt new file mode 100644 index 0000000..bba80d0 --- /dev/null +++ b/hazmat_suit/description.txt @@ -0,0 +1 @@ +Adds hazmat suit (protects from water, fire and radiation) to 3d_armor. diff --git a/hazmat_suit/init.lua b/hazmat_suit/init.lua new file mode 100644 index 0000000..36eb621 --- /dev/null +++ b/hazmat_suit/init.lua @@ -0,0 +1,126 @@ +local part_count = 4 + +local level = 35 +local heal = 20 +local use = 1000 +local fire = 4 +local water = 1 +local radiation = 50 + +if minetest.get_modpath("shields") then + level = level / 0.9 +end + +if count == #armor.elements then + level = level / 1.1 +end + +level = math.floor(level / part_count) +heal = math.floor(heal / part_count) +fire = math.floor(fire / part_count) +radiation = math.floor(radiation / part_count) + +minetest.register_craftitem("hazmat_suit:helmet_hazmat", { + description = "Hazmat Helmet", + inventory_image = "hazmat_suit_inv_helmet_hazmat.png", + stack_max = 1, +}) + +minetest.register_craftitem("hazmat_suit:chestplate_hazmat", { + description = "Hazmat Chestplate", + inventory_image = "hazmat_suit_inv_chestplate_hazmat.png", + stack_max = 1, +}) + +minetest.register_craftitem("hazmat_suit:sleeve_hazmat", { + description = "Hazmat Sleeve", + inventory_image = "hazmat_suit_inv_sleeve_hazmat.png", + stack_max = 1, +}) + +minetest.register_craftitem("hazmat_suit:leggings_hazmat", { + description = "Hazmat Leggins", + inventory_image = "hazmat_suit_inv_leggings_hazmat.png", + stack_max = 1, +}) + +minetest.register_craftitem("hazmat_suit:boots_hazmat", { + description = "Hazmat Boots", + inventory_image = "hazmat_suit_inv_boots_hazmat.png", + stack_max = 1, +}) + +minetest.register_tool("hazmat_suit:suit_hazmat", { + description = "Hazmat Suit", + inventory_image = "hazmat_suit_inv_suit_hazmat.png", + groups = { + armor_head = level, + armor_torso = level, + armor_legs = level, + armor_feet = level, + armor_heal = heal, + armor_use = use, + armor_fire = fire, + armor_water = water, + armor_radiation = radiation, + }, + wear = 0, +}) + +minetest.register_craft({ + output = "hazmat_suit:helmet_hazmat", + recipe = { + {"", "technic:stainless_steel_ingot", ""}, + {"technic:stainless_steel_ingot", "default:glass", "technic:stainless_steel_ingot"}, + {"technic:rubber", "technic:rubber", "technic:rubber"}, + }, +}) + +minetest.register_craft({ + output = "hazmat_suit:chestplate_hazmat", + recipe = { + {"technic:lead_ingot", "dye:yellow", "technic:lead_ingot"}, + {"technic:stainless_steel_ingot", "technic:lead_ingot", "technic:stainless_steel_ingot"}, + {"technic:lead_ingot", "technic:stainless_steel_ingot", "technic:lead_ingot"}, + }, +}) + +minetest.register_craft({ + output = "hazmat_suit:sleeve_hazmat", + recipe = { + {"technic:rubber", "dye:yellow"}, + {"", "technic:stainless_steel_ingot"}, + {"", "technic:rubber"}, + }, +}) + +minetest.register_craft({ + output = "hazmat_suit:leggings_hazmat", + recipe = { + {"technic:rubber", "technic:lead_ingot", "technic:rubber"}, + {"technic:stainless_steel_ingot", "technic:rubber", "technic:stainless_steel_ingot"}, + {"technic:lead_ingot", "", "technic:lead_ingot"}, + }, +}) + +minetest.register_craft({ + output = "hazmat_suit:boots_hazmat", + recipe = { + {"", "", ""}, + {"technic:rubber", "", "technic:rubber"}, + {"technic:stainless_steel_ingot", "", "technic:stainless_steel_ingot"}, + }, +}) + +minetest.register_craft({ + output = "hazmat_suit:suit_hazmat", + type = "shapeless", + recipe = { + "hazmat_suit:helmet_hazmat", + "hazmat_suit:chestplate_hazmat", + "hazmat_suit:leggings_hazmat", + "hazmat_suit:boots_hazmat", + "hazmat_suit:sleeve_hazmat", + "hazmat_suit:sleeve_hazmat", + }, +}) diff --git a/hazmat_suit/textures/hazmat_suit_inv_boots_hazmat.png b/hazmat_suit/textures/hazmat_suit_inv_boots_hazmat.png new file mode 100644 index 0000000000000000000000000000000000000000..5f737e7c24847668986a1627bbd0f5761441a9fa GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHVEbxddW?DoV@XL#AbIA@nUues{Xik6k|4ie28Oc9XDxs{ z#w2fd7iK{opHD!JzNd?02*>s0gagbHQ&}XYIPjDoW1F!2yIVwojI^}0nKNes*|`@V#R275N`m}? zfi%PB$!W8I6l0RNy9-Ny#?3$=C(P5uF@)oKa>4<&n3x4ysySyI4dP?rOK9unp7Ag) zDd$ZbQ<86fq)3XmY+hvvavFoDtDnm{r-UW|7r8~^ literal 0 HcmV?d00001 diff --git a/hazmat_suit/textures/hazmat_suit_inv_leggings_hazmat.png b/hazmat_suit/textures/hazmat_suit_inv_leggings_hazmat.png new file mode 100644 index 0000000000000000000000000000000000000000..1ca9d253e5aaeadc5caec794ea4b851093ecd3bc GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#K8Lt~v1s@tCNZE8Pk>K|E08ueHa@;c`0f_bIr75!Kt5whkY6x^!?PP{AWo9E zy9?ugCf$2Lj+Up3V+hCfFU$Y{ literal 0 HcmV?d00001 diff --git a/hazmat_suit/textures/hazmat_suit_inv_sleeve_hazmat.png b/hazmat_suit/textures/hazmat_suit_inv_sleeve_hazmat.png new file mode 100644 index 0000000000000000000000000000000000000000..0503bb0509e6343d58b149ce0d5f1d62fa30fb81 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`>?NMQuIvw3xOmmH0tEEbfkK6z zE{-7*qJr9yBS7pDr?80aNjBRom&XUB j8_ap;*;XGj_`%4qrAz9Nlgr;$pydpnu6{1-oD!M z4j2wEkZ;le0081iL_t(I%dL|!4uU`wL?4ED01YNk(0GKcyn~emrB|@DB$oCz#Lm*f z$|IOqaRd@W0f|NqV2o>_5G5Z$<5as-{GFLUYak%nT3X`!!;?|wT6}=#yLi6K*NC>3 zR!S8rlv27%mHBCqZQHu;F+=ix%x?5LtwR2K78hJO3$yGQU@Huk)8sdQRMvmF7uqL&z zwu!H~RH1f2uA)(qUaKqdVHh_5OhFKc=f5ks1HRu+squ%W7XSbN07*qoM6N<$f`!+9 AlK=n! literal 0 HcmV?d00001 diff --git a/hazmat_suit/textures/hazmat_suit_suit_hazmat.png b/hazmat_suit/textures/hazmat_suit_suit_hazmat.png new file mode 100644 index 0000000000000000000000000000000000000000..97311fec578abf4a042496906013c77317582011 GIT binary patch literal 792 zcmV+z1LypSP) z4Iwb%GeMdF00PWOL_t(&-tAbuZrd;rJ{dwEAcX_igO@(St(h{{1=0eVx<;>%QOM{= zusjs#n4twMKZ1cSz9%TWWUv7T@BXDaM21l2VGzFtlz#Zzp(2bKK*R}3QVWdTF;&;z8$>ap?P=0x8# z1j#!tH?0d#M1c@O1VO;=Q;s2`P_4nlkF%c603q&_oDR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yz+`njxgN@xNAP1AJF literal 0 HcmV?d00001 diff --git a/technic_armor/README.txt b/technic_armor/README.txt index 7876af0..93038e9 100644 --- a/technic_armor/README.txt +++ b/technic_armor/README.txt @@ -2,8 +2,8 @@ =================================== Adds tin, silver and technic materials to 3d_armor. -Requires technic mod to be installed for craft registration. +Requires technic (technic_worldgen at least) mod. -Depends: 3d_armor +Depends: 3d_armor, technic_worldgen -Source code and textures by poet.nohit +Source code and textures by poet.nohit and numzero diff --git a/technic_armor/depends.txt b/technic_armor/depends.txt index b6cac21..2546a84 100644 --- a/technic_armor/depends.txt +++ b/technic_armor/depends.txt @@ -1 +1,3 @@ 3d_armor +technic_worldgen +moreores? diff --git a/technic_armor/init.lua b/technic_armor/init.lua index a48e876..e1a663d 100644 --- a/technic_armor/init.lua +++ b/technic_armor/init.lua @@ -1,101 +1,56 @@ -if minetest.get_modpath("technic") then - local stats = { - 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 = { - brass="technic:brass_ingot", - cast="technic:cast_iron_ingot", - carbon="technic:carbon_steel_ingot", - stainless="technic:stainless_steel_ingot", - } - if minetest.get_modpath("moreores") then - stats.tin = { name="Tin", armor=1.6, heal=0, use=750 } - stats.silver = { name="Silver", armor=1.8, heal=6, use=650 } - mats.tin = "moreores:tin_ingot" - mats.silver = "moreores:silver_ingot" - end - - for k, v in pairs(stats) do - minetest.register_tool("technic_armor:helmet_"..k, { - description = v.name.." Helmet", - inventory_image = "technic_armor_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("technic_armor:chestplate_"..k, { - description = v.name.." Chestplate", - inventory_image = "technic_armor_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("technic_armor:leggings_"..k, { - description = v.name.." Leggings", - inventory_image = "technic_armor_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("technic_armor:boots_"..k, { - description = v.name.." Boots", - inventory_image = "technic_armor_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 = "technic_armor:helmet_"..k, - recipe = { - {v, v, v}, - {v, "", v}, - {"", "", ""}, - }, - }) - minetest.register_craft({ - output = "technic_armor:chestplate_"..k, - recipe = { - {v, "", v}, - {v, v, v}, - {v, v, v}, - }, - }) - minetest.register_craft({ - output = "technic_armor:leggings_"..k, - recipe = { - {v, v, v}, - {v, "", v}, - {v, "", v}, - }, - }) - minetest.register_craft({ - output = "technic_armor:boots_"..k, - recipe = { - {v, "", v}, - {v, "", v}, - }, - }) - end - - if minetest.get_modpath("shields") then - for k, v in pairs(stats) do - minetest.register_tool("technic_armor:shield_"..k, { - description = v.name.." Shield", - inventory_image = "technic_armor_inv_shield_"..k..".png", - groups = {armor_shield=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use}, - wear = 0, - }) - local m = mats[k] - minetest.register_craft({ - output = "technic_armor:shield_"..k, - recipe = { - {m, m, m}, - {m, m, m}, - {"", m, ""}, - }, - }) - end - end +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 diff --git a/technic_armor/textures/technic_armor_boots_lead.png b/technic_armor/textures/technic_armor_boots_lead.png new file mode 100644 index 0000000000000000000000000000000000000000..a809e62353c4b76d5f28e3ad58b0edaa1504440e GIT binary patch literal 499 zcmV z3pf_9vk}bz00E~-L_t(&-tE@0%Hlv2hT+#3|3pEJ5D`VeMsL8z%F5OYunehew6gI6 z>}>743{mg`#5Q0hrVt_#K@hQ1&KAqMyZmftq3%4@FvY+*GxN>B^9dl)XjF>D;$!@4 zo=;~OhV=V=IUEj;qDP~Vv|6o~Y=HLc1+&>K$Kw&pvaoF%fa!F~cDv<&A%JL_CZ=ir zdGsZbNPONEuq^9QaJ5>MbUOW4(SXF`@o#gVlnF8%4y9hNKZ^1^PX>d508%QIq}S_7 zr_+&0BqD$~jw7?#>?IoTlnk(KoB4bWK%r2eQmGJ&#Q@mv_pH}z#^W)jX#!xHCXGhp zC3a7L#v(xwu-R+?IG@irj>B%Z1K@tYvsf$$!w^mT+3$9{O}E=c*L7~U+xs`bvMg4s z6#&=km1eU^DwQG(Lww(7xm@CT9?4{q>-Ea%bi#FACX>ngKZEIX8rO9(4C8kwh_Kym zxm+#)_`XlARwE2UVzC%O5U|_r$mMeHpMaT6M!vqjMA!9i39o6IUGWFY_m002ovPDHLkV1fgY>)`+Z literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_boots_lead_preview.png b/technic_armor/textures/technic_armor_boots_lead_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..a6e7690e73f8e6c7383aa991edf780feb48423c5 GIT binary patch literal 423 zcmeAS@N?(olHy`uVBq!ia0vp^4Gav73><7gR`t)iROwe0n-wzA76t!4ek56gnhZeV~|)bRat;eS5ANfDbPr?r;- x-nairuYQ-(mfPFT<}(R0Fu|PCz`*dMJ3e=oa`@gSw$m7Zz|+;wWt~$(699k5d|Chi literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_chestplate_lead.png b/technic_armor/textures/technic_armor_chestplate_lead.png new file mode 100644 index 0000000000000000000000000000000000000000..8b91c7e9862ab09639a413130f68127fcc1eb153 GIT binary patch literal 1419 zcmV;61$6p}P) z3pxaDJOT#*00louL_t(&-tCu7NK|bU$A5R`&i9u&&WvM_MYEiu56o%`2@0YJj7e8v zZ7ML^w9tq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V*pfCR3IX(S+fR%!9X+`<>}L>Boc{yg^wRUj;3k6dGm%)C`5O6H{;{u zynFYKU@(ZPs_1mOx!(cB#l;*vc#w@7H=@(&&@_!~Hp{tl=g{eN^!N93=FAylu^2r) zJ!G?4HgDcce}8|zBZh~E>Fev`*s){Wy?Yl$QE<6jm`o

Ga$dU~FuRJ$v@BWXTea z9z6=c&6_s~27{PPCc3-3S+r;onx0pu zjmgQ$Sx^3td4G?`^OLPLo6TY{81h!w=ktl%?ap8Kcs!!h>BM5O{A6LLevPNr4~sji Z`~^I@dP0joqGbR8002ovPDHLkV1oYexoQ9a literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_chestplate_lead_preview.png b/technic_armor/textures/technic_armor_chestplate_lead_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..8429cbce837b7a035b43809a02cc9f96a503bb1a GIT binary patch literal 936 zcmeAS@N?(olHy`uVBq!ia0vp^4Gav73><7gR`t)igxo`uqPaOEu`;g7UHrf$kU^SWvi3B%VF`0Su3VkN%dana8h(! zd_h5F(F9S}k3uKcUA;5=&J(r&%93}^ezkd<-+uC3{`s_XXXdP3#RRkrAK0|&-+}B? zfj92mlgs<_2i;y<~PpwWfWmxbzlr&5MlVtP(Po&UHy``xA((u>FMc-`!;M4c=r7H^Td6dHw!-# z78Xv7i;tIocKY<`#Cw-73qRYud2^zjy}kUim6ct0@7^`ozjv=Ge*@D31`P%-5cMZ) zc9r9+s_);vmCf+?_iwMv&(EK+ecQISpVzL1&Dg(ZPs`6|&(dZ*|NPUy-pY#WbI?kW zXTib2iFGwKGS9NJv)zD>g1U|M!R2R+Z0ziZYwGLmFIQ&0s;Vh3FQ3uh+uK^{?CiYk z|NWacC7dxdl@Zv?rjORr=4c@VnSYru~B@UXJs^5x5~*57F?dc^qe zO68|VkCJ9AzozeD8$Myz`~P3Rn!b(}*th@u`SUZ+eeQ+%1gQ6b`+3Lx&U(|ipECx1 zf4hF&y0)J`epJkuKW9!$W!Bt-GiS~;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DH(12((3SHN6adBaf0$7%Xxw$!XcXxk@o?#d`IXQu< zs`=dF;vzaaIxs#y4qexAb8~~$)m7X4?U5h|#Bto~Dl2%X0w9maLjZ^|Mjnsn!*@h! uY3b{bbZ~HRaBy&NaBy&NaBy(=&-e*fpjfu})sSHT0000<7gR`t)i?W$64tKJJp(YJ?rHJS>);J=d#Wzp$P!jkaF<= literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_inv_boots_lead.png b/technic_armor/textures/technic_armor_inv_boots_lead.png new file mode 100644 index 0000000000000000000000000000000000000000..5fb7067a171bb9eb5eebb0f386a6579266572eab GIT binary patch literal 268 zcmV+n0rUQeP) z4HYn18M18v006*AL_t(I%hi*s4TL}xMbB@zr+pht5HsO Sh7i~Q0000 z4Hf|->fw|C00A9IL_t(I%hi&tuEIbNg})^z9ELP~12mAuQ49)+LGv1Y2_Aq{LrJQO zYl6Z+kqr%Y1xZy?Lo(NJNiP(FBlnoenV*y0GXvj-x z4HgY5T&=$V007xZL_t(I%hi%SiiJQBguhu=5Co0AfH&|Mo>N%F)~ zcauegwr$Z`a~#JHAWhS!;UDKtp637*MZqu(G)+SohFF$`=Xn5>WqDcoA|Ucu!uNgV zd8Vo=x~@ZO&A#sdxUOpqN0w!gZ!5;v_r09$ex4QTy8bobAPCGB9LIU}y$WF4HnRnJ rgz)MPWSXW6Mi~xBnFRiTdAIrk+mKcmWL?O$00000NkvXXu0mjfHkNv! literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_inv_leggings_lead.png b/technic_armor/textures/technic_armor_inv_leggings_lead.png new file mode 100644 index 0000000000000000000000000000000000000000..6e456a3e324c6fdca8746da14e2032239d9d3f16 GIT binary patch literal 287 zcmV+)0pR|LP) z4Hg(jfk{*V007fTL_t(I%hi%G3WPumMZepNSd9k|E016y76Vgw1Fs->89NVPWn(8I z1A-^8*H&BYv(2)oOW0*Q1A!sKyu1kkZXd?sO#i%n94lp6q9_Ugz%UFL#}WI!BM1Tj zz`Cw*U6& z30Tn@66!(&Zti&!s5M59-;onQO4YZc_od#y! zW9H2aJONczg~#I&{11kQhsCF@EwQ}(UI2d-aXke6{r$fdiHV6xUL+F8vY*Ab?-(2$ zY{)mLjE#+n)6-L-s;Y=aqvC5WCmyi4xG2);v?vscLen$>h>z>*VqjoE07w9SzhA7a ztY`XI;y4Zq3k%%b+)%64ux*=Csg!a7Se8XHnIsqtVp$fMOom7#g2&?_ zoleu!(}QW6^!D~ruh%IQ3LG39G@97f7Ut~i46oNqcXv1We4aocz|qkWxm=E`t1DbC z7ptqQ#N*GozP<+F*@HkfyG^-Vrc^4C&*xDT1zpz(27{QUiK?n>Zf-I)HO0opdgB^3 zP2r3E1b*=&~m{eAZK_SoIs#pm-83WX??%8ZVV{_J39XGglYxDXTL z`S@6B@WAbMGdGvQwrz5`9G91u zXqtxOI4Fw3{rx>&uaDRB^O&ajIKra`hG9sCVTg`+l*!3S5{U$oB+=2)!QtT{Gcz+Z zH8oMSO4MpK>47Kx=Dfx9^eX^ju_&2LhSt_rlu(EdD=S!*CH?i0WLXw~n4O&!BO@<` p%jFWfuK)X2wzs#7SS z3;_gJ!TY)Z00I639Gd<6HOy z_8Kc%l!n+~Vqy%H6^+q?20{#yj7A{pXJIra=bRT9+`nWuD|qNP^nZ>yWJKb%d%9f)g(!PQmK^A&d#*IzpqRt6Zrt#m6a799v-;6yCa{^ zvsf$$f`Ik)^{;d!Mxzn!b{l}_=V!XzF0j$w z^?K~=>;RC<<+!=I0bp};lgVU4xm@P`{XP2qzqYofsi5G#U-g&(8_NkT47>m&?rOb7r#{lgWg`!$XF{A;n^mAP8tS zn=BR!ip3)L_xI7?0*ORItE;Q>eP6EYYI}QIfE>qBCX-P%n-!q%l?ll6yzg~r7={s9 YpK1ZxwAS_%g8%>k07*qoM6N<$g7EGV$^ZZW literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_leggings_lead_preview.png b/technic_armor/textures/technic_armor_leggings_lead_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..2777c6d7f37be4694cc5c1460c67ff05c06a533a GIT binary patch literal 535 zcmeAS@N?(olHy`uVBq!ia0vp^4Gav73><7gR`t)iF!Z|`jEV+<5&NVMK|sWXj>OK57`+Dm6wXV|o#YS#F&=o^<1SJm9UyXF?* zMVrs0?OSgZ$JC&p`S%Nd7g)c-ed$SabVzJ zU{qkZ!(I^>Iql(|>#tK~=YP8Xd^*f_rbvHj9<-zI*8B#|ob3mtStV_P$Z} zKsW;v)JmzRkIyrI`Te(G-|e@Depc<}d)|CdA-lHwsL~vNwaIH+X8v;|A2DD74QfAGnJ?P@sVPjl3X=A8 L^>bP0l+XkKy5YLH literal 0 HcmV?d00001 diff --git a/technic_armor/textures/technic_armor_shield_lead.png b/technic_armor/textures/technic_armor_shield_lead.png new file mode 100644 index 0000000000000000000000000000000000000000..96a82b5686dc12ab3ed720ff3e55963d373bb024 GIT binary patch literal 740 zcmV z3<5X9JjrhW00NjvL_t(&-tE`1OB-Pv#_?~G4hcyv2#1GDG>{mBO&t_O%$=Jc3Pt|_ zMG)!W-a*g?+${YEM2cdjQjshUwbaxQP!W_v@s=2JqCG?qJy0~^?NUn%ZTFt{nO=Cg z;rH;q&+)=PD2gKde!t);8XO!HpEfqc;^KP&I5q_D_tzoC*w{EP(rF|q#QfWL z^!NAww(qDEMn*=&@$s=x6h$Nw3Gua96p!ZT=S41;6Xo)WP*qg`;^XS7=l+}s?ux3|=4H7v`bQmJGe(E+AulF4LCa`0s%TZJ1Lb)gu`JD z4h|?5i(Fq{rpDCRkfrb=GfCRaL%h78n>9K$c~inwk(oP$(4G-Q8tpXNT?WZGyod(P)%%rONQ| zuyanp*4CEi^72xQjgF#e8b?P*EG#T=etu3U6e1iBbANwNPfriQpv1Q`lh22T9!GV6 z&*x)iCW~cR6pKZ!uC7p372CFvWtoSE2Lgd0uV-g548t*3;AaQuy6(|+U9_bVjE|3# zPN(sBJhZj7vA@61)YKFW4GmnF6>7Db$0-5)X%I0v`3it!GC@9{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