Skip to content

Commit

Permalink
Fixes scaling drug downsides not working. (#22170)
Browse files Browse the repository at this point in the history
* 621, go to the drug store and pick up 300 units of meth from the corporations.

* PULL BACK 621 THEY GOT EARLY RETURN SUPPORT
  • Loading branch information
Qwertytoforty authored Aug 30, 2023
1 parent e754819 commit d76fb84
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions code/modules/reagents/chemistry/reagents_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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_threshold < current_threshold_accumulated && prob(addiction_chance) && prob(addiction_chance_additional))
to_chat(M, "<span class='danger'>You suddenly feel invigorated and guilty...</span>")
var/datum/reagent/new_reagent = new type()
new_reagent.last_addiction_dose = world.timeofday
M.reagents.addiction_list.Add(new_reagent)
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, "<span class='danger'>You suddenly feel invigorated and guilty...</span>")
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))
Expand Down

0 comments on commit d76fb84

Please sign in to comment.