diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm
index 5c4592a3141..85eff70a89a 100644
--- a/code/__HELPERS/trait_helpers.dm
+++ b/code/__HELPERS/trait_helpers.dm
@@ -182,6 +182,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_FLASH_PROTECTION "flash_protection"
#define TRAIT_NIGHT_VISION "night_vision"
#define TRAIT_EMOTE_MUTE "emote_mute"
+#define TRAIT_HYPOSPRAY_IMMUNE "hypospray_immune" // For making crew-accessable hyposprays not pierce your clothing
#define TRAIT_RSG_IMMUNE "rsgimmune" //prevents RSG syringes from piercing your clothing
#define TRAIT_NO_BONES "no_bones"
diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm
index a1f5533f8d2..cf78a9c78dd 100644
--- a/code/_globalvars/traits.dm
+++ b/code/_globalvars/traits.dm
@@ -120,7 +120,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_OBSCURED_WIRES" = TRAIT_OBSCURED_WIRES,
"TRAIT_XENO_INTERACTABLE" = TRAIT_XENO_INTERACTABLE,
"TRAIT_NO_THROWN_MESSAGE" = TRAIT_NO_THROWN_MESSAGE,
- "TRAIT_SILENT_INSERTION" = TRAIT_SILENT_INSERTION
+ "TRAIT_SILENT_INSERTION" = TRAIT_SILENT_INSERTION,
+ "TRAIT_HYPOSPRAY_IMMUNE" = TRAIT_HYPOSPRAY_IMMUNE
),
/turf = list(
diff --git a/code/modules/clothing/spacesuits/ert_hardsuits.dm b/code/modules/clothing/spacesuits/ert_hardsuits.dm
index a15900b1e6a..f59f8ece4d7 100644
--- a/code/modules/clothing/spacesuits/ert_hardsuits.dm
+++ b/code/modules/clothing/spacesuits/ert_hardsuits.dm
@@ -105,6 +105,7 @@
/obj/item/clothing/suit/space/hardsuit/ert/security/Initialize(mapload)
. = ..()
+ ADD_TRAIT(src, TRAIT_HYPOSPRAY_IMMUNE, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_RSG_IMMUNE, ROUNDSTART_TRAIT)
//Engineer
@@ -154,6 +155,7 @@
/obj/item/clothing/suit/space/hardsuit/ert/medical/Initialize(mapload)
. = ..()
+ ADD_TRAIT(src, TRAIT_HYPOSPRAY_IMMUNE, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_RSG_IMMUNE, ROUNDSTART_TRAIT)
//Janitor
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index 185f31f23ff..7fd7d909473 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -388,6 +388,7 @@
/obj/item/clothing/suit/space/hardsuit/syndi/elite/sst/Initialize(mapload)
. = ..()
+ ADD_TRAIT(src, TRAIT_HYPOSPRAY_IMMUNE, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_RSG_IMMUNE, ROUNDSTART_TRAIT)
/obj/item/clothing/suit/space/hardsuit/syndi/freedom
diff --git a/code/modules/clothing/spacesuits/misc_spacesuits.dm b/code/modules/clothing/spacesuits/misc_spacesuits.dm
index b411f216e08..c73074e81e1 100644
--- a/code/modules/clothing/spacesuits/misc_spacesuits.dm
+++ b/code/modules/clothing/spacesuits/misc_spacesuits.dm
@@ -65,6 +65,7 @@
/obj/item/clothing/suit/space/deathsquad/Initialize(mapload)
. = ..()
+ ADD_TRAIT(src, TRAIT_HYPOSPRAY_IMMUNE, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_RSG_IMMUNE, ROUNDSTART_TRAIT)
/obj/item/clothing/head/helmet/space/deathsquad/beret
diff --git a/code/modules/mod/mod_types.dm b/code/modules/mod/mod_types.dm
index 7806681f01e..f78359559f6 100644
--- a/code/modules/mod/mod_types.dm
+++ b/code/modules/mod/mod_types.dm
@@ -305,6 +305,10 @@
/obj/item/mod/module/jetpack/advanced,
)
+/obj/item/mod/control/pre_equipped/nuclear/Initialize(mapload, new_theme, new_skin, new_core, new_access)
+ . = ..()
+ ADD_TRAIT(chestplate, TRAIT_HYPOSPRAY_IMMUNE, ROUNDSTART_TRAIT)
+
/obj/item/mod/control/pre_equipped/elite
theme = /datum/mod_theme/elite
applied_cell = /obj/item/stock_parts/cell/bluespace
@@ -322,6 +326,10 @@
/obj/item/mod/module/jetpack/advanced,
)
+/obj/item/mod/control/pre_equipped/elite/Initialize(mapload, new_theme, new_skin, new_core, new_access)
+ . = ..()
+ ADD_TRAIT(chestplate, TRAIT_HYPOSPRAY_IMMUNE, ROUNDSTART_TRAIT)
+
/obj/item/mod/control/pre_equipped/prototype
theme = /datum/mod_theme/prototype
req_access = list()
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index b37c3078c1a..7a410f66420 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -1,7 +1,6 @@
-////////////////////////////////////////////////////////////////////////////////
-/// HYPOSPRAY
-////////////////////////////////////////////////////////////////////////////////
-
+//////////////////////////////
+/// MARK: HYPOSPRAY
+//////////////////////////////
/obj/item/reagent_containers/hypospray
name = "hypospray"
desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients."
@@ -15,8 +14,14 @@
resistance_flags = ACID_PROOF
container_type = OPENCONTAINER
slot_flags = SLOT_FLAG_BELT
- var/ignore_flags = FALSE
+ /// If TRUE, the hypospray can inject through most hardsuits/modsuits.
+ var/can_pierce_hardsuits = FALSE
+ /// If TRUE, the hypospray isn't blocked by suits with TRAIT_HYPOSPRAY_IMMUNE.
+ var/ignore_hypospray_immunity = FALSE
+ /// If TRUE, the hypospray will reject any chemicals not on the safe_chem_list.
var/safety_hypo = FALSE
+ // List of SOSHA-approved medicines.
+ /// List of reagents that are allowed to go into a hypospray with active safeties.
var/static/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone", "salbutamol", "omnizine",
"weak_omnizine", "godblood", "potass_iodide", "oculine", "mannitol", "spaceacillin", "salglu_solution",
"sal_acid", "cryoxadone", "sugar", "hydrocodone", "mitocholide", "rezadone", "menthol",
@@ -30,7 +35,12 @@
if(!iscarbon(M))
return
- if(reagents.total_volume && (ignore_flags || M.can_inject(user, TRUE))) // Ignore flag should be checked first or there will be an error message.
+ var/mob/living/carbon/human/H = M
+ if(HAS_TRAIT(H.wear_suit, TRAIT_HYPOSPRAY_IMMUNE) && !ignore_hypospray_immunity) // This check is here entirely to stop goobers injecting nukies with meme chems
+ to_chat(user, "[src] is unable to penetrate the armour of [M] or interface with any injection ports.")
+ return
+
+ if(reagents.total_volume && (can_pierce_hardsuits || M.can_inject(user, TRUE))) // can_pierce_hardsuits should be checked first or there will be an error message.
to_chat(M, "You feel a tiny prick!")
to_chat(user, "You inject [M] with [src].")
@@ -88,10 +98,13 @@
/obj/item/reagent_containers/hypospray/emag_act(mob/user)
if(safety_hypo && !emagged)
emagged = TRUE
- ignore_flags = TRUE
+ can_pierce_hardsuits = TRUE
to_chat(user, "You short out the safeties on [src].")
return TRUE
+//////////////////////////////
+// MARK: HYPO VARIANTS
+//////////////////////////////
/obj/item/reagent_containers/hypospray/safety
name = "medical hypospray"
desc = "A general use medical hypospray for quick injection of chemicals. There is a safety button by the trigger."
@@ -103,32 +116,40 @@
icon_state = "ert_hypo"
list_reagents = list("omnizine" = 30)
+/obj/item/reagent_containers/hypospray/combat
+ name = "combat stimulant injector"
+ desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat. It has a proprietary adapter allowing it to inject through the ports of Syndicate-made hardsuits."
+ amount_per_transfer_from_this = 15
+ possible_transfer_amounts = null
+ icon_state = "combat_hypo"
+ volume = 90
+ can_pierce_hardsuits = TRUE // So they can heal their comrades.
+ ignore_hypospray_immunity = TRUE
+ list_reagents = list("epinephrine" = 30, "weak_omnizine" = 30, "salglu_solution" = 30)
+
+/obj/item/reagent_containers/hypospray/combat/nanites
+ desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing. It can interface with the injection ports on any type of hardsuit."
+ icon_state = "nanites_hypo"
+ volume = 100
+ list_reagents = list("nanites" = 100)
+
+//////////////////////////////
+// MARK: CMO HYPO
+//////////////////////////////
/obj/item/reagent_containers/hypospray/CMO
name = "advanced hypospray"
list_reagents = list("omnizine" = 30)
+ volume = 100
+ can_pierce_hardsuits = TRUE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/item/reagent_containers/hypospray/CMO/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy))
-/obj/item/reagent_containers/hypospray/combat
- name = "combat stimulant injector"
- desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."
- amount_per_transfer_from_this = 15
- possible_transfer_amounts = null
- icon_state = "combat_hypo"
- volume = 90
- ignore_flags = 1 // So they can heal their comrades.
- list_reagents = list("epinephrine" = 30, "weak_omnizine" = 30, "salglu_solution" = 30)
-
-/obj/item/reagent_containers/hypospray/combat/nanites
- desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing."
- icon_state = "nanites_hypo"
- volume = 100
- list_reagents = list("nanites" = 100)
-
-/// This is an empty variant
+//////////////////////////////
+// MARK: AUTOINJECTOR
+//////////////////////////////
/obj/item/reagent_containers/hypospray/autoinjector
name = "empty autoinjector"
desc = "A rapid and safe way to inject chemicals into humanoids. This one is empty."
@@ -138,7 +159,8 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = null
volume = 10
- ignore_flags = TRUE //so you can medipen through hardsuits
+ can_pierce_hardsuits = TRUE //so you can medipen through hardsuits
+ ignore_hypospray_immunity = TRUE
container_type = DRAWABLE
flags = null