From b0a69a4023f3f90b6d6b7457f144702a3d914077 Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Sun, 7 Sep 2025 14:41:30 +0530 Subject: [PATCH] Zombie powder works through inhale/ingest again (#92880) ## About The Pull Request - Fixes #92873 ignore commit message, that's a typo ## Changelog :cl: fix: zombie powder works through inhale(now faster acting)/ingest again /:cl: --- .../chemistry/reagents/toxin_reagents.dm | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 6c9ae29d4c3..ab4de8a550e 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -259,26 +259,39 @@ ph = 13 chemical_flags = REAGENT_CAN_BE_SYNTHESIZED -/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/holder_mob) +/datum/reagent/toxin/zombiepowder/expose_mob(mob/living/exposed_mob, methods, reac_volume, show_message, touch_protection) . = ..() + if(!isliving(exposed_mob) || !(methods & (INGEST|INHALE))) + return + + LAZYINITLIST(data) + data["method"] |= methods + + //the stomach handles INGEST via on_mob_metabolize() we only deal with INHALE + //also means vapour works much faster which is realistic + if(methods & INHALE) + zombify(exposed_mob) +/** + * Does the fake death & oxy loss on the mob + * + * Arguments + * * mob/living/holder_mob - the mob we are zombifying +*/ +/datum/reagent/toxin/zombiepowder/proc/zombify(mob/living/holder_mob) + PRIVATE_PROC(TRUE) + holder_mob.adjustOxyLoss(0.5*REM, FALSE, required_biotype = affected_biotype, required_respiration_type = affected_respiration_type) if((data?["method"] & (INGEST|INHALE)) && holder_mob.stat != DEAD) holder_mob.fakedeath(type) +/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/holder_mob) + . = ..() + zombify(holder_mob) + /datum/reagent/toxin/zombiepowder/on_mob_end_metabolize(mob/living/affected_mob) . = ..() affected_mob.cure_fakedeath(type) -/datum/reagent/toxin/zombiepowder/expose_mob(mob/living/exposed_mob, methods, reac_volume, show_message, touch_protection) - . = ..() - if(!(methods & (INGEST|INHALE))) - return - - var/datum/reagent/zombiepowder = exposed_mob.reagents.has_reagent(/datum/reagent/toxin/zombiepowder) - if(zombiepowder) - LAZYINITLIST(zombiepowder.data) - zombiepowder.data["method"] |= (INGEST|INHALE) - /datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/affected_mob, seconds_per_tick, times_fired) . = ..() if(HAS_TRAIT(affected_mob, TRAIT_FAKEDEATH) && HAS_TRAIT(affected_mob, TRAIT_DEATHCOMA))