Merge pull request #4436 from Citadel-Station-13/upstream-merge-33615
[MIRROR] Adds reloading sounds to guns
This commit is contained in:
@@ -182,7 +182,7 @@
|
||||
src.add_fingerprint(user)
|
||||
if (src.bullets < 1)
|
||||
user.show_message("<span class='warning'>*click*</span>", 2)
|
||||
playsound(src, "gun_dry_fire", 50, 1)
|
||||
playsound(src, "gun_dry_fire", 60, 1)
|
||||
return
|
||||
playsound(user, 'sound/weapons/gunshot.ogg', 100, 1)
|
||||
src.bullets--
|
||||
|
||||
+9
-1
@@ -182,7 +182,15 @@
|
||||
if("bullet_miss")
|
||||
soundin = pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg')
|
||||
if("gun_dry_fire")
|
||||
soundin = pick('sound/weapons/dry_fire_1.ogg', 'sound/weapons/dry_fire_2.ogg', 'sound/weapons/dry_fire_3.ogg', 'sound/weapons/dry_fire_4.ogg')
|
||||
soundin = pick('sound/weapons/gun_dry_fire_1.ogg', 'sound/weapons/gun_dry_fire_2.ogg', 'sound/weapons/gun_dry_fire_3.ogg', 'sound/weapons/gun_dry_fire_4.ogg')
|
||||
if("gun_insert_empty_magazine")
|
||||
soundin = pick('sound/weapons/gun_magazine_insert_empty_1.ogg', 'sound/weapons/gun_magazine_insert_empty_2.ogg', 'sound/weapons/gun_magazine_insert_empty_3.ogg', 'sound/weapons/gun_magazine_insert_empty_4.ogg')
|
||||
if("gun_insert_full_magazine")
|
||||
soundin = pick('sound/weapons/gun_magazine_insert_full_1.ogg', 'sound/weapons/gun_magazine_insert_full_2.ogg', 'sound/weapons/gun_magazine_insert_full_3.ogg', 'sound/weapons/gun_magazine_insert_full_4.ogg', 'sound/weapons/gun_magazine_insert_full_5.ogg')
|
||||
if("gun_remove_empty_magazine")
|
||||
soundin = pick('sound/weapons/gun_magazine_remove_empty_1.ogg', 'sound/weapons/gun_magazine_remove_empty_2.ogg', 'sound/weapons/gun_magazine_remove_empty_3.ogg', 'sound/weapons/gun_magazine_remove_empty_4.ogg')
|
||||
if("gun_slide_lock")
|
||||
soundin = pick('sound/weapons/gun_slide_lock_1.ogg', 'sound/weapons/gun_slide_lock_2.ogg', 'sound/weapons/gun_slide_lock_3.ogg', 'sound/weapons/gun_slide_lock_4.ogg', 'sound/weapons/gun_slide_lock_5.ogg')
|
||||
if("law")
|
||||
soundin = pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg')
|
||||
if("honkbot_e")
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
if(num_loaded)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
|
||||
playsound(user, 'sound/weapons/bulletinsert.ogg', 60, 1)
|
||||
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
|
||||
A.update_icon()
|
||||
update_icon()
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if(A)
|
||||
user.put_in_hands(A)
|
||||
to_chat(user, "<span class='notice'>You remove a round from \the [src]!</span>")
|
||||
playsound(user, 'sound/weapons/bulletremove.ogg', 60, 1)
|
||||
playsound(A, 'sound/weapons/bulletremove.ogg', 60, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/ammo_box/update_icon()
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='danger'>*click*</span>")
|
||||
playsound(src, "gun_dry_fire", 50, 1)
|
||||
playsound(src, "gun_dry_fire", 60, 1)
|
||||
|
||||
|
||||
/obj/item/gun/proc/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
if(istype(AC)) //there's a chambered round
|
||||
if(casing_ejector)
|
||||
AC.forceMove(get_turf(src)) //Eject casing onto ground.
|
||||
AC.forceMove(drop_location()) //Eject casing onto ground.
|
||||
AC.SpinAnimation(10, 1) //next gen special effects
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
|
||||
chambered = null
|
||||
else if(empty_chamber)
|
||||
chambered = null
|
||||
@@ -58,7 +59,13 @@
|
||||
if(user.transferItemToLoc(AM, src))
|
||||
magazine = AM
|
||||
to_chat(user, "<span class='notice'>You load a new magazine into \the [src].</span>")
|
||||
chamber_round()
|
||||
if(magazine.ammo_count())
|
||||
playsound(src, "gun_insert_full_magazine", 70, 1)
|
||||
if(!chambered)
|
||||
chamber_round()
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/gun_chamber_round.ogg', 100, 1), 3)
|
||||
else
|
||||
playsound(src, "gun_insert_empty_magazine", 70, 1)
|
||||
A.update_icon()
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -110,13 +117,19 @@
|
||||
magazine.forceMove(drop_location())
|
||||
user.put_in_hands(magazine)
|
||||
magazine.update_icon()
|
||||
if(magazine.ammo_count())
|
||||
playsound(src, "sound/weapons/gun_magazine_remove_full.ogg", 70, 1)
|
||||
else
|
||||
playsound(src, "gun_remove_empty_magazine", 70, 1)
|
||||
magazine = null
|
||||
to_chat(user, "<span class='notice'>You pull the magazine out of \the [src].</span>")
|
||||
else if(chambered)
|
||||
AC.forceMove(drop_location())
|
||||
AC.SpinAnimation(10, 1)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
|
||||
chambered = null
|
||||
to_chat(user, "<span class='notice'>You unload the round from \the [src]'s chamber.</span>")
|
||||
playsound(src, "gun_slide_lock", 70, 1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's no magazine in \the [src].</span>")
|
||||
update_icon()
|
||||
@@ -162,7 +175,7 @@
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brain[user.p_s()] out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(src, "gun_dry_fire", 50, 1)
|
||||
playsound(src, "gun_dry_fire", 60, 1)
|
||||
return (OXYLOSS)
|
||||
#undef BRAINS_BLOWN_THROW_SPEED
|
||||
#undef BRAINS_BLOWN_THROW_RANGE
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
CB.forceMove(drop_location())
|
||||
CB.SpinAnimation(10, 1)
|
||||
CB.update_icon()
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, CB, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
|
||||
num_unloaded++
|
||||
if (num_unloaded)
|
||||
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
|
||||
playsound(user, 'sound/weapons/bulletremove.ogg', 60, 1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>*click*</span>")
|
||||
playsound(src, "gun_dry_fire", 50, 1)
|
||||
playsound(src, "gun_dry_fire", 60, 1)
|
||||
|
||||
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
|
||||
user.apply_damage(300, BRUTE, affecting)
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
/obj/item/gun/ballistic/shotgun/proc/pump_unload(mob/M)
|
||||
if(chambered)//We have a shell in the chamber
|
||||
chambered.forceMove(drop_location())//Eject casing
|
||||
chambered.SpinAnimation(5, 1)
|
||||
chambered.SpinAnimation(10, 1)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, chambered, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
|
||||
chambered = null
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/proc/pump_reload(mob/M)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
return(OXYLOSS)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brains out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
|
||||
playsound(src, "gun_dry_fire", 50, 1)
|
||||
playsound(src, "gun_dry_fire", 60, 1)
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user