1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-26 22:56:43 +02:00

mtn v3 - fix that biters with less boosted health gave bugged coins

This commit is contained in:
Gerkiz 2021-11-19 22:19:08 +01:00
parent 5d0e04fc59
commit 7d5ccebe84

View File

@ -50,6 +50,9 @@ local function get_coin_count(entity)
if not biter_health_boost_units[unit_number][3] then
return coin_count
end
if not biter_health_boost_units[unit_number][3].healthbar_id then -- only bosses
return coin_count
end
local m = 1 / biter_health_boost_units[unit_number][2]
coin_count = floor(coin_count * m)
if coin_count < 1 then