diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index d8a31412e78..497aec68999 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -122,6 +122,10 @@ var/multiload = 1 var/accept_subtypes = TRUE //Can you load rounds with the same caliber, but not same type var/list/initial_mats + var/replacing_sound = 'sound/weapons/gun_interactions/shotguninsert.ogg' + var/remove_sound = 'sound/weapons/gun_interactions/remove_bullet.ogg' + var/insert_sound = 'sound/weapons/gun_interactions/bulletinsert.ogg' + var/load_sound = 'sound/weapons/gun_interactions/shotguninsert.ogg' /obj/item/ammo_box/New() ..() @@ -159,7 +163,7 @@ if(stored_ammo.len < max_ammo) stored_ammo += R R.loc = src - playsound(src, 'sound/weapons/gun_interactions/bulletinsert.ogg', 50, 1) + playsound(src, insert_sound, 50, 1) update_mat_value() return 1 //for accessibles magazines (e.g internal ones) when full, start replacing spent ammo @@ -171,7 +175,7 @@ stored_ammo += R R.loc = src - playsound(src, 'sound/weapons/gun_interactions/shotguninsert.ogg', 50, 1) + playsound(src, replacing_sound, 50, 1) update_mat_value() return 1 @@ -202,7 +206,7 @@ if(num_loaded) if(!silent) to_chat(user, "You load [num_loaded] shell\s into \the [src]!") - playsound(src, 'sound/weapons/gun_interactions/shotguninsert.ogg', 50, 1) + playsound(src, load_sound, 50, 1) A.update_icon() update_icon() @@ -212,7 +216,7 @@ var/obj/item/ammo_casing/A = get_round() if(A) user.put_in_hands(A) - playsound(src, 'sound/weapons/gun_interactions/remove_bullet.ogg', 50, 1) + playsound(src, remove_sound, 50, 1) to_chat(user, "You remove a round from \the [src]!") update_icon() diff --git a/code/modules/projectiles/guns/projectile/bombarda.dm b/code/modules/projectiles/guns/projectile/bombarda.dm index 5530d748792..ac3d96e1e6f 100644 --- a/code/modules/projectiles/guns/projectile/bombarda.dm +++ b/code/modules/projectiles/guns/projectile/bombarda.dm @@ -8,17 +8,37 @@ fire_sound = 'sound/weapons/gunshots/1grenlauncher.ogg' can_holster = FALSE w_class = WEIGHT_CLASS_BULKY + weapon_weight = WEAPON_HEAVY + var/pump_sound_cooldown = 1 SECONDS + var/last_pump = 0 /obj/item/gun/projectile/bombarda/attackby(obj/item/A, mob/user, params) . = ..() if(.) return + if(chambered) + return var/num_loaded = magazine.attackby(A, user, params, 1) if(num_loaded) - to_chat(user, "You load [num_loaded] shell\s into \the [src]!") + to_chat(user, span_notice("You load [num_loaded] shell\s into \the [src]!")) A.update_icon() update_icon() +/obj/item/gun/projectile/bombarda/update_icon() + . = ..() + if(!chambered) + icon_state = "bombarda_open" + else + icon_state = "bombarda" + +/obj/item/gun/projectile/bombarda/process_chamber(eject_casing, empty_chamber) + var/obj/item/ammo_casing/AC = chambered + ..(TRUE, TRUE) + if(!chambered) + AC.pixel_x = rand(-10.0, 10) + AC.pixel_y = rand(-10.0, 10) + AC.dir = pick(GLOB.alldirs) + /obj/item/gun/projectile/bombarda/chamber_round() return @@ -29,16 +49,23 @@ /obj/item/gun/projectile/bombarda/attack_self(mob/living/user) + if(world.time < last_pump + pump_sound_cooldown) + return pump(user) + last_pump = world.time return /obj/item/gun/projectile/bombarda/proc/pump(mob/M) - playsound(M, 'sound/weapons/gun_interactions/sawclose.ogg', 60, 1) + playsound(M, 'sound/weapons/bombarda/pump.ogg', 60, 1) if(chambered) chambered.loc = get_turf(src) chambered.SpinAnimation(5, 1) + chambered.pixel_x = rand(-10.0, 10) + chambered.pixel_y = rand(-10.0, 10) + chambered.dir = pick(GLOB.alldirs) playsound(src, chambered.drop_sound, 60, 1) chambered = null + update_icon() if(!magazine.ammo_count()) return FALSE var/obj/item/ammo_casing/AC = magazine.get_round() @@ -51,6 +78,9 @@ ammo_type = /obj/item/ammo_casing/grenade/improvised caliber = "40mm" max_ammo = 1 + insert_sound = 'sound/weapons/bombarda/load.ogg' + remove_sound = 'sound/weapons/bombarda/open.ogg' + load_sound = 'sound/weapons/bombarda/load.ogg' /obj/item/ammo_box/magazine/internal/bombarda/New() ..() @@ -73,6 +103,7 @@ icon_state = "exp_shell" item_state = "exp_shell" caliber = "40mm" + drop_sound = 'sound/weapons/gun_interactions/shotgun_fall.ogg' /obj/item/ammo_casing/grenade/improvised/exp_shell name = "Improvised explosive shell" diff --git a/icons/obj/weapons/bombarda.dmi b/icons/obj/weapons/bombarda.dmi index 1811f6b66ba..9fe8adae60d 100644 Binary files a/icons/obj/weapons/bombarda.dmi and b/icons/obj/weapons/bombarda.dmi differ diff --git a/sound/weapons/bombarda/load.ogg b/sound/weapons/bombarda/load.ogg new file mode 100644 index 00000000000..173596672be Binary files /dev/null and b/sound/weapons/bombarda/load.ogg differ diff --git a/sound/weapons/bombarda/open.ogg b/sound/weapons/bombarda/open.ogg new file mode 100644 index 00000000000..4639cb53aa5 Binary files /dev/null and b/sound/weapons/bombarda/open.ogg differ diff --git a/sound/weapons/bombarda/pump.ogg b/sound/weapons/bombarda/pump.ogg new file mode 100644 index 00000000000..bca73589df6 Binary files /dev/null and b/sound/weapons/bombarda/pump.ogg differ