Adds approx. a billion new gun related sounds (#14169)

This commit is contained in:
KingOfThePing
2022-06-18 22:17:14 +02:00
committed by GitHub
parent 9782fc49b2
commit 0dfc713512
75 changed files with 272 additions and 86 deletions
+1 -1
View File
@@ -112,7 +112,7 @@
var/list/icon_keys = list() //keys
var/list/ammo_states = list() //values
var/insert_sound = 'sound/weapons/magazine_insert.ogg' //sound it plays when it gets inserted into a gun.
var/insert_sound = /decl/sound_category/metal_slide_reload //sound it plays when it gets inserted into a gun.
var/eject_sound = 'sound/weapons/magazine_eject.ogg'
/obj/item/ammo_magazine/Initialize()
+98 -70
View File
@@ -1,7 +1,9 @@
// Revolvos //
/obj/item/ammo_magazine/a357
name = "speed loader (.357)"
icon_state = "T38"
caliber = "357"
insert_sound = /decl/sound_category/revolver_reload
ammo_type = /obj/item/ammo_casing/a357
matter = list(DEFAULT_WALL_MATERIAL = 1260)
max_ammo = 8
@@ -11,6 +13,7 @@
name = "speed loader (.454)"
icon_state = "a454"
caliber = "454"
insert_sound = /decl/sound_category/revolver_reload
ammo_type = /obj/item/ammo_casing/a454
matter = list(DEFAULT_WALL_MATERIAL = 1260)
max_ammo = 7
@@ -20,6 +23,7 @@
name = "speed loader (.38)"
icon_state = "38"
caliber = "38"
insert_sound = /decl/sound_category/revolver_reload
matter = list(DEFAULT_WALL_MATERIAL = 360)
ammo_type = /obj/item/ammo_casing/c38
max_ammo = 6
@@ -34,6 +38,9 @@
ammo_type = /obj/item/ammo_casing/c38/emp
matter = list(DEFAULT_WALL_MATERIAL = 360, MATERIAL_URANIUM = 600)
// End of Revolvos //
// Pistols and handguns //
/obj/item/ammo_magazine/c45
name = "ammunition Box (.45)"
icon_state = "9mm"
@@ -54,6 +61,20 @@
max_ammo = 16
multiple_sprites = 1
/obj/item/ammo_magazine/a50
name = "magazine (.50)"
icon_state = "50ae"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = ".50"
matter = list(DEFAULT_WALL_MATERIAL = 1260)
ammo_type = /obj/item/ammo_casing/a50
max_ammo = 7
multiple_sprites = 1
/obj/item/ammo_magazine/a50/empty
initial_ammo = 0
/obj/item/ammo_magazine/c45m
name = "magazine (.45)"
icon_state = "45"
@@ -101,6 +122,17 @@
max_ammo = 16
multiple_sprites = 1
/obj/item/ammo_magazine/super_heavy
name = ".599 magazine"
desc = "A bulky magazine for the Kumar Arms 2557."
icon_state = "k2557"
caliber = ".599 Kumar Super"
ammo_type = /obj/item/ammo_casing/kumar_super
mag_type = MAGAZINE
max_ammo = 5
multiple_sprites = 1
insert_sound = 'sound/weapons/k2557-insert.ogg'
/obj/item/ammo_magazine/mc10mm
name = "magazine (10mm)"
icon_state = "tommy-mag"
@@ -145,12 +177,16 @@
name = "magazine (9mm flash)"
ammo_type = /obj/item/ammo_casing/c9mm/flash
// End of pistols //
// Submachine guns and PDWs
/obj/item/ammo_magazine/c9mm
name = "ammunition box (9mm)"
icon_state = "9mm"
origin_tech = list(TECH_COMBAT = 2)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
caliber = "9mm"
insert_sound = /decl/sound_category/polymer_slide_reload
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
@@ -164,6 +200,7 @@
ammo_type = /obj/item/ammo_casing/c9mm
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = "9mm"
insert_sound = /decl/sound_category/polymer_slide_reload
max_ammo = 20
multiple_sprites = 1
@@ -196,6 +233,7 @@
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "10mm"
insert_sound = /decl/sound_category/polymer_slide_reload
matter = list(DEFAULT_WALL_MATERIAL = 1500)
ammo_type = /obj/item/ammo_casing/c10mm
max_ammo = 20
@@ -204,12 +242,54 @@
/obj/item/ammo_magazine/a10mm/empty
initial_ammo = 0
/obj/item/ammo_magazine/c45uzi
name = "stick magazine (.45)"
icon_state = "uzi45"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = ".45"
max_ammo = 16
insert_sound = /decl/sound_category/polymer_slide_reload
multiple_sprites = 1
/obj/item/ammo_magazine/c45uzi/empty
initial_ammo = 0
/obj/item/ammo_magazine/submachinemag
name = "magazine (.45)"
icon_state = "tommy-mag"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1500)
caliber = ".45"
insert_sound = /decl/sound_category/polymer_slide_reload
max_ammo = 20
/obj/item/ammo_magazine/submachinemag/empty
initial_ammo = 0
/obj/item/ammo_magazine/submachinedrum
name = "drum magazine (.45)"
icon_state = "tommy-drum"
w_class = ITEMSIZE_NORMAL // Bulky ammo doesn't fit in your pockets!
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 3750)
caliber = ".45"
insert_sound = /decl/sound_category/polymer_slide_reload
max_ammo = 50
// End of SMGs and PDWs //
// Rifles and bigger calibers //
/obj/item/ammo_magazine/a556
name = "magazine (5.56mm)"
icon_state = "5.56"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "a556"
insert_sound = /decl/sound_category/rifle_slide_reload
matter = list(DEFAULT_WALL_MATERIAL = 1800)
ammo_type = /obj/item/ammo_casing/a556
max_ammo = 30
@@ -258,25 +338,12 @@
/obj/item/ammo_magazine/a556/makeshift/empty
initial_ammo = 0
/obj/item/ammo_magazine/a50
name = "magazine (.50)"
icon_state = "50ae"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = ".50"
matter = list(DEFAULT_WALL_MATERIAL = 1260)
ammo_type = /obj/item/ammo_casing/a50
max_ammo = 7
multiple_sprites = 1
/obj/item/ammo_magazine/a50/empty
initial_ammo = 0
/obj/item/ammo_magazine/a75
name = "ammo magazine (20mm)"
icon_state = "75"
mag_type = MAGAZINE
caliber = "75"
insert_sound = /decl/sound_category/rifle_slide_reload
ammo_type = /obj/item/ammo_casing/a75
multiple_sprites = 1
max_ammo = 4
@@ -289,6 +356,7 @@
icon_state = "trodpack-2"
mag_type = MAGAZINE
caliber = "trod"
insert_sound = 'sound/weapons/reloads/rifle_slide3.ogg'
ammo_type = /obj/item/ammo_casing/trod
multiple_sprites = 1
max_ammo = 2
@@ -302,6 +370,7 @@
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "a762"
insert_sound = /decl/sound_category/rifle_slide_reload
matter = list(DEFAULT_WALL_MATERIAL = 4500)
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 50
@@ -315,6 +384,7 @@
icon_state = "c762"
mag_type = MAGAZINE
caliber = "a762"
insert_sound = /decl/sound_category/rifle_slide_reload
matter = list(DEFAULT_WALL_MATERIAL = 1800)
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 20
@@ -342,53 +412,6 @@
ammo_type = /obj/item/ammo_casing/vintage
caliber = "vintage"
/obj/item/ammo_magazine/c45uzi
name = "stick magazine (.45)"
icon_state = "uzi45"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = ".45"
max_ammo = 16
multiple_sprites = 1
/obj/item/ammo_magazine/c45uzi/empty
initial_ammo = 0
/obj/item/ammo_magazine/submachinemag
name = "magazine (.45)"
icon_state = "tommy-mag"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1500)
caliber = ".45"
max_ammo = 20
/obj/item/ammo_magazine/submachinemag/empty
initial_ammo = 0
/obj/item/ammo_magazine/submachinedrum
name = "drum magazine (.45)"
icon_state = "tommy-drum"
w_class = ITEMSIZE_NORMAL // Bulky ammo doesn't fit in your pockets!
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 3750)
caliber = ".45"
max_ammo = 50
/obj/item/ammo_magazine/caps
name = "speed loader (caps)"
icon_state = "T38"
caliber = "caps"
color = "#FF0000"
ammo_type = /obj/item/ammo_casing/cap
matter = list(DEFAULT_WALL_MATERIAL = 600)
max_ammo = 7
multiple_sprites = 1
//dragunov magazine
/obj/item/ammo_magazine/d762
name = "magazine (7.62mm)"
icon_state = "SVD"
@@ -402,12 +425,14 @@
/obj/item/ammo_magazine/d762/empty
initial_ammo = 0
// Shotguns and special //
/obj/item/ammo_magazine/flechette
name = "flechette rounds"
icon = 'icons/obj/terminator.dmi'
icon_state = "flechette"
mag_type = MAGAZINE
caliber = "flechette"
insert_sound = /decl/sound_category/rifle_slide_reload
matter = list(DEFAULT_WALL_MATERIAL = 1200)
ammo_type = /obj/item/ammo_casing/flechette
max_ammo = 40
@@ -435,6 +460,7 @@
name = "magazine (slug)"
icon_state = "csmb"
caliber = "shotgun"
insert_sound = /decl/sound_category/rifle_slide_reload
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/shotgun
max_ammo = 8
@@ -488,6 +514,7 @@
icon_state = "heavy_plasma_cell"
mag_type = MAGAZINE
caliber = "plasma slug"
insert_sound = 'sound/weapons/railgun_insert_emp.ogg'
ammo_type = /obj/item/ammo_casing/plasma_slug
max_ammo = 10
@@ -509,16 +536,17 @@
w_class = ITEMSIZE_NORMAL
mag_type = MAGAZINE
caliber = "nuke"
insert_sound = 'sound/weapons/reloads/rifle_slide3.ogg'
ammo_type = /obj/item/ammo_casing/nuke
max_ammo = 2
multiple_sprites = 1
/obj/item/ammo_magazine/super_heavy
name = ".599 magazine"
desc = "A bulky magazine for the Kumar Arms 2557."
icon_state = "k2557"
caliber = ".599 Kumar Super"
ammo_type = /obj/item/ammo_casing/kumar_super
mag_type = MAGAZINE
max_ammo = 5
/obj/item/ammo_magazine/caps
name = "speed loader (caps)"
icon_state = "T38"
caliber = "caps"
color = "#FF0000"
ammo_type = /obj/item/ammo_casing/cap
matter = list(DEFAULT_WALL_MATERIAL = 600)
max_ammo = 7
multiple_sprites = 1
insert_sound = 'sound/weapons/k2557-insert.ogg'
@@ -107,7 +107,8 @@
caliber = "shotgun"
projectile_type = /obj/item/projectile/bullet/shotgun
matter = list(DEFAULT_WALL_MATERIAL = 360)
reload_sound = 'sound/weapons/reload_shell.ogg'
reload_sound = /decl/sound_category/shotgun_reload
drop_sound = /decl/sound_category/casing_drop_sound_shotgun
/obj/item/ammo_casing/shotgun/pellet
name = "shotgun shell"
@@ -336,7 +337,8 @@
w_class = ITEMSIZE_NORMAL
slot_flags = null
max_stack = 1
reload_sound = 'sound/weapons/reload_shell.ogg'
reload_sound = 'sound/weapons/reloads/shotgun_pump.ogg'
drop_sound = /decl/sound_category/generic_drop_sound
/obj/item/ammo_casing/cannon/explosive
name = "explosive cannonball"
@@ -357,6 +359,7 @@
slot_flags = null
desc = "A miniaturized version of a nuclear bomb."
projectile_type = /obj/item/projectile/bullet/nuke
drop_sound = /decl/sound_category/generic_drop_sound
max_stack = 2
/obj/item/ammo_casing/musket
@@ -365,7 +368,7 @@
icon_state = "musketball"
caliber = "musket"
projectile_type = /obj/item/projectile/bullet/pistol/strong
reload_sound = 'sound/weapons/reload_shell.ogg'
reload_sound = 'sound/weapons/reloads/shotgun_pump.ogg'
/obj/item/ammo_casing/recoilless_rifle
name = "anti-tank warhead"
@@ -374,7 +377,7 @@
w_class = ITEMSIZE_NORMAL
slot_flags = null
projectile_type = /obj/item/projectile/bullet/recoilless_rifle
reload_sound = 'sound/weapons/reload_shell.ogg'
reload_sound = 'sound/weapons/reloads/shotgun_pump.ogg'
max_stack = 1
/obj/item/ammo_casing/peac
+5 -3
View File
@@ -83,6 +83,8 @@
var/displays_maptext = FALSE
var/can_ammo_display = TRUE
var/obj/item/ammo_display
var/empty_sound = /decl/sound_category/out_of_ammo
var/casing_drop_sound = /decl/sound_category/casing_drop_sound
maptext_x = 22
maptext_y = 2
@@ -312,7 +314,7 @@
user.setClickCooldown(shoot_time)
user.setMoveCooldown(shoot_time)
next_fire_time = world.time + shoot_time
user.face_atom(target, TRUE)
return TRUE
@@ -434,8 +436,8 @@
if(user)
to_chat(user, SPAN_DANGER("*click*"))
else
src.visible_message("*click click*")
playsound(loc, 'sound/weapons/empty.ogg', 100, 1)
src.visible_message("*click*")
playsound(loc, empty_sound, 100, 1)
//called after successfully firing
/obj/item/gun/proc/handle_post_fire(mob/user, atom/target, var/pointblank = FALSE, var/reflex = FALSE, var/playemote = TRUE)
@@ -27,7 +27,7 @@
//revolves the magazine, allowing players to choose between multiple grenade types
/obj/item/gun/launcher/grenade/proc/pump(mob/M as mob)
playsound(M, 'sound/weapons/shotgun_pump.ogg', 60, 1)
playsound(M, 'sound/weapons/reloads/shotgun_pump.ogg', 60, 1)
var/obj/item/grenade/next
if(grenades.len)
@@ -132,4 +132,4 @@
user.visible_message("[user] removes \a [chambered] from [src].", SPAN_NOTICE("You remove \a [chambered] from [src]."))
chambered = null
else
to_chat(user, SPAN_WARNING("[src] is empty."))
to_chat(user, SPAN_WARNING("[src] is empty."))
@@ -123,6 +123,7 @@
slot_flags = SLOT_BACK
load_method = MAGAZINE
fire_sound = 'sound/weapons/gunshot/gunshot_rifle.ogg'
empty_sound = /decl/sound_category/out_of_ammo_rifle
magazine_type = /obj/item/ammo_magazine/c762
allowed_magazines = list(/obj/item/ammo_magazine/c762)
@@ -13,6 +13,7 @@
ammo_type = /obj/item/ammo_casing/a357
magazine_type = /obj/item/ammo_magazine/a357
fire_sound = 'sound/weapons/gunshot/gunshot_revolver.ogg'
empty_sound = /decl/sound_category/out_of_ammo_revolver
var/chamber_offset = 0 //how many empty chambers in the cylinder until you hit a round
/obj/item/gun/projectile/revolver/verb/spin_cylinder()
@@ -58,7 +58,7 @@
fire_sound = 'sound/weapons/gunshot/gunshot_shotgun2.ogg'
is_wieldable = TRUE
var/recentpump = 0 // to prevent spammage
var/rack_sound = 'sound/weapons/shotgun_pump.ogg'
var/rack_sound = /decl/sound_category/shotgun_pump
var/rack_verb = "pump"
/obj/item/gun/projectile/shotgun/pump/consume_next_projectile()