Gets rid of remaining rogue REMs in reagent metabolism code (#94946)

## About The Pull Request

#94621 missed a few REMs in life code, and a few outside which just...
made zero sense outright. This cleans it up and makes sure everything is
up to modern code.

## Changelog
🆑
fix: Fixed some reagents still using old (and now, incorrect) math for
their metabolization values
/🆑
This commit is contained in:
SmArtKar
2026-01-27 19:08:22 -05:00
committed by GitHub
parent 5c2769af61
commit 6c87e32461
7 changed files with 32 additions and 26 deletions
@@ -408,7 +408,7 @@
return
if(trans_volume >= 0.4) //prevents cheesing with ultralow doses.
exposed_mob.adjust_tox_loss((-3 * min(2, trans_volume) * REM) * normalise_creation_purity(), required_biotype = affected_biotype) //This is to promote iv pole use for that chemotherapy feel.
exposed_mob.adjust_tox_loss((-1.5 * min(2, trans_volume)) * normalise_creation_purity(), required_biotype = affected_biotype) //This is to promote iv pole use for that chemotherapy feel.
var/obj/item/organ/liver/L = exposed_mob.organs_slot[ORGAN_SLOT_LIVER]
if(!L || L.organ_flags & ORGAN_FAILING)
return
@@ -115,21 +115,26 @@
if(SPT_PROB(2.5, seconds_per_tick))
to_chat(affected_mob, span_notice("[high_message]"))
affected_mob.add_mood_event("smacked out", /datum/mood_event/narcotic_heavy)
if(current_cycle == 36 && creation_purity <= 0.6)
if(!istype(affected_mob.dna.species, /datum/species/human/krokodil_addict))
to_chat(affected_mob, span_userdanger("Your skin falls off easily!"))
var/mob/living/carbon/human/affected_human = affected_mob
affected_human.set_facial_hairstyle("Shaved", update = FALSE)
affected_human.set_hairstyle("Bald", update = FALSE)
affected_mob.set_species(/datum/species/human/krokodil_addict)
if(affected_mob.adjust_brute_loss(50 * REM, updating_health = FALSE, required_bodytype = affected_bodytype)) // holy shit your skin just FELL THE FUCK OFF
return UPDATE_MOB_HEALTH
if(current_cycle != 36 || creation_purity > 0.6)
return
if(istype(affected_mob.dna.species, /datum/species/human/krokodil_addict))
return
to_chat(affected_mob, span_userdanger("Your skin falls off easily!"))
var/mob/living/carbon/human/affected_human = affected_mob
affected_human.set_facial_hairstyle("Shaved", update = FALSE)
affected_human.set_hairstyle("Bald", update = FALSE)
affected_mob.set_species(/datum/species/human/krokodil_addict)
if(affected_mob.adjust_brute_loss(25, updating_health = FALSE, required_bodytype = affected_bodytype)) // holy shit your skin just FELL THE FUCK OFF
return UPDATE_MOB_HEALTH
/datum/reagent/drug/krokodil/overdose_process(mob/living/affected_mob, seconds_per_tick, metabolization_ratio)
. = ..()
var/need_mob_update
need_mob_update = affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 0.25 * metabolization_ratio * seconds_per_tick, required_organ_flag = affected_organ_flags)
need_mob_update = affected_mob.adjust_tox_loss(0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
var/need_mob_update = affected_mob.adjust_organ_loss(ORGAN_SLOT_BRAIN, 0.25 * metabolization_ratio * seconds_per_tick, required_organ_flag = affected_organ_flags)
need_mob_update |= affected_mob.adjust_tox_loss(0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
if(need_mob_update)
return UPDATE_MOB_HEALTH
@@ -1220,7 +1220,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
/datum/reagent/inverse/colorful_reagent/overdose_start(mob/living/affected_mob)
. = ..()
metabolization_rate = 0.04 * REM
metabolization_rate = 0.1 * REAGENTS_METABOLISM
/datum/reagent/inverse/colorful_reagent/on_mob_metabolize(mob/living/carbon/affected_mob)
. = ..()
@@ -1021,6 +1021,7 @@
/datum/reagent/medicine/epinephrine/metabolize_reagent(mob/living/carbon/affected_mob, seconds_per_tick, metabolized_volume)
if(holder.has_reagent(/datum/reagent/toxin/lexorin))
// REM is intentional here
holder.remove_reagent(/datum/reagent/toxin/lexorin, 1 * REM * metabolized_volume * seconds_per_tick)
holder.remove_reagent(/datum/reagent/medicine/epinephrine, 0.5 * REM * metabolized_volume * seconds_per_tick)
return ..()
@@ -339,8 +339,8 @@
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
. = ..()
data["deciseconds_metabolized"] += (seconds_per_tick * 1 SECONDS * REM)
// Microdosing holy water is less effective than just gulping it down
data["deciseconds_metabolized"] += seconds_per_tick * 1 SECONDS * metabolization_ratio
affected_mob.adjust_jitter_up_to(2 SECONDS * metabolization_ratio * seconds_per_tick, 20 SECONDS)
var/need_mob_update = FALSE
@@ -1016,7 +1016,7 @@
/datum/reagent/chlorine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
. = ..()
if(affected_mob.take_bodypart_damage(0.5*REM*seconds_per_tick, 0))
if(affected_mob.take_bodypart_damage(0.25 * metabolization_ratio * seconds_per_tick, 0))
return UPDATE_MOB_HEALTH
/datum/reagent/fluorine
@@ -1036,7 +1036,7 @@
/datum/reagent/fluorine/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
. = ..()
if(affected_mob.adjust_tox_loss(0.5*REM*seconds_per_tick, updating_health = FALSE))
if(affected_mob.adjust_tox_loss(0.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE))
return UPDATE_MOB_HEALTH
/datum/reagent/sodium
@@ -1137,7 +1137,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
default_container = /obj/effect/decal/cleanable/greenglow
/// How much tox damage to deal per tick
var/tox_damage = 0.5
var/tox_damage = 0.25
/// How radioactive is this reagent
var/rad_power = 1
@@ -1147,7 +1147,8 @@
var/chance = min(volume / (20 - rad_power * 5), rad_power)
if(SPT_PROB(chance, seconds_per_tick)) // ignore rad protection calculations bc it's inside of us
affected_mob.AddComponent(/datum/component/irradiated)
if(affected_mob.adjust_tox_loss(tox_damage * seconds_per_tick * REM, updating_health = FALSE))
if(affected_mob.adjust_tox_loss(tox_damage * seconds_per_tick * metabolization_rate, updating_health = FALSE))
return UPDATE_MOB_HEALTH
/datum/reagent/uranium/expose_obj(obj/exposed_obj, reac_volume, methods=TOUCH, show_message=TRUE)
@@ -1214,7 +1215,7 @@
description = "Radium is an alkaline earth metal. It is extremely radioactive."
color = "#00CC00" // ditto
taste_description = "the colour blue and regret"
tox_damage = 1
tox_damage = 0.5
material = null
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
@@ -364,7 +364,7 @@
/datum/reagent/cryostylane/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
. = ..()
metabolization_rate = 0.25 * REM//faster consumption when alive
metabolization_rate = 0.625 * REAGENTS_METABOLISM //faster consumption when alive
if(affected_mob.reagents.has_reagent(/datum/reagent/oxygen))
affected_mob.reagents.remove_reagent(/datum/reagent/oxygen, 1 * metabolization_ratio * seconds_per_tick)
affected_mob.adjust_bodytemperature(-30 * metabolization_ratio * seconds_per_tick)
@@ -67,7 +67,7 @@
/datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
. = ..()
if(affected_mob.adjust_tox_loss(0.5 * seconds_per_tick * REM, required_biotype = affected_biotype))
if(affected_mob.adjust_tox_loss(0.25 * seconds_per_tick * metabolization_ratio, required_biotype = affected_biotype))
return UPDATE_MOB_HEALTH
/datum/reagent/toxin/mutagen/on_hydroponics_apply(obj/machinery/hydroponics/mytray, mob/user)
@@ -314,7 +314,7 @@
/datum/reagent/toxin/zombiepowder/proc/zombify(mob/living/holder_mob)
PRIVATE_PROC(TRUE)
holder_mob.adjust_oxy_loss(0.5*REM, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
holder_mob.adjust_oxy_loss(0.25, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type)
if((data?["method"] & (INGEST|INHALE)) && holder_mob.stat != DEAD)
holder_mob.apply_status_effect(/datum/status_effect/reagent_effect/fakedeath, type)
@@ -873,8 +873,7 @@
/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, metabolization_ratio)
var/scratched = FALSE
var/scratch_damage = 0.2 * REM
var/scratch_damage = 0.25 * metabolization_ratio
var/obj/item/bodypart/head = affected_mob.get_bodypart(BODY_ZONE_HEAD)
if(!isnull(head) && SPT_PROB(8, seconds_per_tick))
scratched = affected_mob.itch(damage = scratch_damage, target_part = head)