Skip to content

Commit

Permalink
Metabolism Fixes (#1055)
Browse files Browse the repository at this point in the history
* metabolism fixes

* stomach fix
  • Loading branch information
Kapu1178 committed Aug 15, 2024
1 parent 53c0b2d commit 1f74177
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

if(!gibbed)
INVOKE_ASYNC(src, PROC_REF(emote), "deathgasp")

reagents.end_metabolization(src)

add_memory_in_range(src, 7, MEMORY_DEATH, list(DETAIL_PROTAGONIST = src), story_value = STORY_VALUE_OKAY, memory_flags = MEMORY_CHECK_BLIND_AND_DEAF)
Expand Down
4 changes: 1 addition & 3 deletions code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
if(touching)
. += touching.metabolize(src, can_overdose = FALSE, updatehealth = FALSE)

if(stat != DEAD)
if(stat != DEAD && !HAS_TRAIT(src, TRAIT_NOMETABOLISM))
var/obj/item/organ/stomach/S = organs_by_slot[ORGAN_SLOT_STOMACH]
if(S?.reagents && !(S.organ_flags & ORGAN_DEAD))
. += S.reagents.metabolize(src, can_overdose = TRUE, updatehealth = FALSE)
Expand Down Expand Up @@ -593,8 +593,6 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(liver)
return

reagents.end_metabolization(src) //Stops trait-based effects on reagents, to prevent permanent buffs

if(HAS_TRAIT(src, TRAIT_STABLELIVER) || !needs_organ(ORGAN_SLOT_LIVER))
return

Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/organs/liver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

if(!istype(liver_owner))
return
if(organ_flags & ORGAN_DEAD || HAS_TRAIT(liver_owner, TRAIT_NOMETABOLISM))//can't process reagents with a failing liver
if(organ_flags & ORGAN_DEAD)
return

if (germ_level > INFECTION_LEVEL_ONE)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/surgery/organs/stomach/_stomach.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@
return ..()

/obj/item/organ/stomach/set_organ_dead(failing)
. = ..()
if(!.)
return

if(organ_flags & ORGAN_DEAD && owner)
if((organ_flags & ORGAN_DEAD) && owner)
reagents.end_metabolization(owner)

/obj/item/organ/stomach/on_life(delta_time, times_fired)
Expand Down

0 comments on commit 1f74177

Please sign in to comment.