diff --git a/code/datums/ammo/ammo.dm b/code/datums/ammo/ammo.dm index 65b2d1762c..638b487515 100644 --- a/code/datums/ammo/ammo.dm +++ b/code/datums/ammo/ammo.dm @@ -89,8 +89,8 @@ /// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all. var/hit_effect_color = "#FF0000" - /// currently responsible for increasing firing sound volume ONLY - var/special = FALSE + /// Changes the freq of firing sound based on ammo type + var/firing_freq_offset = FALSE /datum/ammo/New() set_bullet_traits() diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm index ecb9f453ac..ccebda8c51 100644 --- a/code/datums/ammo/bullet/shotgun.dm +++ b/code/datums/ammo/bullet/shotgun.dm @@ -162,7 +162,7 @@ damage = 140 penetration = ARMOR_PENETRATION_TIER_4 bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_6 - special = TRUE + firing_freq_offset = SOUND_FREQ_LOW //buckshot variant only used by the masterkey shotgun attachment. /datum/ammo/bullet/shotgun/buckshot/masterkey @@ -197,7 +197,7 @@ max_range = 8 damage = 140 penetration = ARMOR_PENETRATION_TIER_4 - special = TRUE + firing_freq_offset = SOUND_FREQ_LOW /* 8 GAUGE SHOTGUN AMMO diff --git a/code/datums/skills/uscm.dm b/code/datums/skills/uscm.dm index d99fdda8dd..73ce4ef972 100644 --- a/code/datums/skills/uscm.dm +++ b/code/datums/skills/uscm.dm @@ -290,6 +290,7 @@ COMMAND STAFF SKILL_VEHICLE = SKILL_VEHICLE_SMALL, SKILL_JTAC = SKILL_JTAC_EXPERT, SKILL_INTEL = SKILL_INTEL_TRAINED, + SKILL_SURGERY = SKILL_SURGERY_NOVICE, ) /datum/skills/SEA diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 6499d221dc..723426b842 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -1677,9 +1677,12 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed projectile_to_fire.shot_from = src - return 1 + if(user) + projectile_to_fire.firer = user + if(isliving(user)) + projectile_to_fire.def_zone = user.zone_selected -#define SPECIAL_AMMUNITION_FIRING_VOLUME 100 + return 1 /obj/item/weapon/gun/proc/play_firing_sounds(obj/projectile/projectile_to_fire, mob/user) if(!user) //The gun only messages when fired by a user. @@ -1692,13 +1695,10 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed if(projectile_to_fire.ammo && projectile_to_fire.ammo.sound_override) actual_sound = projectile_to_fire.ammo.sound_override - projectile_to_fire.firer = user - if(isliving(user)) - projectile_to_fire.def_zone = user.zone_selected - //Guns with low ammo have their firing sound var/firing_sndfreq = (current_mag && (current_mag.current_rounds / current_mag.max_rounds) > GUN_LOW_AMMO_PERCENTAGE) ? FALSE : SOUND_FREQ_HIGH - var/sound_volume = in_chamber.ammo.special ? SPECIAL_AMMUNITION_FIRING_VOLUME : firesound_volume + + firing_sndfreq = in_chamber.ammo.firing_freq_offset ? in_chamber.ammo.firing_freq_offset : firing_sndfreq //firing from an attachment if(active_attachable && active_attachable.flags_attach_features & ATTACH_PROJECTILE) @@ -1707,14 +1707,12 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed else if(!(flags_gun_features & GUN_SILENCED)) if (firing_sndfreq && fire_rattle) - playsound(user, fire_rattle, sound_volume, FALSE)//if the gun has a unique 'mag rattle' SFX play that instead of pitch shifting. + playsound(user, fire_rattle, firesound_volume, FALSE) //if the gun has a unique 'mag rattle' SFX play that instead of pitch shifting. else - playsound(user, actual_sound, sound_volume, firing_sndfreq) + playsound(user, actual_sound, firesound_volume, firing_sndfreq) else playsound(user, actual_sound, 25, firing_sndfreq) -#undef SPECIAL_AMMUNITION_FIRING_VOLUME - /obj/item/weapon/gun/proc/simulate_scatter(obj/projectile/projectile_to_fire, atom/target, turf/curloc, turf/targloc, mob/user, bullets_fired = 1) var/fire_angle = Get_Angle(curloc, targloc) var/total_scatter_angle = projectile_to_fire.scatter