[EXTRAREADY][AAAAAA] Hey revolver, don't mothers make good fathers? (#41620)

tweak: Suppressed and dry fire sounds are now stored as a variable, and can be edited on a per gun basis.
sounddel: The standard gun dry fire sound was collapsed to one sound instead of 4. They were all just pitch variations anyways, which is now covered by built in sound pitch variation.
soundadd: Revolvers now have a unique gunshot sound that is slightly different for 357 and 38.
soundadd: Revolvers now have a unique dry fire sound.
soundadd: Revolvers now make a unique noise when emptying them besides just the sound of shells falling out.
soundadd: Spinning a revolver such as the Russian Revolver now makes a sound.
spellcheck: Syndicate sniper kit now includes a suppressor instead of a "supressor."
This commit is contained in:
Rob
2018-12-01 23:30:09 -08:00
committed by yogstation13-bot
parent c0bffd5d5c
commit 76790b32fc
20 changed files with 30 additions and 18 deletions

View File

@@ -21,8 +21,11 @@
var/fire_sound = "gunshot"
var/vary_fire_sound = TRUE
var/fire_sound_volume = 50
var/dry_fire_sound = 'sound/weapons/gun_dry_fire.ogg'
var/suppressed = null //whether or not a message is displayed when fired
var/can_suppress = FALSE
var/suppressed_sound = 'sound/weapons/gunshot_silenced.ogg'
var/suppressed_volume = 10
var/can_unsuppress = TRUE
var/recoil = 0 //boom boom shake the room
var/clumsy_check = TRUE
@@ -140,7 +143,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", 30, TRUE)
playsound(src, dry_fire_sound, 30, TRUE)
/obj/item/gun/proc/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
@@ -148,7 +151,7 @@
shake_camera(user, recoil + 1, recoil)
if(suppressed)
playsound(user, fire_sound, 10, vary_fire_sound)
playsound(user, suppressed_sound, suppressed_volume, vary_fire_sound)
else
playsound(user, fire_sound, fire_sound_volume, vary_fire_sound)
if(message)

View File

@@ -94,8 +94,6 @@
/obj/item/gun/ballistic/proc/install_suppressor(obj/item/suppressor/S)
// this proc assumes that the suppressor is already inside src
suppressed = S
S.oldsound = fire_sound
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
w_class += S.w_class //so pistols do not fit in pockets when suppressed
update_icon()
@@ -108,7 +106,6 @@
return ..()
to_chat(user, "<span class='notice'>You unscrew [suppressed] from [src].</span>")
user.put_in_hands(suppressed)
fire_sound = S.oldsound
w_class -= S.w_class
suppressed = null
update_icon()
@@ -173,7 +170,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", 30, 1)
playsound(src, dry_fire_sound, 30, TRUE)
return (OXYLOSS)
#undef BRAINS_BLOWN_THROW_SPEED
#undef BRAINS_BLOWN_THROW_RANGE
@@ -221,7 +218,6 @@
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"
w_class = WEIGHT_CLASS_TINY
var/oldsound = null
/obj/item/suppressor/specialoffer

View File

@@ -3,6 +3,10 @@
desc = "A suspicious revolver. Uses .357 ammo." //usually used by syndicates
icon_state = "revolver"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
fire_sound = 'sound/weapons/revolver357shot.ogg'
vary_fire_sound = FALSE
fire_sound_volume = 90
dry_fire_sound = 'sound/weapons/revolverdry.ogg'
casing_ejector = FALSE
/obj/item/gun/ballistic/revolver/Initialize()
@@ -27,7 +31,7 @@
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
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(user, 'sound/weapons/revolverload.ogg', 40, TRUE)
A.update_icon()
update_icon()
chamber_round(0)
@@ -44,6 +48,7 @@
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
playsound(user, 'sound/weapons/revolverempty.ogg', 40, FALSE)
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
@@ -58,6 +63,7 @@
return
if(do_spin())
playsound(usr, "revolver_spin", 30, FALSE)
usr.visible_message("[usr] spins [src]'s chamber.", "<span class='notice'>You spin [src]'s chamber.</span>")
else
verbs -= /obj/item/gun/ballistic/revolver/verb/spin
@@ -88,6 +94,7 @@
/obj/item/gun/ballistic/revolver/detective
name = "\improper .38 Mars Special"
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
fire_sound = 'sound/weapons/revolver38shot.ogg'
icon_state = "detective"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
obj_flags = UNIQUE_RENAME
@@ -101,7 +108,7 @@
/obj/item/gun/ballistic/revolver/detective/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(magazine.caliber != initial(magazine.caliber))
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
playsound(user, fire_sound, 50, 1)
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,20)
user.dropItemToGround(src)
@@ -122,6 +129,7 @@
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return TRUE
magazine.caliber = "357"
fire_sound = 'sound/weapons/revolver357shot.ogg'
desc = "The barrel and chamber assembly seems to have been modified."
to_chat(user, "<span class='notice'>You reinforce the barrel of [src]. Now it will fire .357 rounds.</span>")
else
@@ -135,6 +143,7 @@
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
magazine.caliber = "38"
fire_sound = 'sound/weapons/revolver38shot.ogg'
desc = initial(desc)
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
return TRUE
@@ -220,7 +229,7 @@
if(chambered)
var/obj/item/ammo_casing/AC = chambered
if(AC.fire_casing(user, user))
playsound(user, fire_sound, 50, 1)
playsound(user, fire_sound, fire_sound_volume, vary_fire_sound)
var/zone = check_zone(user.zone_selected)
var/obj/item/bodypart/affecting = H.get_bodypart(zone)
if(zone == BODY_ZONE_HEAD || zone == BODY_ZONE_PRECISE_EYES || zone == BODY_ZONE_PRECISE_MOUTH)
@@ -231,7 +240,7 @@
return
user.visible_message("<span class='danger'>*click*</span>")
playsound(src, "gun_dry_fire", 30, 1)
playsound(src, dry_fire_sound, 30, TRUE)
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = BODY_ZONE_HEAD)
user.apply_damage(300, BRUTE, affecting)

View File

@@ -181,7 +181,7 @@
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to melt [user.p_their()] face off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 30, 1)
playsound(src, dry_fire_sound, 30, TRUE)
return (OXYLOSS)