From 17403bd0594a63189bcc420c43c596e29ab6819b Mon Sep 17 00:00:00 2001 From: Fermi Date: Thu, 13 Jun 2019 00:58:54 +0100 Subject: [PATCH] Non-functioning EMP code for review (revert before merging.) --- code/modules/projectiles/ammunition/special/syringe.dm | 8 ++++++++ .../projectiles/projectile/bullets/dart_syringe.dm | 3 ++- code/modules/reagents/reagent_containers/syringes.dm | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/ammunition/special/syringe.dm b/code/modules/projectiles/ammunition/special/syringe.dm index a4107fa6a2..47ae266e45 100644 --- a/code/modules/projectiles/ammunition/special/syringe.dm +++ b/code/modules/projectiles/ammunition/special/syringe.dm @@ -66,3 +66,11 @@ projectile_type = /obj/item/projectile/bullet/dart/syringe/dart firing_effect_type = null harmful = FALSE + +/obj/item/ammo_casing/syringegun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "") + ..() + var/obj/item/gun/syringe/SG = loc + var/obj/item/reagent_containers/syringe/dart/S = SG.syringes[1] + if(S.emptrig == TRUE) + var/obj/item/projectile/bullet/dart/syringe/dart/D = BB + D.emptrig = TRUE diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm index 92865a3a55..6493e0f015 100644 --- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm +++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm @@ -45,6 +45,7 @@ name = "Smartdart" icon_state = "dartproj" damage = 0 + var/emptrig = FALSE /obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE) if(iscarbon(target)) @@ -55,7 +56,7 @@ for(var/datum/reagent/R in reagents.reagent_list) //OD prevention time! if(istype(R, /datum/reagent/medicine)) //Is this a medicine? if(M.reagents.has_reagent(R.id)) - if(R.overdose_threshold == 0) //Is there a possible OD? + if(R.overdose_threshold == 0 || emptrig == TRUE) //Is there a possible OD? M.reagents.add_reagent(R.id, R.volume) else var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - M.reagents.get_reagent_amount(R.id)) -1) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 4f8dd2c416..78cf518ec9 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -270,6 +270,7 @@ amount_per_transfer_from_this = 20 icon_state = "empty" item_state = "syringe_empty" + var/emptrig = FALSE /obj/item/reagent_containers/syringe/dart/afterattack(atom/target, mob/user , proximity) @@ -341,6 +342,10 @@ add_overlay(injoverlay) M.update_inv_hands() +/obj/item/reagent_containers/syringe/dart/emp_act(severity) + emptrig = TRUE + ..() + /obj/item/reagent_containers/syringe/dart/bluespace name = "bluespace smartdart" desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient, only medicines are administered to the patient using a smart nanofilter and capillary action with a built in safety for OD. Has an extended volume capacity thanks to bluespace foam."