Skip to content

Commit

Permalink
SMG tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Feb 12, 2024
1 parent 0f14a34 commit 8c7a28b
Show file tree
Hide file tree
Showing 11 changed files with 174 additions and 61 deletions.
4 changes: 4 additions & 0 deletions code/__defines/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#define CALIBER_REVOLVER_MEDIUM ".357 Special"
#define CALIBER_REVOLVER_HEAVY ".454 Casull"

#define CALIBER_SMG "10mmS"
#define CALIBER_SMG_SMALL "7mmS"
#define CALIBER_SMG_FLECHETTE "4mmS"

#define CALIBER_RIFLE "5mmR"
#define CALIBER_RIFLE_MILITARY "7mmR"
#define CALIBER_T12 "10x24mmR"
Expand Down
5 changes: 5 additions & 0 deletions code/_global_vars/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,8 @@ GLOBAL_LIST_INIT(t12_sound,\
'sound/weapons/gunshot/autorifle-1.ogg',\
'sound/weapons/gunshot/autorifle-2.ogg',\
'sound/weapons/gunshot/autorifle-3.ogg'))

GLOBAL_LIST_INIT(mp38_sound,\
list(\
'sound/weapons/gunshot/mp38_1.ogg',
'sound/weapons/gunshot/mp38_2.ogg'))
1 change: 1 addition & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ var/const/FALLOFF_SOUNDS = 0.5
if ("glasscrack") soundin = pick(GLOB.glasscrack_sound)
if ("tray_hit") soundin = pick(GLOB.tray_hit_sound)
if ("gun_t12") soundin = pick(GLOB.t12_sound)
if ("gun_mp38") soundin = pick(GLOB.mp38_sound)
return soundin

/client/verb/stop_sounds()
Expand Down
8 changes: 4 additions & 4 deletions code/modules/fabrication/designs/general/designs_arms_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
name = "ammunition (shotgun, flash)"
path = /obj/item/ammo_casing/shotgun/flash

/datum/fabricator_recipe/arms_ammo/hidden/magazine_smg_rubber
name = "ammunition (SMG rubber) top mounted"
path = /obj/item/ammo_magazine/smg_top/rubber

/datum/fabricator_recipe/arms_ammo/hidden/flamethrower
path = /obj/item/flamethrower/full

Expand Down Expand Up @@ -72,6 +68,10 @@
name = "ammunition (submachine gun)"
path = /obj/item/ammo_magazine/smg

/datum/fabricator_recipe/arms_ammo/hidden/magazine_smg_rubber
name = "ammunition (SMG rubber) top mounted"
path = /obj/item/ammo_magazine/smg_top/rubber

/datum/fabricator_recipe/arms_ammo/hidden/magazine_uzi
name = "ammunition (machine pistol)"
path = /obj/item/ammo_magazine/machine_pistol
Expand Down
66 changes: 44 additions & 22 deletions code/modules/projectiles/ammunition/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,26 @@
name = "stick magazine"
icon_state = "machine_pistol"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/pistol
ammo_type = /obj/item/ammo_casing/smg
matter = list(MATERIAL_STEEL = 1200)
caliber = CALIBER_PISTOL
caliber = CALIBER_SMG
max_ammo = 16
multiple_sprites = 1

/obj/item/ammo_magazine/machine_pistol/rubber
labels = list("rubber")
ammo_type = /obj/item/projectile/bullet/smg/rubber

/obj/item/ammo_magazine/machine_pistol/empty
initial_ammo = 0

/obj/item/ammo_magazine/smg_top
name = "top mounted magazine"
icon_state = "smg_top"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/pistol/small
ammo_type = /obj/item/projectile/bullet/smg/small
matter = list(MATERIAL_STEEL = 1200)
caliber = CALIBER_PISTOL_SMALL
caliber = CALIBER_SMG_SMALL
max_ammo = 20
multiple_sprites = 1

Expand All @@ -142,26 +146,45 @@

/obj/item/ammo_magazine/smg_top/rubber
labels = list("rubber")
ammo_type = /obj/item/ammo_casing/pistol/small/rubber
ammo_type = /obj/item/ammo_casing/smg/small/rubber

/obj/item/ammo_magazine/smg_top/practice
labels = list("practice")
ammo_type = /obj/item/ammo_casing/pistol/small/practice
ammo_type = /obj/item/ammo_casing/smg/small/practice

/obj/item/ammo_magazine/smg
name = "box magazine"
name = "smg magazine"
icon_state = "smg"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = CALIBER_PISTOL
caliber = CALIBER_SMG
matter = list(MATERIAL_STEEL = 1500)
ammo_type = /obj/item/ammo_casing/pistol
ammo_type = /obj/item/ammo_casing/smg
max_ammo = 20
multiple_sprites = 1

/obj/item/ammo_magazine/smg/empty
initial_ammo = 0

/obj/item/ammo_magazine/smg/flame
name = "submachine gun magazine (incendiary)"
ammo_type = /obj/item/ammo_casing/smg/flame

/obj/item/ammo_magazine/proto_smg
name = "submachine gun magazine"
icon_state = CALIBER_SMG_FLECHETTE
origin_tech = list(TECH_COMBAT = 4)
mag_type = MAGAZINE
caliber = CALIBER_SMG_FLECHETTE
matter = list(MATERIAL_STEEL = 2000)
ammo_type = /obj/item/projectile/bullet/smg/flechette
max_ammo = 40
multiple_sprites = 1

/obj/item/ammo_magazine/proto_smg/hp
name = "submachine gun magazine (HP)"
ammo_type = /obj/item/projectile/bullet/smg/flechette/hp

/obj/item/ammo_magazine/pistol
name = "pistol magazine"
icon_state = "pistol_mag"
Expand Down Expand Up @@ -272,20 +295,19 @@
caliber = CALIBER_PISTOL_SMALL
max_ammo = 8

/obj/item/ammo_magazine/proto_smg
name = "submachine gun magazine"
icon_state = CALIBER_PISTOL_FLECHETTE
origin_tech = list(TECH_COMBAT = 4)
mag_type = MAGAZINE
caliber = CALIBER_PISTOL_FLECHETTE
matter = list(MATERIAL_STEEL = 2000)
ammo_type = /obj/item/ammo_casing/flechette
max_ammo = 40
multiple_sprites = 1
// SMG boxes
/obj/item/ammo_magazine/box/smg
name = "ammunition box"
icon_state = "smallpistol"
origin_tech = list(TECH_COMBAT = 2)
caliber = CALIBER_SMG
matter = list(MATERIAL_STEEL = 4500)
ammo_type = /obj/item/ammo_casing/smg
max_ammo = 60

/obj/item/ammo_magazine/proto_smg/hp
name = "submachine gun magazine (HP)"
ammo_type = /obj/item/ammo_casing/flechette/hp
/obj/item/ammo_magazine/box/smg/small
caliber = CALIBER_SMG_SMALL
ammo_type = /obj/item/ammo_casing/smg/small

/obj/item/ammo_magazine/gyrojet
name = "microrocket magazine"
Expand Down
69 changes: 56 additions & 13 deletions code/modules/projectiles/ammunition/bullets.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Pistol
/obj/item/ammo_casing/pistol
desc = "A pistol bullet casing."
caliber = CALIBER_PISTOL
Expand Down Expand Up @@ -48,6 +49,7 @@
desc = "An antique pistol bullet casing. Somewhere between 9 and 11 mm in caliber."
caliber = CALIBER_PISTOL_ANTIQUE

// Revolver
/obj/item/ammo_casing/revolver
desc = "A revolver bullet casing."
icon_state = "magnumcasing"
Expand All @@ -74,23 +76,59 @@
caliber = CALIBER_REVOLVER_HEAVY
projectile_type = /obj/item/projectile/bullet/revolver/heavy

// SMG
/obj/item/ammo_casing/smg
desc = "An SMG bullet casing."
caliber = CALIBER_SMG
projectile_type = /obj/item/projectile/bullet/smg
icon_state = "pistolcasing"
spent_icon = "pistolcasing-spent"

/obj/item/ammo_casing/smg/rubber
desc = "A rubber SMG bullet casing."
projectile_type = /obj/item/projectile/bullet/smg/rubber
icon_state = "pistolcasing_r"

/obj/item/ammo_casing/smg/flame
desc = "An incendiary SMG bullet casing."
projectile_type = /obj/item/projectile/bullet/smg/flame
icon_state = "pistolcasing_fi"

/obj/item/ammo_casing/smg/small
desc = "A small SMG bullet casing."
caliber = CALIBER_SMG_SMALL
projectile_type = /obj/item/projectile/bullet/smg/small

/obj/item/ammo_casing/smg/small/rubber
desc = "A small rubber SMG bullet casing."
projectile_type = /obj/item/projectile/bullet/smg/small/rubber
icon_state = "pistolcasing_r"

/obj/item/ammo_casing/smg/small/practice
desc = "A small practice SMG bullet casing."
projectile_type = /obj/item/projectile/bullet/smg/small/practice
icon_state = "pistolcasing_p"

/obj/item/ammo_casing/smg/flechette
desc = "An SMG flechette casing."
caliber = CALIBER_SMG_FLECHETTE
projectile_type = /obj/item/projectile/bullet/smg/flechette
icon_state = "flechette-casing"
spent_icon = "flechette-casing-spent"

/obj/item/ammo_casing/smg/flechette/hp
desc = "An SMG flechette (HP) casing."
projectile_type = /obj/item/projectile/bullet/smg/flechette/hp

// Special
/obj/item/ammo_casing/gyrojet
desc = "A minirocket casing."
caliber = CALIBER_GYROJET
projectile_type = /obj/item/projectile/bullet/gyro
icon_state = "lcasing"
spent_icon = "lcasing-spent"

/obj/item/ammo_casing/flechette
desc = "A flechette casing."
caliber = CALIBER_PISTOL_FLECHETTE
projectile_type = /obj/item/projectile/bullet/flechette
icon_state = "flechette-casing"
spent_icon = "flechette-casing-spent"

/obj/item/ammo_casing/flechette/hp
projectile_type = /obj/item/projectile/bullet/flechette/hp

// Shotgun
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
desc = "A shotgun slug."
Expand Down Expand Up @@ -139,8 +177,8 @@
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
matter = list(MATERIAL_STEEL = 180)

//Can stun in one hit if aimed at the head, but
//is blocked by clothing that stops tasers and is vulnerable to EMP
// Can stun in one hit if aimed at the head, but
// is blocked by clothing that stops tasers and is vulnerable to EMP
/obj/item/ammo_casing/shotgun/stunshell
name = "stun shell"
desc = "An energy stun cartridge."
Expand All @@ -154,7 +192,7 @@
if(prob(100/severity)) BB = null
update_icon()

//Does not stun, only blinds, but has area of effect.
// Does not stun, only blinds, but has area of effect.
/obj/item/ammo_casing/shotgun/flash
name = "flash shell"
desc = "A chemical shell used to signal distress or provide illumination."
Expand All @@ -163,6 +201,7 @@
projectile_type = /obj/item/projectile/energy/flash/flare
matter = list(MATERIAL_STEEL = 90, MATERIAL_GLASS = 90)

// Rifle
/obj/item/ammo_casing/rifle
desc = "A rifle bullet casing."
caliber = CALIBER_RIFLE
Expand All @@ -175,6 +214,7 @@
projectile_type = /obj/item/projectile/bullet/rifle/flame
icon_state = "riflecasing_fi"

// Antimatter rifle
/obj/item/ammo_casing/shell
name = "shell casing"
desc = "An antimaterial shell casing."
Expand All @@ -194,6 +234,7 @@
desc = "An explosive antimaterial shell."
projectile_type = /obj/item/projectile/bullet/rifle/shell/explosive

// "Military" rifle
/obj/item/ammo_casing/rifle/military
desc = "A military rifle bullet casing."
caliber = CALIBER_RIFLE_MILITARY
Expand Down Expand Up @@ -226,6 +267,7 @@
projectile_type = /obj/item/projectile/bullet/rifle/ak47/flame
icon_state = "riflecasing_fi"

// Rocket launcher
/obj/item/ammo_casing/rocket
name = "rocket shell"
desc = "An explosive designed to be fired from a launcher."
Expand All @@ -243,6 +285,7 @@
desc = "A high explosive designed to be fired from a launcher."
projectile_type = /obj/item/projectile/bullet/rocket/heavy

// The other stuff
/obj/item/ammo_casing/cap
name = "cap"
desc = "A cap for children toys."
Expand Down
14 changes: 7 additions & 7 deletions code/modules/projectiles/guns/projectile/automatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
w_class = ITEM_SIZE_NORMAL
bulk = -1
load_method = MAGAZINE
caliber = CALIBER_PISTOL_FLECHETTE
caliber = CALIBER_SMG_FLECHETTE
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 3)
slot_flags = SLOT_BELT
ammo_type = /obj/item/ammo_casing/flechette
ammo_type = /obj/item/ammo_casing/smg/flechette
magazine_type = /obj/item/ammo_magazine/proto_smg
allowed_magazines = /obj/item/ammo_magazine/proto_smg
multi_aim = 1
Expand All @@ -32,9 +32,9 @@
icon_state = "mpistolen"
safety_icon = "safety"
item_state = "mpistolen"
caliber = CALIBER_PISTOL
caliber = CALIBER_SMG
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ESOTERIC = 3)
ammo_type = /obj/item/ammo_casing/pistol
ammo_type = /obj/item/ammo_casing/smg
magazine_type = /obj/item/ammo_magazine/machine_pistol
allowed_magazines = /obj/item/ammo_magazine/machine_pistol //more damage compared to the wt550, smaller mag size
one_hand_penalty = 2
Expand Down Expand Up @@ -70,7 +70,7 @@
safety_icon = "safety"
w_class = ITEM_SIZE_LARGE
force = 10
caliber = CALIBER_PISTOL
caliber = CALIBER_SMG
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ESOTERIC = 8)
slot_flags = SLOT_BELT|SLOT_BACK
magazine_type = /obj/item/ammo_magazine/smg
Expand Down Expand Up @@ -143,10 +143,10 @@
item_state = "wt550"
safety_icon = "safety"
w_class = ITEM_SIZE_NORMAL
caliber = CALIBER_PISTOL_SMALL
caliber = CALIBER_SMG_SMALL
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2)
slot_flags = SLOT_BELT
ammo_type = /obj/item/ammo_casing/pistol/small
ammo_type = /obj/item/ammo_casing/smg/small
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/smg_top/rubber
allowed_magazines = /obj/item/ammo_magazine/smg_top
Expand Down
Loading

0 comments on commit 8c7a28b

Please sign in to comment.