From b0b347660ed8492d35ea0eaa0e102b35c875a417 Mon Sep 17 00:00:00 2001 From: DGamerL <108773801+DGamerL@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:52:02 +0200 Subject: [PATCH] The Rapid Syringe gun now costs 12 TC. It can also pierce all clothing now. (#21674) * RATATATATATA * We use TRUE, not 1 * making it cost 12 * making progress * FINALLY * Lewcc review * Whoops this too * Lewcc review * Might work, might not, but conflict time * Henri review --- code/__HELPERS/trait_helpers.dm | 1 + code/datums/uplink_items/uplink_general.dm | 2 +- .../clothing/spacesuits/ert_hardsuits.dm | 8 +++++++ code/modules/clothing/spacesuits/hardsuit.dm | 4 ++++ .../clothing/spacesuits/misc_spacesuits.dm | 4 ++++ .../mob/living/carbon/human/human_mob.dm | 21 ++++++++++--------- code/modules/projectiles/guns/syringe_gun.dm | 2 +- .../modules/projectiles/projectile/bullets.dm | 6 ++++++ 8 files changed, 36 insertions(+), 12 deletions(-) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index aa5fe7629fe..4672f249459 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -176,6 +176,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_PUNCTURE_IMMUNE "punctureimmune" //prevents RSG syringes from piercing your clothing #define TRAIT_NO_BONES "no_bones" #define TRAIT_STURDY_LIMBS "sturdy_limbs" diff --git a/code/datums/uplink_items/uplink_general.dm b/code/datums/uplink_items/uplink_general.dm index 6361c02c8b2..3b12afec0b5 100644 --- a/code/datums/uplink_items/uplink_general.dm +++ b/code/datums/uplink_items/uplink_general.dm @@ -332,7 +332,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A syndicate rapid syringe gun able to fill and fire syringes automatically from an internal reagent reservoir. Comes pre-loaded with 7 empty syringes, and has a maximum capacity of 14 syringes and 300u of reagents." reference = "RSG" item = /obj/item/gun/syringe/rapidsyringe/preloaded/half - cost = 8 + cost = 12 /datum/uplink_item/stealthy_weapons/poisonbottle name = "Poison Bottle" diff --git a/code/modules/clothing/spacesuits/ert_hardsuits.dm b/code/modules/clothing/spacesuits/ert_hardsuits.dm index 4ac26dcdcff..622cb0c1838 100644 --- a/code/modules/clothing/spacesuits/ert_hardsuits.dm +++ b/code/modules/clothing/spacesuits/ert_hardsuits.dm @@ -123,6 +123,10 @@ item_state = "syndicate-black-red" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert/security +/obj/item/clothing/suit/space/hardsuit/ert/security/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_PUNCTURE_IMMUNE, ROUNDSTART_TRAIT) + /obj/item/clothing/suit/space/hardsuit/ert/security/gamma name = "elite emergency response team security suit" max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT @@ -181,6 +185,10 @@ icon_state = "ert_medical" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert/medical +/obj/item/clothing/suit/space/hardsuit/ert/medical/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_PUNCTURE_IMMUNE, ROUNDSTART_TRAIT) + /obj/item/clothing/suit/space/hardsuit/ert/medical/gamma name = "elite emergency response team medical suit" max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index c106e1cdc26..78740772fcd 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -477,6 +477,10 @@ item_color = "sst" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite/sst +/obj/item/clothing/suit/space/hardsuit/syndi/elite/sst/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_PUNCTURE_IMMUNE, ROUNDSTART_TRAIT) + /obj/item/clothing/suit/space/hardsuit/syndi/freedom name = "eagle suit" desc = "An advanced, light suit, fabricated from a mixture of synthetic feathers and space-resistant material. A gun holster appears to be integrated into the suit." diff --git a/code/modules/clothing/spacesuits/misc_spacesuits.dm b/code/modules/clothing/spacesuits/misc_spacesuits.dm index 0f983573135..c7af4b884c6 100644 --- a/code/modules/clothing/spacesuits/misc_spacesuits.dm +++ b/code/modules/clothing/spacesuits/misc_spacesuits.dm @@ -63,6 +63,10 @@ strip_delay = 130 dog_fashion = /datum/dog_fashion/back/deathsquad +/obj/item/clothing/suit/space/deathsquad/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_PUNCTURE_IMMUNE, ROUNDSTART_TRAIT) + /obj/item/clothing/head/helmet/space/deathsquad/beret name = "officer beret" desc = "An armored beret commonly used by special operations officers." diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index b0f63a2c2a3..7772b0d8c09 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -1032,7 +1032,7 @@ xylophone=0 return -/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE) +/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, piercing = FALSE) . = TRUE if(!target_zone) @@ -1044,23 +1044,24 @@ if(HAS_TRAIT(src, TRAIT_PIERCEIMMUNE)) . = FALSE - + if(HAS_TRAIT(wear_suit, TRAIT_PUNCTURE_IMMUNE)) + . = FALSE var/obj/item/organ/external/affecting = get_organ(target_zone) var/fail_msg if(!affecting) . = FALSE fail_msg = "[p_they(TRUE)] [p_are()] missing that limb." - else if(affecting.is_robotic()) + if(affecting.is_robotic()) . = FALSE fail_msg = "That limb is robotic." + if(piercing) + return TRUE + if(target_zone == "head") + if((head?.flags & THICKMATERIAL) && !penetrate_thick) + . = FALSE else - switch(target_zone) - if("head") - if(head && head.flags & THICKMATERIAL && !penetrate_thick) - . = FALSE - else - if(wear_suit && wear_suit.flags & THICKMATERIAL && !penetrate_thick) - . = FALSE + if((wear_suit?.flags & THICKMATERIAL) && !penetrate_thick) + . = FALSE if(!. && error_msg && user) if(!fail_msg) fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on [p_their()] head" : "on [p_their()] body"] to inject into." diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm index 1864c65d3da..c391431425f 100644 --- a/code/modules/projectiles/guns/syringe_gun.dm +++ b/code/modules/projectiles/guns/syringe_gun.dm @@ -315,7 +315,7 @@ if(!S) return - chambered.BB = new S.projectile_type(src) + chambered.BB = new /obj/item/projectile/bullet/dart/syringe/pierce_ignore(src) update_loaded_syringe() chambered.BB.name = S.name diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 2a4a68c2c02..f52b293c435 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -294,6 +294,12 @@ icon = 'icons/obj/chemical.dmi' icon_state = "syringeproj" +/obj/item/projectile/bullet/dart/syringe/pierce_ignore + +/obj/item/projectile/bullet/dart/syringe/pierce_ignore/on_hit(atom/target, blocked = 0, hit_zone) + . = ..() + piercing = TRUE + /obj/item/projectile/bullet/dart/syringe/tranquilizer /obj/item/projectile/bullet/dart/syringe/tranquilizer/New()