Sound Additions + Tweaks

Changes listed below:
* Makes Death Sounds mutable on their own audio channel.
* Makes Ear Ringing use the HUD Channel for sounds

Additions:
* [Adds On Fire effect](https://streamable.com/c1fxeo)
* Adds Stunned effect(https://streamable.com/v2if0s)
* [Adds SMES humming based on power usage in/out. Affected by walls, will only play if in LOS and visible.](https://streamable.com/z41x90)
* [Adds Atmos Alerts making a noise on the monitor](https://streamable.com/uhegq6)
* [Tcomms + PDA servers hum when powered and active, also respects walls/LOS](https://streamable.com/vb08x1)
* [Fridges hum quietly while powered](https://streamable.com/c3zsz7)
* [Point Defense turrets now make a sound audible from inside the station when firing, to add more spice to meteor waves.](https://streamable.com/bf8mwl)
* Shield Generators now hum when active.
This commit is contained in:
Rykka Stormheart
2023-06-15 12:27:23 -07:00
parent d4c5742d6c
commit 1de51fb4b8
50 changed files with 304 additions and 20 deletions

View File

@@ -439,7 +439,12 @@ GLOBAL_LIST_EMPTY(##LIST_NAME);\
#define VOLUME_CHANNEL_DOORS "Doors" #define VOLUME_CHANNEL_DOORS "Doors"
#define VOLUME_CHANNEL_INSTRUMENTS "Instruments" #define VOLUME_CHANNEL_INSTRUMENTS "Instruments"
#define VOLUME_CHANNEL_WEATHER "Weather" #define VOLUME_CHANNEL_WEATHER "Weather"
#define VOLUME_CHANNEL_SPECIES_SOUNDS "Species Sounds" #define VOLUME_CHANNEL_SPECIES_SOUNDS "Species Sounds (Verbal Injury Feedback)"
#define VOLUME_CHANNEL_HUD_WARNINGS "SS13 HUD (Clientside-only sounds)"
#define VOLUME_CHANNEL_DEATH_SOUNDS "Death Sounds"
#define VOLUME_CHANNEL_INJURY_SOUNDS "Mob Injury Sounds (Non-Verbal Feedback)"
#define VOLUME_CHANNEL_MACHINERY "Machinery Noises"
#define VOLUME_CHANNEL_MACHINERY_IDLE "Machinery Idle Noises"
// Make sure you update this or clients won't be able to adjust the channel // Make sure you update this or clients won't be able to adjust the channel
GLOBAL_LIST_INIT(all_volume_channels, list( GLOBAL_LIST_INIT(all_volume_channels, list(
@@ -450,7 +455,12 @@ GLOBAL_LIST_INIT(all_volume_channels, list(
VOLUME_CHANNEL_DOORS, VOLUME_CHANNEL_DOORS,
VOLUME_CHANNEL_INSTRUMENTS, VOLUME_CHANNEL_INSTRUMENTS,
VOLUME_CHANNEL_WEATHER, VOLUME_CHANNEL_WEATHER,
VOLUME_CHANNEL_SPECIES_SOUNDS VOLUME_CHANNEL_SPECIES_SOUNDS,
VOLUME_CHANNEL_HUD_WARNINGS,
VOLUME_CHANNEL_DEATH_SOUNDS,
VOLUME_CHANNEL_INJURY_SOUNDS,
VOLUME_CHANNEL_MACHINERY,
VOLUME_CHANNEL_MACHINERY_IDLE
)) ))
#define APPEARANCECHANGER_CHANGED_RACE "Race" #define APPEARANCECHANGER_CHANGED_RACE "Race"

View File

@@ -36,6 +36,7 @@
var/pref_check var/pref_check
var/volume_chan //CHOMPedit var/volume_chan //CHOMPedit
var/exclusive var/exclusive
var/falloff // CHOMPEdit: Add Falloff
var/timerid var/timerid
var/started var/started
@@ -106,7 +107,7 @@
continue continue
SEND_SOUND(thing, S) SEND_SOUND(thing, S)
else else
playsound(thing, S, volume, vary, extra_range, ignore_walls = !opacity_check, preference = pref_check, volume_channel = volume_chan) // CHOMPEdit - Weather volume channel playsound(thing, S, volume, vary, extra_range, falloff = falloff, ignore_walls = !opacity_check, preference = pref_check, volume_channel = volume_chan) // CHOMPEdit - Weather volume channel CHOMPEdit again: falloff
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds) /datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
if(!_mid_sounds) if(!_mid_sounds)

View File

@@ -115,3 +115,37 @@
mid_length = 6 mid_length = 6
end_sound = 'sound/machines/vehicle/engine_end.ogg' end_sound = 'sound/machines/vehicle/engine_end.ogg'
volume = 20 volume = 20
// CHOMPAdd: Fridges!
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/fridge
mid_sounds = list('sound/machines/kitchen/fridge/fridge_loop.ogg' = 1)
mid_length = 60
volume = 10
extra_range = -1 // Short-range
pref_check = /datum/client_preference/fridge_hum
volume_chan = VOLUME_CHANNEL_MACHINERY_IDLE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/tcomms
start_sound = 'sound/machines/tcomms/tcomms_pulse.ogg'
mid_sounds = list('sound/machines/tcomms/tcomms_01.ogg' = 1)
mid_length = 20
end_sound = 'sound/machines/tcomms/tcomms_pulse.ogg'
volume = 40
opacity_check = TRUE // We don't want to drown people with noise outside Tcomms
falloff = 0.2 // Harsh
volume_chan = VOLUME_CHANNEL_MACHINERY_IDLE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/shield_generator
start_sound = 'modular_chomp/sound/machines/shield_hum/shield_generator_whir.ogg'
mid_sounds = list('modular_chomp/sound/machines/shield_hum/shield_generator_hum2.ogg', 'modular_chomp/sound/machines/shield_hum/shield_generator_hum3.ogg')
mid_length = 60
end_sound = 'modular_chomp/sound/machines/shield_hum/shield_generator_whir.ogg'
volume = 40
volume_chan = VOLUME_CHANNEL_MACHINERY
exclusive = TRUE

View File

@@ -5,7 +5,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/mob /datum/looping_sound/mob
// volume_chan = VOLUME_CHANNEL_INJ_DEATH // Commented out until pain/etc PR is in // volume_chan = VOLUME_CHANNEL_MOB_SOUNDS
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -18,7 +18,7 @@
volume = 40 volume = 40
direct = TRUE // We send this sound directly to the mob, bc they only hear it when they're deaf. direct = TRUE // We send this sound directly to the mob, bc they only hear it when they're deaf.
exclusive = TRUE // This should only occur once, because we can only be deafened once. exclusive = TRUE // This should only occur once, because we can only be deafened once.
// volume_chan = VOLUME_CHANNEL_INJ_DEATH // Commented out until pain/etc PR is in volume_chan = VOLUME_CHANNEL_HUD_WARNINGS
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -29,6 +29,25 @@
pref_check = /datum/client_preference/sleep_music pref_check = /datum/client_preference/sleep_music
direct = TRUE // We send this sound directly to the mob, bc they only hear it when they're asleep. direct = TRUE // We send this sound directly to the mob, bc they only hear it when they're asleep.
exclusive = TRUE // This should only occur once, because we only want one music loop running while we snooze. exclusive = TRUE // This should only occur once, because we only want one music loop running while we snooze.
// volume_chan = VOLUME_CHANNEL_INJ_DEATH // Commented out until pain/etc PR is in volume_chan = VOLUME_CHANNEL_HUD_WARNINGS
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/mob/on_fire
mid_sounds = list('sound/effects/mob_effects/on_fire/on_fire_loop.ogg'=1)
mid_length = 6 SECONDS
end_sound = 'sound/effects/mob_effects/on_fire/fire_extinguish.ogg'
volume = 20
exclusive = TRUE // This should only occur once, because we only want one loop running while we're on fire, even if we're set on fire multiple times.
volume_chan = VOLUME_CHANNEL_INJURY_SOUNDS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/datum/looping_sound/mob/stunned // Going to hang onto this one for later
mid_sounds = list('sound/effects/mob_effects/stun_loop.ogg'=1)
mid_length = 3 SECONDS
volume = 70
direct = TRUE // Send this one directly to the mob, only applies when we're Weakened()
exclusive = TRUE // This should only occur once, because we only want one loop running.
volume_chan = VOLUME_CHANNEL_HUD_WARNINGS
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -50,12 +50,19 @@ var/global/list/minor_air_alarms = list()
var/list/alarms = atmosphere_alarm.major_alarms() var/list/alarms = atmosphere_alarm.major_alarms()
if(alarms.len) if(alarms.len)
icon_screen = "alert:2" icon_screen = "alert:2"
playsound(src, 'modular_chomp/sound/effects/comp_alert_major.ogg', 70, 1) // CHOMPEdit: Alarm notifications
spawn(100) // Wait 10 seconds, then play it again
playsound(src, 'modular_chomp/sound/effects/comp_alert_major.ogg', 70, 1) // CHOMPEdit: Alarm notifications
else else
alarms = atmosphere_alarm.minor_alarms() alarms = atmosphere_alarm.minor_alarms()
if(alarms.len) if(alarms.len)
icon_screen = "alert:1" icon_screen = "alert:1"
playsound(src, 'modular_chomp/sound/effects/comp_alert_minor.ogg', 50, 1) // CHOMPEdit: Alarm notifications
spawn(100) // Wait 10 seconds, then play it again
playsound(src, 'modular_chomp/sound/effects/comp_alert_minor.ogg', 50, 1) // CHOMPEdit: Alarm notifications
else else
icon_screen = initial(icon_screen) icon_screen = initial(icon_screen)
playsound(src, 'modular_chomp/sound/effects/comp_alert_clear.ogg', 50, 1) // CHOMPEdit: Alarm notifications
..() ..()
/obj/machinery/computer/atmos_alert/tgui_act(action, params) /obj/machinery/computer/atmos_alert/tgui_act(action, params)

View File

@@ -49,6 +49,8 @@
var/list/alarms = alarm_monitor ? alarm_monitor.major_alarms() : list() var/list/alarms = alarm_monitor ? alarm_monitor.major_alarms() : list()
if(alarms.len) if(alarms.len)
icon_screen = "alert:2" icon_screen = "alert:2"
playsound(src, 'modular_chomp/sound/effects/comp_alert_major.ogg', 70, 1) // CHOMPEdit: Alarm notifications
else else
icon_screen = initial(icon_screen) icon_screen = initial(icon_screen)
playsound(src, 'modular_chomp/sound/effects/comp_alert_clear.ogg', 50, 1) // CHOMPEdit: Alarm notifications
..() ..()

View File

@@ -17,6 +17,9 @@
var/list/logs = list() // Gets written to by exonet's send_message() function. var/list/logs = list() // Gets written to by exonet's send_message() function.
circuit = /obj/item/weapon/circuitboard/telecomms/exonet_node circuit = /obj/item/weapon/circuitboard/telecomms/exonet_node
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
var/noisy = TRUE // CHOMPStation Add: Hummy noises, this starts on
// Proc: New() // Proc: New()
// Parameters: None // Parameters: None
// Description: Adds components to the machine for deconstruction. // Description: Adds components to the machine for deconstruction.
@@ -26,6 +29,24 @@
desc = "This machine is one of many, many nodes inside [using_map.starsys_name]'s section of the Exonet, connecting the [using_map.station_short] to the rest of the system, at least \ desc = "This machine is one of many, many nodes inside [using_map.starsys_name]'s section of the Exonet, connecting the [using_map.station_short] to the rest of the system, at least \
electronically." electronically."
// CHOMPAdd: Exonet Machinery humming
soundloop = new(list(src), FALSE)
if(prob(60)) // 60% chance to change the midloop
if(prob(40))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_02.ogg' = 1)
soundloop.mid_length = 40
else if(prob(20))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_03.ogg' = 1)
soundloop.mid_length = 10
else
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
soundloop.mid_length = 30
// CHOMPAdd End
soundloop.start() // CHOMPStation Edit: This starts on
/obj/machinery/exonet_node/Destroy() // CHOMPAdd: Just in case.
QDEL_NULL(soundloop) // CHOMPAdd: Exonet noises
// Proc: update_icon() // Proc: update_icon()
// Parameters: None // Parameters: None
// Description: Self explanatory. // Description: Self explanatory.
@@ -48,12 +69,19 @@
if(stat & (BROKEN|NOPOWER|EMPED)) if(stat & (BROKEN|NOPOWER|EMPED))
on = 0 on = 0
update_idle_power_usage(0) update_idle_power_usage(0)
soundloop.stop() // CHOMPStation Add: Hummy noises
noisy = FALSE // CHOMPStation Add: Hummy noises
else else
on = 1 on = 1
update_idle_power_usage(2500) update_idle_power_usage(2500)
else else
on = 0 on = 0
update_idle_power_usage(0) update_idle_power_usage(0)
soundloop.stop() // CHOMPStation Add: Hummy noises
noisy = FALSE // CHOMPStation Add: Hummy noises
if(!noisy && on) // CHOMPStation Add: Hummy noises, safety in case it was already on
soundloop.start() // CHOMPStation Add: Hummy noises
noisy = TRUE // CHOMPStation Add: Hummy noises
update_icon() update_icon()
// Proc: emp_act() // Proc: emp_act()

View File

@@ -12,6 +12,9 @@
var/toggle = 1 // If we /should/ be active or not, var/toggle = 1 // If we /should/ be active or not,
var/list/internal_PDAs = list() // Assoc list of PDAs inside of this, with the department name being the index, var/list/internal_PDAs = list() // Assoc list of PDAs inside of this, with the department name being the index,
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
var/noisy = TRUE // CHOMPStation Add: Hummy noises
/obj/machinery/pda_multicaster/New() /obj/machinery/pda_multicaster/New()
..() ..()
internal_PDAs = list("command" = new /obj/item/device/pda/multicaster/command(src), internal_PDAs = list("command" = new /obj/item/device/pda/multicaster/command(src),
@@ -23,6 +26,24 @@
"cargo" = new /obj/item/device/pda/multicaster/cargo(src), "cargo" = new /obj/item/device/pda/multicaster/cargo(src),
"civilian" = new /obj/item/device/pda/multicaster/civilian(src)) "civilian" = new /obj/item/device/pda/multicaster/civilian(src))
/obj/machinery/pda_multicaster/Initialize()
. = ..()
// CHOMPAdd: PDA Multicaster Server humming
soundloop = new(list(src), FALSE)
if(prob(60)) // 60% chance to change the midloop
if(prob(40))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_02.ogg' = 1)
soundloop.mid_length = 40
else if(prob(20))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_03.ogg' = 1)
soundloop.mid_length = 10
else
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
soundloop.mid_length = 30
soundloop.start() // Have to do this here bc it starts on
// CHOMPAdd End
/obj/machinery/pda_multicaster/prebuilt/Initialize() /obj/machinery/pda_multicaster/prebuilt/Initialize()
. = ..() . = ..()
default_apply_parts() default_apply_parts()
@@ -30,6 +51,7 @@
/obj/machinery/pda_multicaster/Destroy() /obj/machinery/pda_multicaster/Destroy()
for(var/atom/movable/AM in contents) for(var/atom/movable/AM in contents)
qdel(AM) qdel(AM)
QDEL_NULL(soundloop)
..() ..()
/obj/machinery/pda_multicaster/update_icon() /obj/machinery/pda_multicaster/update_icon()
@@ -73,14 +95,20 @@
on = 0 on = 0
update_PDAs(1) // 1 being to turn off. update_PDAs(1) // 1 being to turn off.
update_idle_power_usage(0) update_idle_power_usage(0)
soundloop.stop() // CHOMPStation Add: Hummy noises
noisy = FALSE // CHOMPStation Add: Hummy noises
else else
on = 1 on = 1
update_PDAs(0) update_PDAs(0)
update_idle_power_usage(750) update_idle_power_usage(750)
soundloop.start() // CHOMPStation Add: Hummy noises
noisy = TRUE // CHOMPStation Add: Hummy noises
else else
on = 0 on = 0
update_PDAs(1) update_PDAs(1)
update_idle_power_usage(0) update_idle_power_usage(0)
soundloop.stop() // CHOMPStation Add: Hummy noises
noisy = FALSE // CHOMPStation Add: Hummy noises
update_icon() update_icon()
/obj/machinery/pda_multicaster/process() /obj/machinery/pda_multicaster/process()

View File

@@ -141,6 +141,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
var/rotation_speed = 4.5 SECONDS //How quickly we turn to face threats var/rotation_speed = 4.5 SECONDS //How quickly we turn to face threats
var/datum/weakref/engaging = null // The meteor we're shooting at var/datum/weakref/engaging = null // The meteor we're shooting at
var/id_tag = null var/id_tag = null
var/fire_sounds = list('sound/weapons/frigate_turret/frigate_turret_fire1.ogg', 'sound/weapons/frigate_turret/frigate_turret_fire2.ogg', 'sound/weapons/frigate_turret/frigate_turret_fire3.ogg', 'sound/weapons/frigate_turret/frigate_turret_fire4.ogg') // CHOMPEdit: Pew
/obj/machinery/pointdefense/Initialize() /obj/machinery/pointdefense/Initialize()
. = ..() . = ..()
@@ -225,9 +226,11 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
return return
//We throw a laser but it doesnt have to hit for meteor to explode //We throw a laser but it doesnt have to hit for meteor to explode
var/obj/item/projectile/beam/pointdefense/beam = new(get_turf(src)) var/obj/item/projectile/beam/pointdefense/beam = new(get_turf(src))
playsound(src, 'sound/weapons/mandalorian.ogg', 75, 1) playsound(src, fire_sounds, 75, 1, 40, pressure_affected = FALSE, ignore_walls = TRUE) // CHOMPEdit: Pew
use_power_oneoff(idle_power_usage * 10) use_power_oneoff(idle_power_usage * 10)
beam.launch_projectile(target = M.loc, user = src) beam.launch_projectile(target = M.loc, user = src)
spawn(10)
playsound(src, fire_sounds, 75, 1, 40, pressure_affected = FALSE, ignore_walls = TRUE) // CHOMPEdit: Pew
/obj/machinery/pointdefense/process() /obj/machinery/pointdefense/process()
..() ..()

View File

@@ -37,6 +37,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/hide = 0 // Is it a hidden machine? var/hide = 0 // Is it a hidden machine?
var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to. var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
var/noisy = TRUE // CHOMPStation Add: Hummy noises, this starts on
/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20) /obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20)
// relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending // relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending
@@ -132,6 +134,20 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
else else
for(var/obj/machinery/telecomms/T in telecomms_list) for(var/obj/machinery/telecomms/T in telecomms_list)
add_link(T) add_link(T)
// CHOMPAdd: TComms humming
soundloop = new(list(src), FALSE)
if(prob(60)) // 60% chance to change the midloop
if(prob(40))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_02.ogg' = 1)
soundloop.mid_length = 40
else if(prob(20))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_03.ogg' = 1)
soundloop.mid_length = 10
else
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
soundloop.mid_length = 30
soundloop.start()
// CHOMPAdd End
. = ..() . = ..()
/obj/machinery/telecomms/Destroy() /obj/machinery/telecomms/Destroy()
@@ -139,6 +155,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
for(var/obj/machinery/telecomms/comm in telecomms_list) for(var/obj/machinery/telecomms/comm in telecomms_list)
comm.links -= src comm.links -= src
links = list() links = list()
QDEL_NULL(soundloop) // CHOMPAdd: Tcomms noises
..() ..()
// Used in auto linking // Used in auto linking
@@ -162,10 +179,17 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(toggled) if(toggled)
if(stat & (BROKEN|NOPOWER|EMPED) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off if(stat & (BROKEN|NOPOWER|EMPED) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off
on = 0 on = 0
soundloop.stop() // CHOMPAdd: Tcomms noises
noisy = FALSE
else else
on = 1 on = 1
else else
on = 0 on = 0
soundloop.stop() // CHOMPAdd: Tcomms noises
noisy = FALSE
if(!noisy) // CHOMPAdd: Tcomms noises
soundloop.start() // CHOMPAdd: Tcomms noises
noisy = TRUE
/obj/machinery/telecomms/process() /obj/machinery/telecomms/process()
update_power() update_power()
@@ -183,6 +207,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(prob(100/severity)) if(prob(100/severity))
if(!(stat & EMPED)) if(!(stat & EMPED))
stat |= EMPED stat |= EMPED
playsound(src, 'sound/machines/tcomms/tcomms_pulse.ogg', 70, 1, 30) // CHOMPAdd: Tcomms noises
var/duration = (300 * 10)/severity var/duration = (300 * 10)/severity
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot. spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
stat &= ~EMPED stat &= ~EMPED

View File

@@ -10,8 +10,8 @@
/obj/item/weapon/reagent_containers/food/condiment/spacespice = 2 /obj/item/weapon/reagent_containers/food/condiment/spacespice = 2
) )
open_sound = 'sound/machines/click.ogg' open_sound = 'sound/machines/kitchen/fridge/open_fridge.ogg' // CHOMPEdit: Fridge sounds~
close_sound = 'sound/machines/click.ogg' close_sound = 'sound/machines/kitchen/fridge/close_fridge.ogg' // CHOMPEdit: Fridge sounds~
/obj/structure/closet/secure_closet/freezer/kitchen/mining /obj/structure/closet/secure_closet/freezer/kitchen/mining
req_access = list() req_access = list()
@@ -22,6 +22,9 @@
icon = 'icons/obj/closets/fridge.dmi' icon = 'icons/obj/closets/fridge.dmi'
closet_appearance = null closet_appearance = null
open_sound = 'sound/machines/kitchen/fridge/open_fridge.ogg' // CHOMPEdit: Fridge sounds~
close_sound = 'sound/machines/kitchen/fridge/close_fridge.ogg' // CHOMPEdit: Fridge sounds~
starts_with = list( starts_with = list(
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey = 10) /obj/item/weapon/reagent_containers/food/snacks/meat/monkey = 10)
@@ -31,6 +34,9 @@
icon = 'icons/obj/closets/fridge.dmi' icon = 'icons/obj/closets/fridge.dmi'
closet_appearance = null closet_appearance = null
open_sound = 'sound/machines/kitchen/fridge/open_fridge.ogg' // CHOMPEdit: Fridge sounds~
close_sound = 'sound/machines/kitchen/fridge/close_fridge.ogg' // CHOMPEdit: Fridge sounds~
starts_with = list( starts_with = list(
/obj/item/weapon/reagent_containers/food/drinks/milk = 6, /obj/item/weapon/reagent_containers/food/drinks/milk = 6,
/obj/item/weapon/reagent_containers/food/drinks/soymilk = 4, /obj/item/weapon/reagent_containers/food/drinks/soymilk = 4,

View File

@@ -163,6 +163,12 @@ var/list/_client_preferences_by_type
enabled_description = "Audible" enabled_description = "Audible"
disabled_description = "Silent" disabled_description = "Silent"
/datum/client_preference/fridge_hum // CHOMPStation Add: Misc Sounds
description ="Fridge Humming"
key = "SOUND_FRIDGEHUM"
enabled_description = "Audible"
disabled_description = "Silent"
/datum/client_preference/old_door_sounds /datum/client_preference/old_door_sounds
description ="Old Door Sounds" description ="Old Door Sounds"
key = "SOUND_OLDDOORS" key = "SOUND_OLDDOORS"

View File

@@ -24,6 +24,9 @@
var/datum/wires/smartfridge/wires = null var/datum/wires/smartfridge/wires = null
var/persistent = null // Path of persistence datum used to track contents var/persistent = null // Path of persistence datum used to track contents
var/datum/looping_sound/fridge/soundloop // CHOMPEdit: Fridges hum!
var/playing_sound = FALSE // CHOMPEdit: Fridges hum!
/obj/machinery/smartfridge/secure /obj/machinery/smartfridge/secure
is_secure = 1 is_secure = 1
@@ -35,6 +38,8 @@
wires = new/datum/wires/smartfridge/secure(src) wires = new/datum/wires/smartfridge/secure(src)
else else
wires = new/datum/wires/smartfridge(src) wires = new/datum/wires/smartfridge(src)
soundloop = new(list(src), FALSE) // CHOMPEdit: Fridge hum!
update_icon() update_icon()
/obj/machinery/smartfridge/Destroy() /obj/machinery/smartfridge/Destroy()
@@ -44,6 +49,7 @@
wires = null wires = null
if(persistent) if(persistent)
SSpersistence.forget_value(src, persistent) SSpersistence.forget_value(src, persistent)
QDEL_NULL(soundloop) // CHOMPEdit: Fridge hum!
return ..() return ..()
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj) /obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
@@ -51,7 +57,12 @@
/obj/machinery/smartfridge/process() /obj/machinery/smartfridge/process()
if(stat & (BROKEN|NOPOWER)) if(stat & (BROKEN|NOPOWER))
soundloop.stop() // CHOMPEdit: Fridges don't hum while they lack power.
playing_sound = FALSE // CHOMPEdit: Fridges don't hum while they lack power.
return return
if(!playing_sound && !stat) // CHOMPEdit: Fridges hum while they have power.
soundloop.start()
playing_sound = TRUE
if(src.seconds_electrified > 0) if(src.seconds_electrified > 0)
src.seconds_electrified-- src.seconds_electrified--
if(src.shoot_inventory && prob(2)) if(src.shoot_inventory && prob(2))
@@ -62,6 +73,14 @@
..() ..()
if(old_stat != stat) if(old_stat != stat)
update_icon() update_icon()
// CHOMPEdit Start: Fridge hum
if(stat & (NOPOWER | BROKEN))
soundloop.stop()
playing_sound = FALSE
else
soundloop.start()
playing_sound = TRUE
// CHOMPEdit End
/obj/machinery/smartfridge/update_icon() /obj/machinery/smartfridge/update_icon()
cut_overlays() cut_overlays()

View File

@@ -95,7 +95,7 @@
playsound(src, species.death_sound, 80, 1, 1) playsound(src, species.death_sound, 80, 1, 1)
*/ */
if(!gibbed && !isbelly(loc)) if(!gibbed && !isbelly(loc))
playsound(src, pick(get_species_sound(get_gendered_sound(src))["death"]), src.species.death_volume, 1, 20, volume_channel = VOLUME_CHANNEL_SPECIES_SOUNDS) playsound(src, pick(get_species_sound(get_gendered_sound(src))["death"]), src.species.death_volume, 1, 20, volume_channel = VOLUME_CHANNEL_DEATH_SOUNDS)
// CHOMPEdit End // CHOMPEdit End
if(ticker && ticker.mode) if(ticker && ticker.mode)

View File

@@ -29,10 +29,10 @@
// CHOMPStation Edit: All mobs can play a death_sound if set. On carbons, this is going to be handled by species. // CHOMPStation Edit: All mobs can play a death_sound if set. On carbons, this is going to be handled by species.
if(!gibbed && !isbelly(loc)) if(!gibbed && !isbelly(loc))
if(src.death_sound_override) // Do we override the death sounds from our species list - used by only a few specific mobs. If we do, do the next one instead if(src.death_sound_override) // Do we override the death sounds from our species list - used by only a few specific mobs. If we do, do the next one instead
playsound(src, death_sound_override, 50, 1, 20, volume_channel = VOLUME_CHANNEL_SPECIES_SOUNDS) playsound(src, death_sound_override, 50, 1, 20, volume_channel = VOLUME_CHANNEL_DEATH_SOUNDS)
else else
if(!ishuman(src)) // Safety, we're not going to double up on death noises if we're not human. if(!ishuman(src)) // Safety, we're not going to double up on death noises if we're not human.
playsound(src, pick(get_species_sound(get_gendered_sound(src))["death"]), 50, 1, 20, volume_channel = VOLUME_CHANNEL_SPECIES_SOUNDS) playsound(src, pick(get_species_sound(get_gendered_sound(src))["death"]), 50, 1, 20, volume_channel = VOLUME_CHANNEL_DEATH_SOUNDS)
// CHOMPStation Add End // CHOMPStation Add End
. = ..() . = ..()

View File

@@ -135,16 +135,20 @@
if(stunned) if(stunned)
AdjustStunned(-1) AdjustStunned(-1)
throw_alert("stunned", /obj/screen/alert/stunned) throw_alert("stunned", /obj/screen/alert/stunned)
stunnedloop.start() // CHOMPAdd: Stunned Loop
else else
clear_alert("stunned") clear_alert("stunned")
stunnedloop.stop() // CHOMPAdd: Stunned Loop
return stunned return stunned
/mob/living/proc/handle_weakened() /mob/living/proc/handle_weakened()
if(weakened) if(weakened)
AdjustWeakened(-1) AdjustWeakened(-1)
throw_alert("weakened", /obj/screen/alert/weakened) throw_alert("weakened", /obj/screen/alert/weakened)
stunnedloop.start() // CHOMPAdd: Stunned Loop
else else
clear_alert("weakened") clear_alert("weakened")
stunnedloop.stop() // CHOMPAdd: Stunned Loop
return weakened return weakened
/mob/living/proc/handle_stuttering() /mob/living/proc/handle_stuttering()

View File

@@ -403,6 +403,7 @@
new/obj/effect/dummy/lighting_obj/moblight/fire(src) new/obj/effect/dummy/lighting_obj/moblight/fire(src)
throw_alert("fire", /obj/screen/alert/fire) throw_alert("fire", /obj/screen/alert/fire)
update_fire() update_fire()
firesoundloop.start()
/mob/living/proc/ExtinguishMob() /mob/living/proc/ExtinguishMob()
if(on_fire) if(on_fire)
@@ -412,6 +413,7 @@
qdel(F) qdel(F)
clear_alert("fire") clear_alert("fire")
update_fire() update_fire()
firesoundloop.stop()
if(has_modifier_of_type(/datum/modifier/fire)) if(has_modifier_of_type(/datum/modifier/fire))
remove_modifiers_of_type(/datum/modifier/fire) remove_modifiers_of_type(/datum/modifier/fire)

View File

@@ -19,6 +19,9 @@
var/dos_capacity = 500 // Amount of DoS "packets" in buffer required to crash the relay var/dos_capacity = 500 // Amount of DoS "packets" in buffer required to crash the relay
var/dos_dissipate = 1 // Amount of DoS "packets" dissipated over time. var/dos_dissipate = 1 // Amount of DoS "packets" dissipated over time.
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
var/noisy = TRUE // CHOMPStation Add: Hummy noises
// TODO: Implement more logic here. For now it's only a placeholder. // TODO: Implement more logic here. For now it's only a placeholder.
/obj/machinery/ntnet_relay/operable() /obj/machinery/ntnet_relay/operable()
@@ -33,8 +36,13 @@
/obj/machinery/ntnet_relay/update_icon() /obj/machinery/ntnet_relay/update_icon()
if(operable()) if(operable())
icon_state = initial(icon_state) icon_state = initial(icon_state)
if(!noisy)
soundloop.start() // CHOMPStation Add: Hummy noises
noisy = TRUE // CHOMPStation Add: Hummy noises
else else
icon_state = "[initial(icon_state)]_off" icon_state = "[initial(icon_state)]_off"
soundloop.stop() // CHOMPStation Add: Hummy noises
noisy = FALSE // CHOMPStation Add: Hummy noises
/obj/machinery/ntnet_relay/process() /obj/machinery/ntnet_relay/process()
if(operable()) if(operable())
@@ -106,6 +114,20 @@
ntnet_global.relays.Add(src) ntnet_global.relays.Add(src)
NTNet = ntnet_global NTNet = ntnet_global
ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]") ntnet_global.add_log("New quantum relay activated. Current amount of linked relays: [NTNet.relays.len]")
// CHOMPAdd: PDA Multicaster Server humming
soundloop = new(list(src), FALSE)
if(prob(60)) // 60% chance to change the midloop
if(prob(40))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_02.ogg' = 1)
soundloop.mid_length = 40
else if(prob(20))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_03.ogg' = 1)
soundloop.mid_length = 10
else
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
soundloop.mid_length = 30
soundloop.start() // Have to do this here bc it starts on
// CHOMPAdd End
/obj/machinery/ntnet_relay/Destroy() /obj/machinery/ntnet_relay/Destroy()
if(ntnet_global) if(ntnet_global)
@@ -115,6 +137,7 @@
for(var/datum/computer_file/program/ntnet_dos/D in dos_sources) for(var/datum/computer_file/program/ntnet_dos/D in dos_sources)
D.target = null D.target = null
D.error = "Connection to quantum relay severed" D.error = "Connection to quantum relay severed"
QDEL_NULL(soundloop)
. = ..() . = ..()
/obj/machinery/ntnet_relay/attackby(var/obj/item/W as obj, var/mob/user as mob) /obj/machinery/ntnet_relay/attackby(var/obj/item/W as obj, var/mob/user as mob)

View File

@@ -119,6 +119,7 @@
else else
to_chat(user, "You press the power button and start up \the [src]") to_chat(user, "You press the power button and start up \the [src]")
enable_computer(user) enable_computer(user)
playsound(src, 'modular_chomp/sound/machines/console_power_on.ogg', 60, 1, volume_channel = VOLUME_CHANNEL_MACHINERY)
else // Unpowered else // Unpowered
if(issynth) if(issynth)

View File

@@ -57,6 +57,11 @@ GLOBAL_LIST_EMPTY(smeses)
var/should_be_mapped = 0 // If this is set to 0 it will send out warning on New() var/should_be_mapped = 0 // If this is set to 0 it will send out warning on New()
var/grid_check = FALSE // If true, suspends all I/O. var/grid_check = FALSE // If true, suspends all I/O.
// CHOMPAdd: More humming noises
var/datum/looping_sound/generator/soundloop
var/noisy = FALSE
// CHOMPAdd End
/obj/machinery/power/smes/drain_power(var/drain_check, var/surge, var/amount = 0) /obj/machinery/power/smes/drain_power(var/drain_check, var/surge, var/amount = 0)
if(drain_check) if(drain_check)
@@ -70,6 +75,9 @@ GLOBAL_LIST_EMPTY(smeses)
. = ..() . = ..()
GLOB.smeses += src GLOB.smeses += src
add_nearby_terminals() add_nearby_terminals()
soundloop = new(list(src), FALSE) // CHOMPEdit: hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
soundloop.extra_range = -3 // CHOMPEdit: Doing this here bc we're reusing the generator hum, and can't directly edit that one
soundloop.opacity_check = TRUE // CHOMPEdit: Doing this here bc we're reusing the generator hum, and can't directly edit that one. This is expensive, but we need it to not be annoying.
if(!check_terminals()) if(!check_terminals())
stat |= BROKEN stat |= BROKEN
return return
@@ -84,6 +92,7 @@ GLOBAL_LIST_EMPTY(smeses)
T.master = null T.master = null
terminals = null terminals = null
GLOB.smeses -= src GLOB.smeses -= src
QDEL_NULL(soundloop)
return ..() return ..()
/obj/machinery/power/smes/proc/add_nearby_terminals() /obj/machinery/power/smes/proc/add_nearby_terminals()
@@ -154,7 +163,10 @@ GLOBAL_LIST_EMPTY(smeses)
charge -= amount*SMESRATE charge -= amount*SMESRATE
/obj/machinery/power/smes/process() /obj/machinery/power/smes/process()
if(stat & BROKEN) return if(stat & BROKEN)
soundloop.stop()
noisy = FALSE
return
// only update icon if state changed // only update icon if state changed
if(last_disp != chargedisplay() || last_chrg != inputting || last_onln != outputting) if(last_disp != chargedisplay() || last_chrg != inputting || last_onln != outputting)
@@ -191,6 +203,17 @@ GLOBAL_LIST_EMPTY(smeses)
else else
output_used = 0 output_used = 0
if(!noisy && outputting) // Are we actually outputting power?
soundloop.start()
noisy = TRUE
if(noisy && outputting)
// Capped to 80 volume since higher volumes get annoying and it sounds worse.
// Formula previously was min(round(power/10)+1, 20)
soundloop.volume = CLAMP((output_used / 1000), 1, 80)
if(!outputting)
soundloop.stop()
noisy = FALSE
// called after all power processes are finished // called after all power processes are finished
// restores charge level to smes if there was excess this ptick // restores charge level to smes if there was excess this ptick
/obj/machinery/power/smes/proc/restore(var/percent_load) /obj/machinery/power/smes/proc/restore(var/percent_load)

View File

@@ -70,15 +70,33 @@ var/global/list/obj/machinery/message_server/message_servers = list()
//Messages having theese tokens will be rejected by server. Case sensitive //Messages having theese tokens will be rejected by server. Case sensitive
var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
var/noisy = FALSE // CHOMPStation Add: Hummy noises
/obj/machinery/message_server/New() /obj/machinery/message_server/New()
message_servers += src message_servers += src
decryptkey = GenerateKey() decryptkey = GenerateKey()
send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.") send_pda_message("System Administrator", "system", "This is an automated message. The messaging system is functioning correctly.")
// CHOMPAdd: PDA Messaging Server humming
soundloop = new(list(src), FALSE)
if(prob(60)) // 60% chance to change the midloop
if(prob(40))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_02.ogg' = 1)
soundloop.mid_length = 40
else if(prob(20))
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_03.ogg' = 1)
soundloop.mid_length = 10
else
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
soundloop.mid_length = 30
// CHOMPAdd End
..() ..()
return return
/obj/machinery/message_server/Destroy() /obj/machinery/message_server/Destroy()
message_servers -= src message_servers -= src
QDEL_NULL(soundloop) // CHOMPStation Add: Hummy noises
..() ..()
return return
@@ -99,7 +117,12 @@ var/global/list/obj/machinery/message_server/message_servers = list()
// decryptkey = generateKey() // decryptkey = generateKey()
if(active && (stat & (BROKEN|NOPOWER))) if(active && (stat & (BROKEN|NOPOWER)))
active = 0 active = 0
soundloop.stop() // CHOMPStation Add: Hummy noises
noisy = FALSE // CHOMPStation Add: Hummy noises
return return
if(!noisy && active) // CHOMPStation Add: Hummy noises
soundloop.start() // CHOMPStation Add: Hummy noises
noisy = TRUE // CHOMPStation Add: Hummy noises
update_icon() update_icon()
return return

View File

@@ -25,6 +25,7 @@
use_power = USE_POWER_OFF //doesn't use APC power use_power = USE_POWER_OFF //doesn't use APC power
interact_offline = TRUE // don't check stat & NOPOWER|BROKEN for our UI. We check BROKEN ourselves. interact_offline = TRUE // don't check stat & NOPOWER|BROKEN for our UI. We check BROKEN ourselves.
var/id //for button usage var/id //for button usage
var/datum/looping_sound/shield_generator/shield_hum
/obj/machinery/shield_gen/advanced /obj/machinery/shield_gen/advanced
name = "advanced bubble shield generator" name = "advanced bubble shield generator"
@@ -41,10 +42,12 @@
if(get_dir(cap, src) == cap.dir) if(get_dir(cap, src) == cap.dir)
capacitors |= cap capacitors |= cap
cap.owned_gen = src cap.owned_gen = src
shield_hum = new(list(src), FALSE)
return ..() return ..()
/obj/machinery/shield_gen/Destroy() /obj/machinery/shield_gen/Destroy()
QDEL_LIST_NULL(field) QDEL_LIST_NULL(field)
QDEL_NULL(shield_hum)
return ..() return ..()
/obj/machinery/shield_gen/emag_act(var/remaining_charges, var/mob/user) /obj/machinery/shield_gen/emag_act(var/remaining_charges, var/mob/user)
@@ -245,6 +248,7 @@
to_chat(M, "\icon[src][bicon(src)] You hear heavy droning start up.") to_chat(M, "\icon[src][bicon(src)] You hear heavy droning start up.")
for(var/obj/effect/energy_field/E in field) // Update the icons here to ensure all the shields have been made already. for(var/obj/effect/energy_field/E in field) // Update the icons here to ensure all the shields have been made already.
E.update_icon() E.update_icon()
shield_hum.start()
else else
for(var/obj/effect/energy_field/D in field) for(var/obj/effect/energy_field/D in field)
field.Remove(D) field.Remove(D)
@@ -253,11 +257,13 @@
for(var/mob/M in view(5,src)) for(var/mob/M in view(5,src))
to_chat(M, "\icon[src][bicon(src)] You hear heavy droning fade out.") to_chat(M, "\icon[src][bicon(src)] You hear heavy droning fade out.")
shield_hum.stop()
/obj/machinery/shield_gen/update_icon() /obj/machinery/shield_gen/update_icon()
if(stat & BROKEN) if(stat & BROKEN)
icon_state = "broke" icon_state = "broke"
set_light(0) set_light(0)
shield_hum.stop()
else else
if (src.active) if (src.active)
icon_state = "generator1" icon_state = "generator1"

View File

@@ -11,6 +11,8 @@
var/species_sounds = "None" // By default, we have nothing. var/species_sounds = "None" // By default, we have nothing.
var/death_sound_override = null var/death_sound_override = null
var/virtual_reality_mob = FALSE // gross boolean for keeping VR mobs in VR var/virtual_reality_mob = FALSE // gross boolean for keeping VR mobs in VR
var/datum/looping_sound/mob/on_fire/firesoundloop
var/datum/looping_sound/mob/stunned/stunnedloop
/* // Not sure if needed, screams aren't a carbon thing rn. /* // Not sure if needed, screams aren't a carbon thing rn.
var/scream_sound = null var/scream_sound = null
var/female_scream_sound = null var/female_scream_sound = null
@@ -22,11 +24,23 @@
. = ..() . = ..()
deaf_loop = new(list(src), FALSE) deaf_loop = new(list(src), FALSE)
firesoundloop = new(list(src), FALSE)
stunnedloop = new(list(src), FALSE)
if(firesoundloop) // Partly safety, partly so we can have different probs for randomization
if(prob(40)) // Randomize our end_sound. Can't really do this easily in looping_sound without some work
if(prob(30))
firesoundloop.end_sound = 'sound/effects/mob_effects/on_fire/fire_extinguish2.ogg'
else if(prob(20))
firesoundloop.end_sound = 'sound/effects/mob_effects/on_fire/fire_extinguish3.ogg'
else
firesoundloop.end_sound = 'sound/effects/mob_effects/on_fire/fire_extinguish4.ogg'
/mob/living/Destroy() /mob/living/Destroy()
. = ..() . = ..()
QDEL_NULL(deaf_loop) QDEL_NULL(deaf_loop)
QDEL_NULL(firesoundloop)
QDEL_NULL(stunnedloop)
/mob/living/proc/vs_animate(var/belly_to_animate) /mob/living/proc/vs_animate(var/belly_to_animate)
return return

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.

Binary file not shown.

Binary file not shown.