Skip to content

Commit 20b97f5

Browse files
authored
fixes syringe guns, stripper guns, size guns (#7235)
1 parent f12c743 commit 20b97f5

File tree

37 files changed

+288
-306
lines changed

37 files changed

+288
-306
lines changed

citadel.dme

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4695,6 +4695,7 @@
46954695
#include "code\modules\projectiles\ammunition\calibers\special\musket.dm"
46964696
#include "code\modules\projectiles\ammunition\calibers\special\pellet.dm"
46974697
#include "code\modules\projectiles\ammunition\calibers\special\rocket.dm"
4698+
#include "code\modules\projectiles\ammunition\calibers\special\syringe.dm"
46984699
#include "code\modules\projectiles\guns\firemode-energy.dm"
46994700
#include "code\modules\projectiles\guns\firemode.dm"
47004701
#include "code\modules\projectiles\guns\firing_pin.dm"
@@ -4715,7 +4716,6 @@
47154716
#include "code\modules\projectiles\guns\gun\launcher\crossbow.dm"
47164717
#include "code\modules\projectiles\guns\gun\launcher\grenade_launcher.dm"
47174718
#include "code\modules\projectiles\guns\gun\launcher\pneumatic.dm"
4718-
#include "code\modules\projectiles\guns\gun\launcher\syringe_gun.dm"
47194719
#include "code\modules\projectiles\guns\gun\launcher\vox.dm"
47204720
#include "code\modules\projectiles\guns\gun\projectile\ballistic-interaction.dm"
47214721
#include "code\modules\projectiles\guns\gun\projectile\ballistic-legacy.dm"
@@ -4743,6 +4743,7 @@
47434743
#include "code\modules\projectiles\guns\gun\projectile\ballistic\semiauto.dm"
47444744
#include "code\modules\projectiles\guns\gun\projectile\ballistic\shotgun.dm"
47454745
#include "code\modules\projectiles\guns\gun\projectile\ballistic\sniper.dm"
4746+
#include "code\modules\projectiles\guns\gun\projectile\ballistic\syringe.dm"
47464747
#include "code\modules\projectiles\guns\gun\projectile\ballistic\caseless\pellet.dm"
47474748
#include "code\modules\projectiles\guns\gun\projectile\energy\frontier.dm"
47484749
#include "code\modules\projectiles\guns\gun\projectile\energy\hardlight_bow.dm"
@@ -4752,8 +4753,9 @@
47524753
#include "code\modules\projectiles\guns\gun\projectile\energy\nuclear.dm"
47534754
#include "code\modules\projectiles\guns\gun\projectile\energy\particle.dm"
47544755
#include "code\modules\projectiles\guns\gun\projectile\energy\phase.dm"
4755-
#include "code\modules\projectiles\guns\gun\projectile\energy\sizegun_vr.dm"
4756+
#include "code\modules\projectiles\guns\gun\projectile\energy\sizegun.dm"
47564757
#include "code\modules\projectiles\guns\gun\projectile\energy\special.dm"
4758+
#include "code\modules\projectiles\guns\gun\projectile\energy\stripper.dm"
47574759
#include "code\modules\projectiles\guns\gun\projectile\energy\stun.dm"
47584760
#include "code\modules\projectiles\guns\gun\projectile\energy\temperature.dm"
47594761
#include "code\modules\projectiles\guns\gun\projectile\magic\staff.dm"
@@ -4939,7 +4941,8 @@
49394941
#include "code\modules\reagents\reagent_containers\patch.dm"
49404942
#include "code\modules\reagents\reagent_containers\pill.dm"
49414943
#include "code\modules\reagents\reagent_containers\pill_vr.dm"
4942-
#include "code\modules\reagents\reagent_containers\syringes.dm"
4944+
#include "code\modules\reagents\reagent_containers\syringe-misc.dm"
4945+
#include "code\modules\reagents\reagent_containers\syringe.dm"
49434946
#include "code\modules\reagents\reagent_containers\syringes_vr.dm"
49444947
#include "code\modules\reagents\reagent_containers\unidentified_hypospray.dm"
49454948
#include "code\modules\reagents\reagent_containers\glass\bottle_vr.dm"

code/datums/design/designs/medical/misc.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id = "AmmoSyringeCartridge"
33
lathe_type = LATHE_TYPE_AUTOLATHE
44
design_unlock = DESIGN_UNLOCK_INTRINSIC
5-
build_path = /obj/item/syringe_cartridge
5+
build_path = /obj/item/ammo_casing/syringe
66

77
/datum/prototype/design/medical/implanter
88
id = "MedicalImplanter"

code/game/atoms/movable/movable.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
var/tmp/movement_type = MOVEMENT_GROUND
8282

8383
//? Spacedrift
84+
// todo: rework spacedrift, proper bucket subsystem.
8485
/// Which direction we're drifting
8586
var/inertia_dir = NONE
8687
/// Only set while drifting, last location we were while drifting

code/game/content/factions/corporations/nanotrasen/guns/nt_hydra-legacy.dm

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,24 +89,4 @@
8989
microbattery_group_key = "stripper"
9090
microbattery_mode_color = "#fc8d0f"
9191
microbattery_mode_name = "<span style='color:#fc8d0f;font-weight:bold;'>STRIPPER</span>"
92-
projectile_type = /obj/projectile/bullet/stripper
93-
94-
/obj/projectile/bullet/stripper
95-
icon_state = "magicm"
96-
nodamage = 1
97-
damage_inflict_agony = 5
98-
embed_chance = 0
99-
damage_mode = NONE
100-
damage_flag = ARMOR_MELEE
101-
102-
/obj/projectile/bullet/stripper/on_impact(atom/target, impact_flags, def_zone, efficiency)
103-
. = ..()
104-
if(. & PROJECTILE_IMPACT_FLAGS_UNCONDITIONAL_ABORT)
105-
return
106-
107-
if(ishuman(target))
108-
var/mob/living/carbon/human/H = target
109-
if(!H.permit_stripped)
110-
return
111-
H.drop_slots_to_ground(list(SLOT_ID_SUIT, SLOT_ID_UNIFORM, SLOT_ID_BACK, SLOT_ID_SHOES, SLOT_ID_GLOVES))
112-
//Hats can stay! Most other things fall off with removing these.
92+
projectile_type = /obj/projectile/energy/stripper

code/game/objects/items/storage/boxes.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
name = "box of syringe gun cartridges"
109109
desc = "A box full of compressed gas cartridges."
110110
icon_state = "syringe"
111-
starts_with = list(/obj/item/syringe_cartridge = 7)
111+
starts_with = list(/obj/item/ammo_casing/syringe = 7)
112112

113113
/obj/item/storage/box/beakers
114114
name = "box of beakers"

code/modules/mob/_modifiers/traits_phobias.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@
522522
if(istype(thing, /obj/item/implanter))
523523
fear_amount += 8 //Very big needle.
524524

525-
if(istype(thing, /obj/item/gun/launcher/syringe))
525+
if(istype(thing, /obj/item/gun/projectile/ballistic/syringe))
526526
fear_amount += 6
527527

528528
if(istype(thing, /mob/living/carbon/human))
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/datum/ammo_caliber/syringe
2+
id = "syringe"
3+
caliber = "syringe"
4+
5+
/obj/item/ammo_casing/syringe
6+
name = "syringe gun cartridge"
7+
desc = "An impact-triggered compressed gas cartridge that can be fitted to a syringe for rapid injection."
8+
icon = 'icons/modules/projectiles/casings/syringe.dmi'
9+
icon_state = "syringe-cartridge"
10+
materials_base = list(MAT_STEEL = 125, MAT_GLASS = 375)
11+
slot_flags = SLOT_BELT | SLOT_EARS
12+
throw_force = 3
13+
damage_force = 3
14+
casing_flags = CASING_DELETE
15+
w_class = WEIGHT_CLASS_TINY
16+
17+
projectile_type = /obj/projectile/syringe
18+
19+
var/obj/item/reagent_containers/syringe/syringe
20+
21+
22+
/obj/item/ammo_casing/syringe/expend()
23+
var/obj/projectile/syringe/maybe_syringe = ..()
24+
if(!istype(maybe_syringe))
25+
return maybe_syringe
26+
if(syringe)
27+
syringe.forceMove(maybe_syringe)
28+
maybe_syringe.syringe = syringe
29+
syringe = null
30+
return maybe_syringe
31+
32+
/obj/item/ammo_casing/syringe/update_icon()
33+
underlays.Cut()
34+
. = ..()
35+
if(syringe)
36+
underlays += image(syringe.icon, src, syringe.icon_state)
37+
underlays += syringe.filling
38+
39+
/obj/item/ammo_casing/syringe/using_item_on(obj/item/using, datum/event_args/actor/clickchain/clickchain, clickchain_flags)
40+
. = ..()
41+
if(.)
42+
return
43+
if(istype(using, /obj/item/reagent_containers/syringe))
44+
if(!clickchain.performer.attempt_insert_item_for_installation(using, src))
45+
return TRUE
46+
syringe = using
47+
clickchain.chat_feedback(SPAN_NOTICE("You carefully insert [using] into [src]"), target = src)
48+
damage_mode |= DAMAGE_MODE_SHARP
49+
update_icon()
50+
return TRUE
51+
52+
/obj/item/ammo_casing/syringe/on_attack_hand(datum/event_args/actor/clickchain/clickchain, clickchain_flags)
53+
. = ..()
54+
if(.)
55+
return
56+
if(!clickchain.performer.is_holding_inactive(src))
57+
return
58+
if(!syringe)
59+
return
60+
clickchain.chat_feedback(SPAN_NOTICE("You remove [syringe] from [src]."))
61+
clickchain.performer.grab_item_from_interacted_with(syringe, src)
62+
syringe = null
63+
playsound(src, 'sound/weapons/empty.ogg', 50, TRUE)
64+
damage_mode &= ~DAMAGE_MODE_SHARP
65+
update_icon()
66+
67+
/obj/projectile/syringe
68+
name = "syringe"
69+
icon = 'icons/modules/projectiles/projectile-misc.dmi'
70+
icon_state = "syringe"
71+
impact_sound = PROJECTILE_IMPACT_SOUNDS_KINETIC
72+
var/obj/item/reagent_containers/syringe/syringe
73+
74+
/obj/projectile/syringe/proc/set_syringe(obj/item/reagent_containers/syringe/syringe)
75+
src.syringe = syringe
76+
src.name = syringe.name
77+
src.desc = syringe.desc
78+
79+
/obj/projectile/syringe/expire(impacting)
80+
syringe?.forceMove(drop_location())
81+
syringe = null
82+
return ..()
83+
84+
/obj/projectile/syringe/on_impact(atom/target, impact_flags, def_zone, efficiency)
85+
if(!syringe)
86+
return ..()
87+
var/units_injected = 0
88+
impact_flags = syringe.handle_impact_as_projectile(target, impact_flags, def_zone, efficiency, &units_injected)
89+
if(units_injected)
90+
add_attack_logs(firer, target, "Shot with [src.name] transferring [units_injected] units")
91+
return ..()

code/modules/projectiles/guns/gun-firing.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
// todo: do we really need to newtonian move always? some guns shouldn't?
253253
if(ismovable(cycle.firing_atom))
254254
var/atom/movable/movable_firer = cycle.firing_atom
255-
movable_firer.newtonian_move(angle2dir(cycle.original_angle))
255+
movable_firer.newtonian_move(turn(angle2dir(cycle.original_angle), 180))
256256

257257
// todo: muzzle flash implementation
258258

code/modules/projectiles/guns/gun/launcher/syringe_gun.dm

Lines changed: 0 additions & 143 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/obj/item/gun/projectile/ballistic/syringe
2+
name = "syringe gun"
3+
desc = "A spring loaded rifle designed to fit syringes, designed to incapacitate unruly patients from a distance."
4+
icon = 'icons/modules/projectiles/guns/ballistic/syringe.dmi'
5+
icon_state = "syringe"
6+
w_class = WEIGHT_CLASS_NORMAL
7+
materials_base = list(MAT_STEEL = 2000)
8+
damage_force = 7
9+
slot_flags = SLOT_BELT
10+
11+
fire_sound = 'sound/weapons/empty.ogg'
12+
fire_sound_text = "a metallic thunk"
13+
recoil = 0
14+
15+
internal_magazine_size = 1
16+
bolt_simulation = TRUE
17+
chamber_simulation = TRUE
18+
19+
/obj/item/gun/projectile/ballistic/syringe/rapid
20+
name = "syringe gun revolver"
21+
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to five syringes. The spring still needs to be drawn between shots."
22+
icon_state = "syringe-rapid"
23+
internal_magazine_size = 5
24+
bolt_simulation = FALSE
25+
chamber_simulation = FALSE

0 commit comments

Comments
 (0)