mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
broken module fix
This commit is contained in:
parent
40062953d7
commit
f4c5a315a6
@ -72,7 +72,6 @@ local function on_entity_damaged(event)
|
||||
local biter = event.entity
|
||||
if not (biter and biter.valid) then return end
|
||||
if biter.type ~= "unit" then return end
|
||||
if event.final_damage_amount == 0 then return end
|
||||
|
||||
local biter_health_boost_units = global.biter_health_boost_units
|
||||
|
||||
@ -98,12 +97,9 @@ local function on_entity_damaged(event)
|
||||
end
|
||||
end
|
||||
|
||||
--Calculate current actual health, accounting for regeneration
|
||||
local current_health = biter.health * (1 / health_pool[2])
|
||||
|
||||
--Reduce health pool
|
||||
health_pool[1] = current_health - event.final_damage_amount
|
||||
|
||||
health_pool[1] = health_pool[1] - event.final_damage_amount
|
||||
|
||||
--Set entity health relative to health pool
|
||||
biter.health = health_pool[1] * health_pool[2]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user