Adds reagent OD/addiction logging (#44460)

This commit is contained in:
81Denton
2019-06-14 14:11:06 -04:00
committed by moo
parent b8aa07a51e
commit 598cc90e8e
@@ -290,10 +290,12 @@
if(R.volume >= R.overdose_threshold && !R.overdosed)
R.overdosed = 1
need_mob_update += R.overdose_start(C)
log_game("[key_name(C)] has started overdosing on [R.name] at [R.volume] units.")
if(R.addiction_threshold)
if(R.volume >= R.addiction_threshold && !is_type_in_list(R, cached_addictions))
var/datum/reagent/new_reagent = new R.type()
cached_addictions.Add(new_reagent)
log_game("[key_name(C)] has become addicted to [R.name] at [R.volume] units.")
if(R.overdosed)
need_mob_update += R.overdose_process(C)
if(is_type_in_list(R,cached_addictions))