Merge pull request #11644 from Verkister/patch-88

Fixes old oxyloss compensation jank
This commit is contained in:
Casey
2021-10-27 11:23:42 -04:00
committed by GitHub
+8 -9
View File
@@ -235,7 +235,9 @@
/obj/belly/proc/handle_digestion_death(mob/living/M)
var/digest_alert_owner = pick(digest_messages_owner)
var/digest_alert_prey = pick(digest_messages_prey)
var/compensation = M.getOxyLoss() //How much of the prey's damage was caused by passive crit oxyloss to compensate the lost nutrition.
var/compensation = M.maxHealth / 5 //Dead body bonus.
if(ishuman(M))
compensation += M.getOxyLoss() //How much of the prey's damage was caused by passive crit oxyloss to compensate the lost nutrition.
var/living_count = 0
for(var/mob/living/L in contents)
@@ -263,14 +265,11 @@
digestion_death(M)
if(!ishuman(owner))
owner.update_icons()
if(compensation == 0) //Slightly sloppy way at making sure certain mobs don't give ZERO nutrition (fish and so on)
compensation = 21 //This reads as 20*4.5 due to the calculations afterward, making the backup nutrition value 94.5 per mob. Not op compared to regular prey.
if(compensation > 0)
if(isrobot(owner))
var/mob/living/silicon/robot/R = owner
R.cell.charge += 25*compensation*(nutrition_percent / 100)
else
owner.adjust_nutrition((nutrition_percent / 100)*4.5*compensation)
if(isrobot(owner))
var/mob/living/silicon/robot/R = owner
R.cell.charge += (nutrition_percent / 100) * compensation * 25
else
owner.adjust_nutrition((nutrition_percent / 100) * compensation * 4.5)
/obj/belly/proc/steal_nutrition(mob/living/L)
if(L.nutrition >= 100)