From d76fb844546da5c8dcc59491e4abbc29b3a8e4cf Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Wed, 30 Aug 2023 14:38:37 -0400
Subject: [PATCH] Fixes scaling drug downsides not working. (#22170)
* 621, go to the drug store and pick up 300 units of meth from the corporations.
* PULL BACK 621 THEY GOT EARLY RETURN SUPPORT
---
.../reagents/chemistry/reagents_datum.dm | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/code/modules/reagents/chemistry/reagents_datum.dm b/code/modules/reagents/chemistry/reagents_datum.dm
index 3e1b919aa51..001232a37e1 100644
--- a/code/modules/reagents/chemistry/reagents_datum.dm
+++ b/code/modules/reagents/chemistry/reagents_datum.dm
@@ -121,15 +121,18 @@
return STATUS_UPDATE_NONE
/datum/reagent/proc/handle_addiction(mob/living/M, consumption_rate)
- if(addiction_chance && !is_type_in_list(src, M.reagents.addiction_list))
- M.reagents.addiction_threshold_accumulated[type] += consumption_rate
- var/current_threshold_accumulated = M.reagents.addiction_threshold_accumulated[type]
+ if(!addiction_chance)
+ return
+ M.reagents.addiction_threshold_accumulated[type] += consumption_rate
+ if(is_type_in_list(src, M.reagents.addiction_list))
+ return
+ var/current_threshold_accumulated = M.reagents.addiction_threshold_accumulated[type]
- if(addiction_threshold < current_threshold_accumulated && prob(addiction_chance) && prob(addiction_chance_additional))
- to_chat(M, "You suddenly feel invigorated and guilty...")
- var/datum/reagent/new_reagent = new type()
- new_reagent.last_addiction_dose = world.timeofday
- M.reagents.addiction_list.Add(new_reagent)
+ if(addiction_threshold < current_threshold_accumulated && prob(addiction_chance) && prob(addiction_chance_additional))
+ to_chat(M, "You suddenly feel invigorated and guilty...")
+ var/datum/reagent/new_reagent = new type()
+ new_reagent.last_addiction_dose = world.timeofday
+ M.reagents.addiction_list.Add(new_reagent)
/datum/reagent/proc/sate_addiction(mob/living/M) //reagents sate their own withdrawals
if(is_type_in_list(src, M.reagents.addiction_list))