Hazmat suit: updates and fixes

This commit is contained in:
stujones11 2017-04-09 20:07:32 +01:00
parent 20edce6c55
commit 4dbe76312b

View File

@ -7,28 +7,6 @@ if minetest.global_exists("intllib") then
S = intllib.Getter() S = intllib.Getter()
end end
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 part_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", { minetest.register_craftitem("hazmat_suit:helmet_hazmat", {
description = S("Hazmat Helmet"), description = S("Hazmat Helmet"),
inventory_image = "hazmat_suit_inv_helmet_hazmat.png", inventory_image = "hazmat_suit_inv_helmet_hazmat.png",
@ -59,21 +37,14 @@ minetest.register_craftitem("hazmat_suit:boots_hazmat", {
stack_max = 1, stack_max = 1,
}) })
minetest.register_tool("hazmat_suit:suit_hazmat", { armor:register_armor("hazmat_suit:suit_hazmat", {
description = S("Hazmat Suit"), description = S("Hazmat Suit"),
inventory_image = "hazmat_suit_inv_suit_hazmat.png", inventory_image = "hazmat_suit_inv_suit_hazmat.png",
groups = { groups = {armor_head=1, armor_torso=1, armor_legs=1, armor_feet=1,
armor_head = level, armor_heal=20, armor_fire=4, armor_water=1, armor_use=1000,
armor_torso = level, physics_jump=-0.1, physics_speed=-0.2, physics_gravity=0.1},
armor_legs = level, armor_groups = {fleshy=35, radiation=50},
armor_feet = level, damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
armor_heal = heal,
armor_use = use,
armor_fire = fire,
armor_water = water,
armor_radiation = radiation,
},
wear = 0,
}) })
minetest.register_craft({ minetest.register_craft({