Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions code/modules/projectiles/ammunition/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,30 @@
name = "shotgun dart"
desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical."
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
projectile_type = /obj/item/projectile/bullet/reusable/dart
var/reagent_amount = 30
var/no_react = FALSE

/obj/item/ammo_casing/shotgun/dart/Initialize()
. = ..()
create_reagents(reagent_amount, OPENCONTAINER)
if(no_react)
ENABLE_BITFIELD(reagents.flags, NO_REACT)

/obj/item/ammo_casing/shotgun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(reagents.total_volume < 0)
return
var/obj/item/projectile/bullet/reusable/dart/D = BB
var/obj/item/reagent_containers/syringe/dart/temp/new_dart = new(D)

new_dart.volume = reagents.total_volume
if(no_react)
new_dart.reagent_flags |= NO_REACT
reagents.trans_to(new_dart, reagents.total_volume, transfered_by = user)
D.add_dart(new_dart)
..()

/obj/item/ammo_casing/shotgun/dart/attackby()
return
Expand All @@ -140,10 +158,7 @@
desc = "A dart for use in shotguns, using similar technology as cryostatis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical."
icon_state = "cnrshell"
reagent_amount = 10

/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
. = ..()
ENABLE_BITFIELD(reagents.flags, NO_REACT)
no_react = TRUE

/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
Expand Down
17 changes: 9 additions & 8 deletions code/modules/projectiles/ammunition/special/syringe.dm
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
/obj/item/ammo_casing/syringegun
name = "syringe gun spring"
desc = "A high-power spring that throws syringes."
projectile_type = /obj/item/projectile/bullet/dart/syringe
projectile_type = /obj/item/projectile/bullet/reusable/dart/syringe
firing_effect_type = null

/obj/item/ammo_casing/syringegun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
if(!BB)
return
if(istype(loc, /obj/item/gun/syringe))
var/obj/item/gun/syringe/SG = loc
var/obj/item/projectile/bullet/reusable/dart/D = BB
if(!SG.syringes.len)
return

var/obj/item/reagent_containers/syringe/S = SG.syringes[1]

S.reagents.trans_to(BB, S.reagents.total_volume, transfered_by = user)
BB.name = S.name
var/obj/item/projectile/bullet/dart/D = BB
D.piercing = S.proj_piercing
D.add_dart(S)
SG.syringes.Remove(S)
qdel(S)
..()

/obj/item/ammo_casing/chemgun
name = "dart synthesiser"
desc = "A high-power spring, linked to an energy-based dart synthesiser."
projectile_type = /obj/item/projectile/bullet/dart
projectile_type = /obj/item/projectile/bullet/reusable/dart
firing_effect_type = null

/obj/item/ammo_casing/chemgun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
Expand All @@ -35,8 +33,11 @@
var/obj/item/gun/chem/CG = loc
if(CG.syringes_left <= 0)
return
CG.reagents.trans_to(BB, 15, transfered_by = user)
BB.name = "chemical dart"
var/obj/item/projectile/bullet/reusable/dart/D = BB
var/obj/item/reagent_containers/syringe/dart/temp/new_dart = new(D)

CG.reagents.trans_to(new_dart, 15, transfered_by = user)
D.add_dart(new_dart)
CG.syringes_left--
..()

Expand Down
40 changes: 22 additions & 18 deletions code/modules/projectiles/projectile/bullets/dart_syringe.dm
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
/obj/item/projectile/bullet/dart
/obj/item/projectile/bullet/reusable/dart
name = "dart"
icon_state = "cbbolt"
damage = 6
var/obj/item/reagent_containers/container
var/piercing = FALSE

/obj/item/projectile/bullet/dart/Initialize()
/obj/item/projectile/bullet/reusable/dart/Initialize()
. = ..()
create_reagents(50, NO_REACT)

/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
/obj/item/projectile/bullet/reusable/dart/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
var/mob/living/carbon/C = 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(C.embed_object(container, def_zone, FALSE))
dropped = TRUE
..()
reagents.reaction(M, INJECT)
reagents.trans_to(M, reagents.total_volume)
return BULLET_ACT_HIT
else
blocked = 100
target.visible_message(span_danger("\The [src] was deflected!"), \
span_userdanger("You were protected against \the [src]!"))
target.visible_message(span_danger("\The [container] was deflected!"), \
span_userdanger("You were protected against \the [container]!"))

..(target, blocked)
DISABLE_BITFIELD(reagents.flags, NO_REACT)
reagents.handle_reactions()
return BULLET_ACT_HIT

/obj/item/projectile/bullet/dart/metalfoam/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/aluminium, 15)
reagents.add_reagent(/datum/reagent/foaming_agent, 5)
reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 5)
/obj/item/projectile/bullet/reusable/dart/handle_drop()
if(!dropped)
container.forceMove(get_turf(src))
dropped = TRUE

/obj/item/projectile/bullet/reusable/dart/proc/add_dart(obj/item/reagent_containers/new_dart)
container = new_dart
new_dart.forceMove(src)
name = new_dart.name
if(istype(new_dart, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/syringe
piercing = syringe.proj_piercing

/obj/item/projectile/bullet/dart/syringe
/obj/item/projectile/bullet/reusable/dart/syringe
name = "syringe"
icon_state = "syringeproj"
20 changes: 19 additions & 1 deletion code/modules/reagents/reagent_containers/syringes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
materials = list(/datum/material/iron=10, /datum/material/glass=20)
reagent_flags = TRANSPARENT
sharpness = SHARP_POINTY
embedding = list("embedded_pain_chance" = 0, "embedded_pain_multiplier" = 0, "embedded_unsafe_removal_time" = 0.25 SECONDS, "embedded_unsafe_removal_pain_multiplier" = 0, "embed_chance" = 15, "embedded_fall_chance" = 5)

/obj/item/reagent_containers/syringe/Initialize()
. = ..()
Expand Down Expand Up @@ -193,6 +194,12 @@
injoverlay = "inject"
add_overlay(injoverlay)
M.update_inv_hands()

/obj/item/reagent_containers/syringe/on_embed(mob/living/carbon/human/embedde, obj/item/bodypart/part)
reagents.trans_to(embedde, amount_per_transfer_from_this)

/obj/item/reagent_containers/syringe/embed_tick(embedde, part)
reagents.trans_to(embedde, amount_per_transfer_from_this * 0.2)

/obj/item/reagent_containers/syringe/epinephrine
name = "syringe (epinephrine)"
Expand Down Expand Up @@ -286,7 +293,6 @@
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
volume = 10
proj_piercing = 1

/obj/item/reagent_containers/syringe/crude
name = "crude syringe"
desc = "A crudely made syringe. The flimsy wooden construction makes it hold up minimal amounts of reagents."
Expand All @@ -296,3 +302,15 @@
name = "spider extract syringe"
desc = "Contains crikey juice - makes any gold core create the most deadly companions in the world."
list_reagents = list(/datum/reagent/spider_extract = 1)

/obj/item/reagent_containers/syringe/dart
name = "reagent dart"
amount_per_transfer_from_this = 10
embedding = list("embed_chance" = 15, "embedded_fall_chance" = 0)

/obj/item/reagent_containers/syringe/dart/temp
item_flags = DROPDEL

/obj/item/reagent_containers/syringe/dart/temp/on_embed_removal(mob/living/carbon/human/embedde)
qdel(src)

10 changes: 10 additions & 0 deletions code/modules/research/designs/medical_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/dartsyringe
name = "Reagent Dart"
desc = "A specialized syringe that quickly inject reagent. It can hold up to 15 units."
id = "dartsyringe"
build_type = PROTOLATHE
materials = list(/datum/material/glass = 2500)
build_path = /obj/item/reagent_containers/syringe/dart
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL

/datum/design/bluespacebodybag
name = "Bluespace Body Bag"
desc = "A bluespace body bag, powered by experimental bluespace technology. It can hold loads of bodies and the largest of creatures."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@
display_name = "Medical Weaponry"
description = "Weapons using medical technology."
prereq_ids = list("adv_biotech", "adv_weaponry")
design_ids = list("rapidsyringe", "shotgundartcryostatis")
design_ids = list("rapidsyringe", "shotgundartcryostatis", "dartsyringe")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000

Expand Down