From 2498bcd24d3d121a81d1953536391b0228b732af Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Thu, 11 Jul 2024 02:06:36 -0400 Subject: [PATCH] halochange (#1023) --- code/modules/mob/status_procs.dm | 5 +++-- .../reagents/chemistry/reagents/medicine_reagents.dm | 6 +++++- code/modules/reagents/chemistry/reagents/toxin_reagents.dm | 3 +-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index c5d1a652310e..fd6b2ea1246b 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -9,10 +9,11 @@ /** * Adds passed value to the drowsyness of a mob */ -/mob/proc/adjust_drowsyness(amount) +/mob/proc/adjust_drowsyness(amount, up_to = INFINITY) + if(amount + drowsyness > up_to) + amount = max(up_to - drowsyness, 0) drowsyness = max(drowsyness + amount, 0) - ///Blind a mobs eyes by amount /mob/proc/blind_eyes(amount) adjust_blindness(amount) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 182e5e2235f7..6b26c539d7b9 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -712,7 +712,11 @@ if(C.get_timed_status_effect_duration(/datum/status_effect/jitter) >= 6 SECONDS) C.adjust_timed_status_effect(-6 SECONDS * removed, /datum/status_effect/jitter) - C.adjust_drowsyness(16 * removed) + if(C.stat == CONSCIOUS) + C.adjust_drowsyness(16 * removed, up_to = 180) + else + C.adjust_drowsyness((16 * removed) / 5, up_to = 180) + C.adjust_timed_status_effect(-3 * removed, /datum/status_effect/drugginess) if (C.hallucination >= 5) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 3a0077b06a27..432d9f905cc6 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -418,8 +418,7 @@ reagent_state = SOLID color = "#000067" // rgb: 0, 0, 103 toxpwr = 0 - metabolization_rate = 1.5 * REAGENTS_METABOLISM - + metabolization_rate = 0.3 /datum/reagent/toxin/chloralhydrate/affect_blood(mob/living/carbon/C, removed) . = ..()