Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit fc51016

Browse files
committed
TGS Test merge #14192
2 parents 5117874 + 6ee5bf6 commit fc51016

File tree

6 files changed

+78
-33
lines changed

6 files changed

+78
-33
lines changed

code/modules/projectiles/ammunition/ballistic/shotgun.dm

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,30 @@
133133
name = "shotgun dart"
134134
desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical."
135135
icon_state = "cshell"
136-
projectile_type = /obj/item/projectile/bullet/dart
136+
projectile_type = /obj/item/projectile/bullet/reusable/dart
137137
var/reagent_amount = 30
138+
var/no_react = FALSE
138139

139140
/obj/item/ammo_casing/shotgun/dart/Initialize()
140141
. = ..()
141142
create_reagents(reagent_amount, OPENCONTAINER)
143+
if(no_react)
144+
ENABLE_BITFIELD(reagents.flags, NO_REACT)
145+
146+
/obj/item/ammo_casing/shotgun/dart/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
147+
if(!BB)
148+
return
149+
if(reagents.total_volume < 0)
150+
return
151+
var/obj/item/projectile/bullet/reusable/dart/D = BB
152+
var/obj/item/reagent_containers/syringe/dart/temp/new_dart = new(D)
153+
154+
new_dart.volume = reagents.total_volume
155+
if(no_react)
156+
new_dart.reagent_flags |= NO_REACT
157+
reagents.trans_to(new_dart, reagents.total_volume, transfered_by = user)
158+
D.add_dart(new_dart)
159+
..()
142160

143161
/obj/item/ammo_casing/shotgun/dart/attackby()
144162
return
@@ -148,10 +166,7 @@
148166
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."
149167
icon_state = "cnrshell"
150168
reagent_amount = 10
151-
152-
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
153-
. = ..()
154-
ENABLE_BITFIELD(reagents.flags, NO_REACT)
169+
no_react = TRUE
155170

156171
/obj/item/ammo_casing/shotgun/dart/bioterror
157172
desc = "A shotgun dart filled with deadly toxins."

code/modules/projectiles/ammunition/special/syringe.dm

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
/obj/item/ammo_casing/syringegun
22
name = "syringe gun spring"
33
desc = "A high-power spring that throws syringes."
4-
projectile_type = /obj/item/projectile/bullet/dart/syringe
4+
projectile_type = /obj/item/projectile/bullet/reusable/dart/syringe
55
firing_effect_type = null
66

77
/obj/item/ammo_casing/syringegun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
88
if(!BB)
99
return
1010
if(istype(loc, /obj/item/gun/syringe))
1111
var/obj/item/gun/syringe/SG = loc
12+
var/obj/item/projectile/bullet/reusable/dart/D = BB
1213
if(!SG.syringes.len)
1314
return
1415

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

1718
S.reagents.trans_to(BB, S.reagents.total_volume, transfered_by = user)
18-
BB.name = S.name
19-
var/obj/item/projectile/bullet/dart/D = BB
20-
D.piercing = S.proj_piercing
19+
D.add_dart(S)
2120
SG.syringes.Remove(S)
22-
qdel(S)
2321
..()
2422

2523
/obj/item/ammo_casing/chemgun
2624
name = "dart synthesiser"
2725
desc = "A high-power spring, linked to an energy-based dart synthesiser."
28-
projectile_type = /obj/item/projectile/bullet/dart
26+
projectile_type = /obj/item/projectile/bullet/reusable/dart
2927
firing_effect_type = null
3028

3129
/obj/item/ammo_casing/chemgun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
@@ -35,8 +33,11 @@
3533
var/obj/item/gun/chem/CG = loc
3634
if(CG.syringes_left <= 0)
3735
return
38-
CG.reagents.trans_to(BB, 15, transfered_by = user)
39-
BB.name = "chemical dart"
36+
var/obj/item/projectile/bullet/reusable/dart/D = BB
37+
var/obj/item/reagent_containers/syringe/dart/temp/new_dart = new(D)
38+
39+
CG.reagents.trans_to(new_dart, 15, transfered_by = user)
40+
D.add_dart(new_dart)
4041
CG.syringes_left--
4142
..()
4243

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
1-
/obj/item/projectile/bullet/dart
1+
/obj/item/projectile/bullet/reusable/dart
22
name = "dart"
33
icon_state = "cbbolt"
44
damage = 6
5+
var/obj/item/reagent_containers/container
56
var/piercing = FALSE
67

7-
/obj/item/projectile/bullet/dart/Initialize()
8+
/obj/item/projectile/bullet/reusable/dart/Initialize()
89
. = ..()
9-
create_reagents(50, NO_REACT)
1010

11-
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
11+
/obj/item/projectile/bullet/reusable/dart/on_hit(atom/target, blocked = FALSE)
1212
if(iscarbon(target))
13-
var/mob/living/carbon/M = target
13+
var/mob/living/carbon/C = target
1414
if(blocked != 100) // not completely blocked
15-
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.
15+
if(C.embed_object(container, def_zone, FALSE))
16+
dropped = TRUE
1617
..()
17-
reagents.reaction(M, INJECT)
18-
reagents.trans_to(M, reagents.total_volume)
1918
return BULLET_ACT_HIT
2019
else
2120
blocked = 100
22-
target.visible_message(span_danger("\The [src] was deflected!"), \
23-
span_userdanger("You were protected against \the [src]!"))
21+
target.visible_message(span_danger("\The [container] was deflected!"), \
22+
span_userdanger("You were protected against \the [container]!"))
2423

2524
..(target, blocked)
26-
DISABLE_BITFIELD(reagents.flags, NO_REACT)
27-
reagents.handle_reactions()
2825
return BULLET_ACT_HIT
2926

30-
/obj/item/projectile/bullet/dart/metalfoam/Initialize()
31-
. = ..()
32-
reagents.add_reagent(/datum/reagent/aluminium, 15)
33-
reagents.add_reagent(/datum/reagent/foaming_agent, 5)
34-
reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 5)
27+
/obj/item/projectile/bullet/reusable/dart/handle_drop()
28+
if(!dropped)
29+
container.forceMove(get_turf(src))
30+
dropped = TRUE
31+
32+
/obj/item/projectile/bullet/reusable/dart/proc/add_dart(obj/item/reagent_containers/new_dart)
33+
container = new_dart
34+
new_dart.forceMove(src)
35+
name = new_dart.name
36+
if(istype(new_dart, /obj/item/reagent_containers/syringe))
37+
var/obj/item/reagent_containers/syringe/syringe
38+
piercing = syringe.proj_piercing
3539

36-
/obj/item/projectile/bullet/dart/syringe
40+
/obj/item/projectile/bullet/reusable/dart/syringe
3741
name = "syringe"
3842
icon_state = "syringeproj"

code/modules/reagents/reagent_containers/syringes.dm

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
materials = list(/datum/material/iron=10, /datum/material/glass=20)
1616
reagent_flags = TRANSPARENT
1717
sharpness = SHARP_POINTY
18+
embedding = list("embedded_pain_chance" = 0, "embedded_pain_multiplier" = 0, "embedded_unsafe_removal_time" = 1 SECONDS, "embedded_unsafe_removal_pain_multiplier" = 0, "embed_chance" = 15, "embedded_fall_chance" = 5)
1819

1920
/obj/item/reagent_containers/syringe/Initialize()
2021
. = ..()
@@ -193,6 +194,9 @@
193194
injoverlay = "inject"
194195
add_overlay(injoverlay)
195196
M.update_inv_hands()
197+
198+
/obj/item/reagent_containers/syringe/embed_tick(embedde, part)
199+
reagents.trans_to(embedde, amount_per_transfer_from_this * 0.5)
196200

197201
/obj/item/reagent_containers/syringe/epinephrine
198202
name = "syringe (epinephrine)"
@@ -286,7 +290,6 @@
286290
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
287291
volume = 10
288292
proj_piercing = 1
289-
290293
/obj/item/reagent_containers/syringe/crude
291294
name = "crude syringe"
292295
desc = "A crudely made syringe. The flimsy wooden construction makes it hold up minimal amounts of reagents."
@@ -296,3 +299,15 @@
296299
name = "spider extract syringe"
297300
desc = "Contains crikey juice - makes any gold core create the most deadly companions in the world."
298301
list_reagents = list(/datum/reagent/spider_extract = 1)
302+
303+
/obj/item/reagent_containers/syringe/dart
304+
name = "reagent dart"
305+
amount_per_transfer_from_this = 15
306+
embedding = list("embed_chance" = 15, "embedded_fall_chance" = 0)
307+
308+
/obj/item/reagent_containers/syringe/dart/temp
309+
item_flags = DROPDEL
310+
311+
/obj/item/reagent_containers/syringe/dart/temp/on_embed_removal(mob/living/carbon/human/embedde)
312+
qdel(src)
313+

code/modules/research/designs/medical_designs.dm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@
102102
category = list("Medical Designs")
103103
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
104104

105+
/datum/design/dartsyringe
106+
name = "Reagent Dart"
107+
desc = "A specialized syringe that quickly inject reagent. It can hold up to 15 units."
108+
id = "dartsyringe"
109+
build_type = PROTOLATHE
110+
materials = list(/datum/material/glass = 2500)
111+
build_path = /obj/item/reagent_containers/syringe/dart
112+
category = list("Medical Designs")
113+
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
114+
105115
/datum/design/bluespacebodybag
106116
name = "Bluespace Body Bag"
107117
desc = "A bluespace body bag, powered by experimental bluespace technology. It can hold loads of bodies and the largest of creatures."

code/modules/research/techweb/all_nodes.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@
722722
display_name = "Medical Weaponry"
723723
description = "Weapons using medical technology."
724724
prereq_ids = list("adv_biotech", "adv_weaponry")
725-
design_ids = list("rapidsyringe", "shotgundartcryostatis")
725+
design_ids = list("rapidsyringe", "shotgundartcryostatis", "dartsyringe")
726726
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
727727
export_price = 5000
728728

0 commit comments

Comments
 (0)