From 9206af653dfe4ba59420c8b69dec4efda9fdf175 Mon Sep 17 00:00:00 2001 From: Aquilar <20759278+Aquilar@users.noreply.github.com> Date: Fri, 16 Oct 2020 04:33:44 +0800 Subject: [PATCH] updates haloperidol and nanocalcium to take less effort to modify. (#14612) --- .../reagents/chemistry/reagents/medicine.dm | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 072a22aa7ba..894491056fc 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -1001,19 +1001,14 @@ reagent_state = LIQUID color = "#FFDCFF" taste_description = "stability" + var/list/drug_list = list("crank","methamphetamine","space_drugs","psilocybin","ephedrine","epinephrine","stimulants","bath_salts","lsd","thc") /datum/reagent/medicine/haloperidol/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - M.reagents.remove_reagent("crank", 5) - M.reagents.remove_reagent("methamphetamine", 5) - M.reagents.remove_reagent("space_drugs", 5) - M.reagents.remove_reagent("psilocybin", 5) - M.reagents.remove_reagent("ephedrine", 5) - M.reagents.remove_reagent("epinephrine", 5) - M.reagents.remove_reagent("stimulants", 3) - M.reagents.remove_reagent("bath_salts", 5) - M.reagents.remove_reagent("lsd", 5) - M.reagents.remove_reagent("thc", 5) + for(var/I in M.reagents.reagent_list) + var/datum/reagent/R = I + if(drug_list.Find(R.id)) + M.reagents.remove_reagent(R.id, 5) update_flags |= M.AdjustDruggy(-5, FALSE) M.AdjustHallucinate(-5) M.AdjustJitter(-5) @@ -1241,9 +1236,15 @@ can_synth = FALSE harmless = FALSE taste_description = "wholeness" + var/list/stimulant_list = list("methamphetamine", "crank", "bath_salts", "stimulative_agent", "stimulants") /datum/reagent/medicine/nanocalcium/on_mob_life(mob/living/carbon/human/M) var/update_flags = STATUS_UPDATE_NONE + var/has_stimulant = FALSE + for(var/I in M.reagents.reagent_list) + var/datum/reagent/R = I + if(stimulant_list.Find(R.id)) + has_stimulant = TRUE switch(current_cycle) if(1 to 19) M.AdjustJitter(4) @@ -1251,7 +1252,7 @@ to_chat(M, "Your skin feels hot and your veins are on fire!") if(20 to 43) //If they have stimulants or stimulant drugs then just apply toxin damage instead. - if(M.reagents.has_reagent("methamphetamine") || M.reagents.has_reagent("crank") || M.reagents.has_reagent("bath_salts") || M.reagents.has_reagent("stimulative_agent") || M.reagents.has_reagent("stimulants")) + if(has_stimulant == TRUE) update_flags |= M.adjustToxLoss(10, FALSE) else //apply debilitating effects if(prob(75)) @@ -1262,7 +1263,7 @@ to_chat(M, "Your body goes rigid, you cannot move at all!") update_flags |= M.AdjustWeakened(15, FALSE) if(45 to INFINITY) // Start fixing bones | If they have stimulants or stimulant drugs in their system then the nanites won't work. - if(M.reagents.has_reagent("methamphetamine") || M.reagents.has_reagent("crank") || M.reagents.has_reagent("bath_salts") || M.reagents.has_reagent("stimulative_agent") || M.reagents.has_reagent("stimulants")) + if(has_stimulant == TRUE) return ..() else for(var/obj/item/organ/external/E in M.bodyparts)