From df7f2e464afa034fa5667f0ba7c0e391a8e793fe Mon Sep 17 00:00:00 2001 From: BobFred7 <57379622+BobFred7@users.noreply.github.com> Date: Wed, 13 May 2020 19:13:33 +0200 Subject: [PATCH] Alloy furnace: More realistic recipe balance (#549) --- technic/radiation.lua | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/technic/radiation.lua b/technic/radiation.lua index a4c49c6..e4ed5c5 100644 --- a/technic/radiation.lua +++ b/technic/radiation.lua @@ -146,7 +146,7 @@ ["moreores:mithril_block"] = 26, ["moreores:silver_block"] = 53, ["snow:snow_brick"] = 2.8, - ["technic:brass_block"] = 43, + ["basic_materials:brass_block"] = 43, ["technic:carbon_steel_block"] = 40, ["technic:cast_iron_block"] = 40, ["technic:chernobylite_block"] = 40, @@ -294,6 +294,8 @@ end if ag.radiation then return 0.01 * ag.radiation + elseif armor_enabled then + return 0 end if ag.fleshy then return math.sqrt(0.01 * ag.fleshy) @@ -309,7 +311,7 @@ end local function dmg_object(pos, object, strength) - local obj_pos = vector.add(object:getpos(), calculate_object_center(object)) + local obj_pos = vector.add(object:get_pos(), calculate_object_center(object)) local mul if armor_enabled or entity_damage then -- we need to check may the object be damaged even if armor is disabled @@ -338,7 +340,7 @@ local max_dist = strength * rad_dmg_mult_sqrt for _, o in pairs(minetest.get_objects_inside_radius(pos, max_dist + abdomen_offset)) do - if entity_damage or o:is_player() then + if (entity_damage or o:is_player()) and o:get_hp() > 0 then dmg_object(pos, o, strength) end end @@ -513,4 +515,3 @@ end, }) end - -- Gitblit v1.8.0