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

Ballistics Firearm Operations Overhaul and New Improvised Firearms #10020

Merged
merged 63 commits into from
Dec 23, 2023
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
394660c
Adds .41 caliber, lever rifle
VickiMorris Oct 12, 2023
a8db1d0
Piperifle, Recoil, .41 Ammo Box
VickiMorris Oct 13, 2023
7d92206
Adds TWO_STEP bolt type, refactors bolt rifle code
VickiMorris Oct 13, 2023
919b2ae
FIXES A LOADING FUCKUP
VickiMorris Oct 14, 2023
3e2aea1
New Sprites for Lever Rifle
VickiMorris Oct 14, 2023
8ce7fdb
Proper pipe gun sprites
VickiMorris Oct 14, 2023
d37c5cd
Merge branch 'master' into pipeGuns
VickiMorris Oct 14, 2023
45ca720
Tweaks ballistics.dm & recoil, merges upstream
VickiMorris Oct 14, 2023
7a8aae3
Squashes sprite sheets
VickiMorris Oct 14, 2023
1f697ea
Ups .41 cal damage, improv shotgun nerf
VickiMorris Oct 14, 2023
514505e
Merge branch 'master' into pipeGuns
VickiMorris Oct 15, 2023
0a3172e
Ports slow break action guns
VickiMorris Oct 15, 2023
e19842b
Massively cleans up NO_BOLT cycling, new buckshot
VickiMorris Oct 15, 2023
5d144f1
Shotguns pump like Mosins bolt
VickiMorris Oct 15, 2023
7655c0d
Merge pull request #1 from VickiMorris/master
VickiMorris Oct 15, 2023
451b4d3
Sniper changes, Magazine tweaks, Multiloading
VickiMorris Oct 16, 2023
93a2303
Auto-racking pump action
VickiMorris Oct 16, 2023
0a76fc0
NO_BOLT guns function like they used to (mostly)
VickiMorris Oct 16, 2023
ac16b05
Reimplements 3-Step NO_BOLT guns as new bolt type
VickiMorris Oct 16, 2023
979c7c4
Makes guns not chamber on initialize
VickiMorris Oct 17, 2023
1fe7373
Cleans up code slightly
VickiMorris Oct 18, 2023
6a611bc
the shitcode was coming from INSIDE THE PR
VickiMorris Oct 23, 2023
c694328
Adds Pipe Repeater (SMG), De-Pins Improvised Guns
VickiMorris Oct 23, 2023
f2ec4ed
Pipe SMG Sprites
VickiMorris Oct 23, 2023
c7c02f6
fuck my stupid baka life
VickiMorris Oct 26, 2023
b733f66
(Most) Shotgun Bolt Overlays
VickiMorris Oct 27, 2023
9cbcfc4
Defines the musket, Commit to not lose progress
VickiMorris Oct 30, 2023
4be5157
shitcode compiles, will tear out later
VickiMorris Oct 30, 2023
737ffdc
Removes the shitcode, as promised :)
VickiMorris Oct 31, 2023
57791dd
Minor Tweaks
VickiMorris Nov 1, 2023
8bcce86
Merge branch 'master' into pipeGuns
VickiMorris Nov 7, 2023
b8e5dec
Merge Upstream, Re-Remove Complex NO_BOLT
VickiMorris Nov 7, 2023
5601283
Retypes glasspack shells
VickiMorris Nov 7, 2023
f54084a
Retype a41/paper to a41/improv
VickiMorris Nov 7, 2023
53ff3fd
All Ammo Boxes are now SMALL & Crafting Recipes
VickiMorris Nov 7, 2023
6ed6c8a
In-Hands for Improv Shottie & Pipe Rifle
VickiMorris Nov 7, 2023
10e97ff
Fixes mapping issue?
VickiMorris Nov 7, 2023
58c80f3
Reverts some shotgun ammo changes
VickiMorris Nov 7, 2023
731905b
Inches the lever rifle's lever forward a bit
VickiMorris Nov 7, 2023
b6e3ed3
Cleans up a few remaining touches
VickiMorris Nov 7, 2023
c0c2a00
Further increases range of improv shells
VickiMorris Nov 7, 2023
e1ff7f9
Guts .41 ammo, retypes to a7.62 & .38
VickiMorris Nov 9, 2023
1a51682
Hacksaw available in hacked autolathes
VickiMorris Nov 9, 2023
edb0480
Improv .38, .357
VickiMorris Nov 9, 2023
b5522b8
Removes AP on improv 7.62
VickiMorris Nov 9, 2023
1a2987e
Code Clean-Up Pass 1
VickiMorris Nov 11, 2023
58f1d8a
Merge branch 'BeeStation:master' into pipeGuns
VickiMorris Nov 11, 2023
89882e0
Merge remote-tracking branch 'upstream/master' into pipeGuns
VickiMorris Dec 3, 2023
326e519
Light Balance Tweaks
VickiMorris Dec 3, 2023
9bade30
Fixes my runtime
VickiMorris Dec 3, 2023
d492da2
Derringer's weight tweak
VickiMorris Dec 3, 2023
b711b14
Actually makes the change from the last commit.
VickiMorris Dec 3, 2023
da15c58
Merge branch 'master' into pipeGuns
VickiMorris Dec 19, 2023
b64bf55
Update shotgun.dm
VickiMorris Dec 19, 2023
b077ee7
Update tools.dm
VickiMorris Dec 19, 2023
13be27f
Update tools.dm
VickiMorris Dec 20, 2023
dd5de35
Update autolathe_designs.dm
VickiMorris Dec 20, 2023
fcff4fc
Barrel Stress & Explosions
VickiMorris Dec 21, 2023
6d57835
Vanishing Bullet Shrapnel
VickiMorris Dec 22, 2023
4c17f23
Update shrapnel.dm
VickiMorris Dec 22, 2023
8072bdf
updates barrel stress numbers
VickiMorris Dec 23, 2023
c8d6e09
readability
VickiMorris Dec 23, 2023
3533b77
maybe I should READ first
VickiMorris Dec 23, 2023
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
48 changes: 43 additions & 5 deletions code/modules/projectiles/guns/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,42 @@
recoil = 1.5
var/slung = FALSE
var/reinforced = FALSE
var/barrel_stress = 0

/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)

if(chambered.BB && !reinforced)
var/obj/item/ammo_casing/shotgun/S = chambered
if(prob(10 + barrel_stress) && S.high_power) //Base 10% chance of misfiring. Goes up with each shot of high_power ammo
backfire(user)
return 0

else if (S.high_power)
barrel_stress += 5
if (barrel_stress == 10)
to_chat(user, "<span class='warning'>[src]'s barrel is left warped from the force of the shot!</span>")
else if (barrel_stress == 20)
to_chat(user, "<span class='danger'>[src]'s barrel begins to crack from the repeated strain!</span>")

else if (prob(5) && barrel_stress >= 30) // If the barrel is damaged enough to be cracked, flat 5% chance to detonate on low-power ammo as well.
backfire(user)
return 0
..()

/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/proc/backfire(mob/living/user)
playsound(user, fire_sound, fire_sound_volume, vary_fire_sound)
to_chat(user, "<span class='userdanger'>[src] blows up in your face!</span>")

user.take_bodypart_damage(0,15) //The explosion already does enough damage.
explosion(src, 0, 0, 1, 1)

barrel_stress += 10 //Big damage to barrel, two explosions/misfires will destroy the gun entirely
qdel(chambered.BB)
chambered.BB = null //Spend the bullet when you misfire and it explodes. What's blowing up otherwise?

user.dropItemToGround(src)

/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
if (istype(A, /obj/item/ammo_casing/shotgun))
var/obj/item/ammo_casing/shotgun/S = A
if (S.high_power && reinforced == FALSE)
to_chat(user, "<span class='warning'>This gun can't handle the pressure of \a [S.name] being fired!</span>")
return
..()
if(istype(A, /obj/item/stack/cable_coil) && !sawn_off)
if(slung)
Expand Down Expand Up @@ -282,6 +311,15 @@
else
. += "You could improvise a shoulder sling from some cabling..."

if (reinforced)
. += "The barrel has been reinforced for use with high-power ammunition."
else if (barrel_stress == 0)
. += "The barrel is in pristine condition."
else if (barrel_stress <= 25)
. += "The barrel seems to be warped mildly..."
else
. += "The barrel is cracked, and the warping is more severe!"
Rukofamicom marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawn
name = "sawn-off improvised shotgun"
desc = "A single-shot shotgun. Better not miss."
Expand Down
Loading