Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New syndie derringer, .38 dart & EMP bullets. Nerfs .38 specialty ammos. #9811

Merged
merged 12 commits into from
Sep 23, 2023
8 changes: 8 additions & 0 deletions code/game/objects/items/storage/uplink_kits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -613,3 +613,11 @@
new /obj/item/disk/nuclear/fake/obvious
for(var/i in 1 to 4)
new /obj/item/toy/reality_pierce(src)

/obj/item/storage/box/syndie_kit/derringer
name = "'Infiltrator' pistol bundle"
desc = "Contains a Syndicate issued coat pistol, and one Match grade .38-special speed loader."

/obj/item/storage/box/syndie_kit/derringer/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/der38(src)
new /obj/item/ammo_box/c38/match(src)
17 changes: 17 additions & 0 deletions code/modules/projectiles/ammunition/ballistic/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@
desc = "A .38 DumDum bullet casing."
projectile_type = /obj/projectile/bullet/c38/dumdum

/obj/item/ammo_casing/c38/dart
name = ".38 'Blister' bullet casing"
desc = "A specialized .38 bullet casing that can be injected with up to 10 units of any chemical."
icon_state = "sP-casing"
projectile_type = /obj/projectile/bullet/dart/c38
var/reagent_amount = 10

/obj/item/ammo_casing/c38/dart/Initialize(mapload)
. = ..()
create_reagents(reagent_amount, OPENCONTAINER)

/obj/item/ammo_casing/c38/emp
name = ".38 'BLK_OUT' bullet casing"
desc = "A specialized .38 bullet casing that releases a small electromagnetic burst on impact."
icon_state = "sS-casing"
projectile_type = /obj/projectile/bullet/c38/emp

/obj/item/ammo_casing/caseless/mime
name = "invisible .38 bullet casing"
icon_state = null
Expand Down
16 changes: 13 additions & 3 deletions code/modules/projectiles/boxes_magazines/ammo_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,29 @@

/obj/item/ammo_box/c38/dumdum
name = "speed loader (.38 DumDum)"
desc = "Designed to quickly reload revolvers. DumDum bullets shatter on impact and shred the target's innards, likely getting caught inside."
desc = "Designed to quickly reload revolvers. DumDum rounds shatter on impact and shred the target's innards, likely getting caught inside."
ammo_type = /obj/item/ammo_casing/c38/dumdum

/obj/item/ammo_box/c38/hotshot
name = "speed loader (.38 Hot Shot)"
desc = "Designed to quickly reload revolvers. Hot Shot bullets contain an incendiary payload."
desc = "Designed to quickly reload revolvers. Hot Shot rounds contain an incendiary payload."
ammo_type = /obj/item/ammo_casing/c38/hotshot

/obj/item/ammo_box/c38/iceblox
name = "speed loader (.38 Iceblox)"
desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload."
desc = "Designed to quickly reload revolvers. Iceblox rounds contain a cryogenic payload."
ammo_type = /obj/item/ammo_casing/c38/iceblox

/obj/item/ammo_box/c38/dart
name = "speed loader (.38 Blister)"
desc = "Designed to quickly reload revolvers. Blister rounds can be injected with up to 10 units of chemicals."
ammo_type = /obj/item/ammo_casing/c38/dart

/obj/item/ammo_box/c38/emp
name = "speed loader (.38 BLK_OUT)"
desc = "Designed to quickly reload revolvers. 'BLK_OUT' rounds unleash a small EMP on impact."
ammo_type = /obj/item/ammo_casing/c38/emp

/obj/item/ammo_box/c38/mime
name = "speed loader (.38 finger)"
max_ammo = 6
Expand Down
9 changes: 9 additions & 0 deletions code/modules/projectiles/boxes_magazines/internal/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
/obj/item/ammo_box/magazine/internal/cylinder/rev38/rubber
ammo_type = /obj/item/ammo_casing/c38/match/bouncy

/obj/item/ammo_box/magazine/internal/der38
name = "derringer internal chambering"
ammo_type = /obj/item/ammo_casing/c38/match
caliber = "38"
max_ammo = 2

/obj/item/ammo_box/magazine/internal/der38/twelveshooter
max_ammo = 12

/obj/item/ammo_box/magazine/internal/cylinder/rev762
name = "\improper Nagant revolver cylinder"
ammo_type = /obj/item/ammo_casing/n762
Expand Down
17 changes: 14 additions & 3 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
var/requires_wielding = TRUE
var/spread_unwielded //Spread induced by holding the gun with 1 hand. (40 for light weapons, 60 for medium by default)
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
var/wild_spread = FALSE //Sets a minimum level of bullet spread per shot; meant for difficult to aim / inaccurate guns.
var/wild_factor = 0.25 //Multiplied by spread to calculate the 'minimum' spread per shot.

var/is_wielded = FALSE

Expand Down Expand Up @@ -368,15 +370,24 @@
return

var/sprd = 0
var/min_gun_sprd = 0
var/min_rand_sprd = 0
var/randomized_gun_spread = 0
var/rand_spr = rand()

if(wild_spread)
var/S
S = sprd * wild_factor //If a gun has WILD SPREAD get the minimum by multiplying spread by its WILD FACTOR
min_gun_sprd = round(S, 0.5) //Clean up that value a tiny bit
S = spread_unwielded * wild_factor //Do the same for the gun's unwielded spread
min_rand_sprd = round(S, 0.5)
if(spread)
randomized_gun_spread = rand(0,spread)
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
randomized_gun_spread = rand(min_gun_sprd,spread)
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex //Does not modify minimum spread, only maximum spread
bonus_spread += 25
if(!is_wielded && requires_wielding)
bonus_spread += spread_unwielded
var/randomized_bonus_spread = rand(0, bonus_spread)
var/randomized_bonus_spread = rand(min_rand_sprd, bonus_spread)

if(burst_size > 1)
firing_burst = TRUE
Expand Down
26 changes: 26 additions & 0 deletions code/modules/projectiles/guns/ballistic/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,32 @@
var/obj/item/suppressor/S = new(src)
install_suppressor(S)

/obj/item/gun/ballistic/automatic/pistol/der38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a difficult to code but potentially cool suggestion, being able to hide this inside a suit or something so you can sneak it into prison with you would be cool. Of course this is only a suggestion and doesn't need to be completed before merging as it may need us to make the suit attachment thing a component.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was debating on making a special set of plain black gloves that can store it, akin to a wrist sling or something. If I wanted to make it attachable to a jumpsuit, I could see about poking around with accessory code and if it's possible to make it not display on examine text.

name = "palm pistol"
desc = "An 'Infiltrator' double-barreled derringer, chambered in .38-special. Not the best for head-on engagements."
icon_state = "derringer"
w_class = WEIGHT_CLASS_SMALL
item_state = null //Too small to show in hand, unless examined
throwforce = 0 //Derringers are light and tiny, no hurtie
mag_type = /obj/item/ammo_box/magazine/internal/der38
load_sound = 'sound/weapons/revolverload.ogg'
eject_sound = 'sound/weapons/revolverempty.ogg'
can_suppress = FALSE
casing_ejector = FALSE
internal_magazine = TRUE
bolt_type = BOLT_TYPE_NO_BOLT //Functionally a double-barrel shotgun
tac_reloads = FALSE
fire_sound_volume = 60
spread = 18 //Innate spread of 18 degrees, unwielded spread of 48; Stechkin is unwielded 40
spread_unwielded = 30 //Manually set unwielded spread to 30; Equivelant weight to 0.5 (Stechkin has weight 1)
wild_spread = TRUE
wild_factor = 0.70 //Minimum spread is 70% of spread value

/obj/item/gun/ballistic/automatic/pistol/der38/twelveshooter //For debugging only, or meme shit
name = "palm pistol devastator"
desc = "By the locker of Davy Jones, it be a fuhckin' twelve barreled derringer!"
mag_type = /obj/item/ammo_box/magazine/internal/der38/twelveshooter

/obj/item/gun/ballistic/automatic/pistol/m1911
name = "\improper M1911"
desc = "A classic .45 handgun with a small magazine capacity."
Expand Down
9 changes: 9 additions & 0 deletions code/modules/projectiles/projectile/bullets/dart_syringe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
var/piercing = FALSE
var/obj/item/reagent_containers/syringe/syringe = null

/obj/projectile/bullet/dart/c38
name = "bullet"
icon_state = "bullet"
damage = 4

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

/obj/projectile/bullet/dart/c38/Initialize(mapload)
. = ..()
create_reagents(50, NO_REACT)

/obj/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE)
if(iscarbon(target))
var/mob/living/carbon/M = target
Expand Down
15 changes: 12 additions & 3 deletions code/modules/projectiles/projectile/bullets/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@

/obj/projectile/bullet/c38/hotshot //similar to incendiary bullets, but do not leave a flaming trail
name = ".38 Hot Shot bullet"
damage = 20
damage = 12
ricochets_max = 0

/obj/projectile/bullet/c38/hotshot/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(6)
M.adjust_fire_stacks(2)
M.IgniteMob()

/obj/projectile/bullet/c38/iceblox //see /obj/projectile/temp for the original code
name = ".38 Iceblox bullet"
damage = 20
damage = 15
var/temperature = 100
ricochets_max = 0

Expand All @@ -88,6 +88,15 @@
var/mob/living/M = target
M.adjust_bodytemperature(((100-blocked)/100)*(temperature - M.bodytemperature))

/obj/projectile/bullet/c38/emp
name = ".38 BLK_OUT bullet"
damage = 8
ricochets_max = 0

/obj/projectile/bullet/c38/emp/on_hit(atom/target)
. = ..()
empulse(target, 0, 2)

/obj/projectile/bullet/c38/mime
name = "invisible .38 bullet"
icon_state = null
Expand Down
60 changes: 60 additions & 0 deletions code/modules/uplink/uplink_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
cost = 7
purchasable_from = ~UPLINK_CLOWN_OPS

/datum/uplink_item/dangerous/derringer
name = "'Infiltrator' Coat Pistol"
desc = "For the deeply embedded agent; a very compact dual-barreled handgun chambered in .38-special. Compatible with \
standard production NT speed loaders. Loaded with .38 Match ammunition and includes a spare speedloader."
item = /obj/item/storage/box/syndie_kit/derringer
cost = 4
purchasable_from = ~UPLINK_CLOWN_OPS

/datum/uplink_item/dangerous/bolt_action
name = "Surplus Rifle"
desc = "A horribly outdated bolt action weapon. You've got to be desperate to use this."
Expand Down Expand Up @@ -918,6 +926,58 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/c38
name = ".38-special Speed Loader"
desc = "A standard issue .38-special speed loader, for use with the Detective's revolver or 'Infiltrator' coat pistol."
item = /obj/item/ammo_box/c38
cost = 1
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/c38blister
name = ".38-special 'Blister' Speed Loader"
desc = "For when you can't deside between a coat pistol and a dart pistol! These 6 cartridges can \
be injected with up to 10 units of your favorite poison for remote application via sidearm."
item = /obj/item/ammo_box/c38/dart
cost = 1
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/c38dumdum
name = ".38-special DumDum Speed Loader"
desc = "6 specialized fragmenting .38-special catridges, excellent for dispatching unarmored targets. \
Shrapnel can embed within the victim and provide a debilitating effect. Not advised for use \
against armored targets."
item = /obj/item/ammo_box/c38/dumdum
cost = 1
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/c38iceblox
name = ".38-special Iceblox Speed Loader"
desc = "6 .38-special Iceblox cartridges, 'guaranteed' to free your target to the core."
item = /obj/item/ammo_box/c38/iceblox
cost = 1
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/c38hotshot
name = ".38-special Hot Shot Speed Loader"
desc = "6 .38-special Hot Shot cartridges. Set your target ablaze with this specialized thermal payload."
item = /obj/item/ammo_box/c38/hotshot
cost = 1
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/c38emp
name = ".38-special 'BLK_OUT' Speed Loader"
desc = "6 specialized 'anti-silicon' .38-special cartridges that release a minor EMP on impact with a hard surface. \
From Silicons, to IPCs, to any machinery or energy-based weapons in use by security, leave them in the dark."
item = /obj/item/ammo_box/c38/emp
cost = 1
purchasable_from = ~UPLINK_CLOWN_OPS
illegal_tech = FALSE

/datum/uplink_item/ammo/a40mm
name = "40mm Grenade Box"
desc = "A box of 40mm HE grenades for use with the M-90gl's under-barrel grenade launcher. \
Expand Down
Binary file modified icons/obj/ammo.dmi
Binary file not shown.
Binary file modified icons/obj/guns/projectile.dmi
Binary file not shown.