Skip to content

Commit 5019b16

Browse files
Merge pull request #5279 from out-of-phaze/fix/yinglet-dose
Fix small mobs taking forever to metabolize reagents out
2 parents 574d3f1 + 38c4b5d commit 5019b16

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

code/modules/mob/living/life.dm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,14 @@
244244
break
245245
if(still_processing_reagent)
246246
continue
247-
var/dose = CHEM_DOSE(src, reagent) - reagent.metabolism*2
248-
LAZYSET(_chem_doses, reagent, dose)
249-
if(CHEM_DOSE(src, reagent) <= 0)
247+
var/amount_removed = get_adjusted_metabolism(reagent.metabolism*2) // reagents metabolize out twice as fast as they metabolize in
248+
if(!(reagent.flags & IGNORE_MOB_SIZE))
249+
amount_removed *= (MOB_SIZE_MEDIUM/mob_size)
250+
var/dose = CHEM_DOSE(src, reagent) - amount_removed
251+
if(dose <= 0)
250252
LAZYREMOVE(_chem_doses, reagent)
253+
else
254+
LAZYSET(_chem_doses, reagent, dose)
251255
if(apply_chemical_effects())
252256
update_health()
253257

0 commit comments

Comments
 (0)