mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Fixes chem and addiction scans, null checks for addiction_list (#1826)
* Fixes chem and addiction scans, null checks for addiction_list (#55105) So #54797 changed addiction_list to instantiate as a null instead of a list. Turns out a few things relied on the list existing! Things like health analyser/medical kiosk chem and addiction scans broke, and smokers would no longer get addicted! Made a few places check if addiction_list is null before continuing. (Lemon's note, refactored some code to make it cleaner/removed some unneeded loop typechecks) * Fixes chem and addiction scans, null checks for addiction_list Co-authored-by: prodirus <44090982+prodirus@users.noreply.github.com>
This commit is contained in:
@@ -579,7 +579,7 @@
|
||||
if (!reagent_type)
|
||||
reagent_type = pick(drug_list)
|
||||
reagent_instance = new reagent_type()
|
||||
H.reagents.addiction_list.Add(reagent_instance)
|
||||
LAZYADD(H.reagents.addiction_list, reagent_instance)
|
||||
var/current_turf = get_turf(quirk_holder)
|
||||
if (!drug_container_type)
|
||||
drug_container_type = /obj/item/storage/pill_bottle
|
||||
@@ -628,7 +628,7 @@
|
||||
reagent_instance = new reagent_type()
|
||||
else
|
||||
reagent_instance.addiction_stage = 0
|
||||
H.reagents.addiction_list += reagent_instance
|
||||
LAZYADD(H.reagents.addiction_list, reagent_instance)
|
||||
to_chat(quirk_holder, "<span class='danger'>You thought you kicked it, but you suddenly feel like you need [reagent_instance.name] again...</span>")
|
||||
|
||||
/datum/quirk/junkie/smoker
|
||||
|
||||
Reference in New Issue
Block a user