From f3550fd87c536c2980a2aaeb0114114bd30a7714 Mon Sep 17 00:00:00 2001 From: kiwedespars <47008095+kiwedespars@users.noreply.github.com> Date: Fri, 17 Sep 2021 03:54:02 -0700 Subject: [PATCH] blacklists morphine from dart guns, also haloperidol (#15152) * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * Automatic changelog compile [ci skip] * yeag * actually adds the blacklist can't you feel my heart beat so, i can't let you go, want you in my life * changes * Update html/changelog.html Co-authored-by: zeroisthebiggay <43571008+zeroisthebiggay@users.noreply.github.com> Co-authored-by: Changelogs Co-authored-by: zeroisthebiggay <43571008+zeroisthebiggay@users.noreply.github.com> --- code/__DEFINES/reagents.dm | 5 +++++ code/modules/projectiles/projectile/bullets/dart_syringe.dm | 2 ++ 2 files changed, 7 insertions(+) diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index 44e97ef345..8864e41ae9 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -76,3 +76,8 @@ //Chemical reaction flags, for determining reaction specialties #define REACTION_CLEAR_IMPURE (1<<0) //Convert into impure/pure on reaction completion #define REACTION_CLEAR_INVERSE (1<<1) //Convert into inverse on reaction completion when purity is low enough + +//Chemical blacklists for smartdarts +GLOBAL_LIST_INIT(blacklisted_medchems, list( + /datum/reagent/medicine/morphine, /datum/reagent/medicine/haloperidol, //harmful chemicals in medicine + )) diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm index bc2a7c40fb..318acb66b5 100644 --- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm +++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm @@ -60,6 +60,8 @@ if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body. ..(target, blocked, TRUE) for(var/datum/reagent/medicine/R in reagents.reagent_list) //OD prevention time! + if(R.type in GLOB.blacklisted_medchems) + continue if(M.reagents.has_reagent(R.type)) if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD? M.reagents.add_reagent(R.type, R.volume)