diff --git a/code/modules/projectiles/ammunition/special/syringe.dm b/code/modules/projectiles/ammunition/special/syringe.dm
index 62a6e2e88e..331ad67837 100644
--- a/code/modules/projectiles/ammunition/special/syringe.dm
+++ b/code/modules/projectiles/ammunition/special/syringe.dm
@@ -61,8 +61,8 @@
..()
/obj/item/ammo_casing/syringegun/dart
- name = "syringe gun spring"
- desc = "A high-power spring that throws syringes."
- projectile_type = /obj/item/projectile/bullet/dart/syringe
+ name = "dart gun air canister"
+ desc = "A small canister of compressed gas."
+ projectile_type = /obj/item/projectile/bullet/dart/syringe/dart
firing_effect_type = null
harmful = FALSE
diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm
index 2e125f80b1..be9b2c2410 100644
--- a/code/modules/projectiles/guns/misc/syringe_gun.dm
+++ b/code/modules/projectiles/guns/misc/syringe_gun.dm
@@ -110,6 +110,7 @@
item_state = "dartgun"
materials = list(MAT_METAL=2000, MAT_GLASS=500)
suppressed = TRUE //Softer fire sound
+ can_unsuppress = FALSE
/obj/item/gun/syringe/dart/Initialize()
..()
diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm
index 023c3b9090..a94fa6f227 100644
--- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm
+++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm
@@ -9,12 +9,14 @@
create_reagents(50)
reagents.set_reacting(FALSE)
-/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
+/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != 100) // not completely blocked
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.
..()
+ if(skip == TRUE)
+ return
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return TRUE
@@ -37,3 +39,49 @@
/obj/item/projectile/bullet/dart/syringe
name = "syringe"
icon_state = "syringeproj"
+
+//I am in a mess of my own making
+/obj/item/projectile/bullet/dart/syringe/dart
+ name = "Smartdart"
+ icon_state = "syringeproj"
+ damage = 0
+
+/obj/item/projectile/bullet/dart/syringe/dart/on_hit(atom/target, blocked = FALSE)
+ message_admins("Dart landed!")
+ if(iscarbon(target))
+ var/mob/living/carbon/M = target
+ if(blocked != 100) // not completely blocked
+ 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)
+ message_admins("Checking reagents")
+ for(var/datum/reagent/R in reagents.reagent_list) //OD prevention time!
+ message_admins("Reagent: [R]")
+ if(istype(R, /datum/reagent/medicine)) //Is this a medicine?
+ message_admins("Is a medicine")
+ if(M.reagents.has_reagent(R.id))
+ message_admins("reagent found! with new")
+ var/datum/reagent/medicine/Rm = locate(R) in M
+ if(R.overdose_threshold == 0) //Is there a possible OD?
+ M.reagents.add_reagent(R.id, R.volume)
+ else
+ var/transVol = CLAMP(R.volume, 0, (R.overdose_threshold - Rm.volume) -1)
+ M.reagents.add_reagent(R.id, transVol)
+ target.visible_message("\The [src] beeps!")
+ return TRUE
+ else
+ if(!R.overdose_threshold == 0)
+ var/transVol = CLAMP(R.volume, 0, R.overdose_threshold-1)
+ M.reagents.add_reagent(R.id, transVol)
+ else
+ M.reagents.add_reagent(R.id, R.volume)
+ target.visible_message("\The [src] beeps!")
+ to_chat("You feel a tiny prick, and turn around to see a smartdart embedded in your butt.")
+ return TRUE
+
+ else
+ blocked = 100
+ target.visible_message("\The [src] was deflected!", \
+ "You see a [src] bounce off you, booping sadly!")
+
+ target.visible_message("\The [src] fails to land on target!")
+ return TRUE
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index 430d7e5d5d..592d092cc8 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -14,7 +14,6 @@
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
materials = list(MAT_METAL=10, MAT_GLASS=20)
container_type = TRANSPARENT
- var/Sname = "syringe"
/obj/item/reagent_containers/syringe/Initialize()
. = ..()
@@ -73,7 +72,7 @@
if(SYRINGE_DRAW)
if(reagents.total_volume >= reagents.maximum_volume)
- to_chat(user, "The [Sname] is full.")
+ to_chat(user, "The syringe is full.")
return
if(L) //living mob
@@ -138,8 +137,8 @@
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
- L.visible_message("[user] injects [L] with the [Sname]!", \
- "[user] injects [L] with the [Sname]!")
+ L.visible_message("[user] injects [L] with the syringe!", \
+ "[user] injects [L] with the syringe!")
if(L != user)
log_combat(user, L, "injected", src, addition="which had [contained]")
@@ -148,7 +147,7 @@
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
reagents.reaction(L, INJECT, fraction)
reagents.trans_to(target, amount_per_transfer_from_this)
- to_chat(user, "You inject [amount_per_transfer_from_this] units of the solution. The [Sname] now contains [reagents.total_volume] units.")
+ to_chat(user, "You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.")
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
mode = SYRINGE_DRAW
update_icon()
@@ -159,7 +158,7 @@
var/rounded_vol
if(reagents && reagents.total_volume)
rounded_vol = CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
- var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "[Sname][rounded_vol]")
+ var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
filling_overlay.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling_overlay)
else
@@ -265,23 +264,64 @@
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
/obj/item/reagent_containers/syringe/dart
- name = "medicinal dart"
- desc = "A non-harmful dart that can administer medication from a range. Unable to hold any caustic or toxic chemicals without disintegrating"
+ name = "medicinal 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."
volume = 20
amount_per_transfer_from_this = 20
icon = 'icons/obj/dart.dmi'
- Sname = "dart"
+ item_state = "dart_0"
//harmful = FALSE
/obj/item/reagent_containers/syringe/dart/afterattack(atom/target, mob/user , proximity)
- ..()
- for(var/datum/reagent/R in src.reagents.reagent_list)//(!R == /datum/reagent/fermi) ||
- if((!R == /datum/reagent/medicine) || (!R == /datum/reagent/consumable))
- qdel(src)
- to_chat(user, "The dart dissolves under the caustic nature of the chems!")
+
+ if(busy)
+ return
+ if(!proximity)
+ return
+ if(!target.reagents)
+ return
+
+ var/mob/living/L
+ if(isliving(target))
+ L = target
+ if(!L.can_inject(user, 1))
+ return
+
+ switch(mode)
+ if(SYRINGE_DRAW)
+
+ if(reagents.total_volume >= reagents.maximum_volume)
+ to_chat(user, "The dart is full!")
+ return
+
+ if(L) //living mob
+ to_chat(user, "You can't draw blood using a dart!")
+ return
+
+ else //if not mob
+ if(!target.reagents.total_volume)
+ to_chat(user, "[target] is empty!")
+ return
+
+ if(!target.is_drawable())
+ to_chat(user, "You cannot directly remove reagents from [target]!")
+ return
+
+ var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
+
+ to_chat(user, "You soak the [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.")
+ if (reagents.total_volume >= reagents.maximum_volume)
+ mode=!mode
+ update_icon()
+
+ if(SYRINGE_INJECT)
+ src.visible_message("The smartdart gives a frustrated boop! It's ready and full; You need to shoot someone with it!")
+
+/obj/item/reagent_containers/syringe/dart/attack_self(mob/user)
+ return
/obj/item/reagent_containers/syringe/dart/bluespace
- name = "bluespace dart"
+ name = "bluespace smartdart"
desc = "A non-harmful dart that can administer medication from a range, with extended 60u capacity. Unable to hold any caustic or toxic chemicals without disintegrating"
amount_per_transfer_from_this = 20
volume = 60
diff --git a/icons/obj/dart.dmi b/icons/obj/dart.dmi
index fd6be8ab14..50ba4fc1ab 100644
Binary files a/icons/obj/dart.dmi and b/icons/obj/dart.dmi differ
diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi
index 5ed5a434ba..7d44d35f55 100644
Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ