diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 1f7414e17f..0d72808545 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -47,6 +47,8 @@ var/radio_filter_out var/radio_filter_in + var/datum/looping_sound/air_pump/soundloop + /obj/machinery/atmospherics/unary/vent_pump/on use_power = 1 icon_state = "map_vent_out" @@ -68,6 +70,10 @@ pressure_checks = 2 pressure_checks_default = 2 +/obj/machinery/atmospherics/unary/vent_pump/Initialize() + . = ..() + soundloop = new(list(src), FALSE) + /obj/machinery/atmospherics/unary/vent_pump/New() ..() air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP @@ -84,6 +90,7 @@ if(initial_loc) initial_loc.air_vent_info -= id_tag initial_loc.air_vent_names -= id_tag + QDEL_NULL(soundloop) return ..() /obj/machinery/atmospherics/unary/vent_pump/high_volume @@ -164,11 +171,15 @@ /obj/machinery/atmospherics/unary/vent_pump/proc/can_pump() if(stat & (NOPOWER|BROKEN)) + soundloop.stop() return 0 if(!use_power) + soundloop.stop() return 0 if(welded) + soundloop.stop() return 0 + soundloop.start() return 1 /obj/machinery/atmospherics/unary/vent_pump/process() diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index 8b927b3a54..4795f63687 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -43,4 +43,15 @@ mid_sounds = list('sound/machines/microwave/microwave-mid1.ogg'=10, 'sound/machines/microwave/microwave-mid2.ogg'=1) mid_length = 10 end_sound = 'sound/machines/microwave/microwave-end.ogg' - volume = 90 \ No newline at end of file + volume = 90 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/datum/looping_sound/air_pump + start_sound = 'sound/machines/air_pump/airpumpstart.ogg' + start_length = 10 + mid_sounds = list('sound/machines/air_pump/airpumpidle.ogg' = 1) + mid_length = 10 + end_sound = 'sound/machines/air_pump/airpumpshutdown.ogg' + volume = 20 + pref_check = /datum/client_preference/air_pump_noise \ No newline at end of file diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 7939514beb..828c80c6ef 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -931,7 +931,11 @@ /obj/machinery/suit_cycler/proc/finished_job() var/turf/T = get_turf(src) +<<<<<<< HEAD T.audible_message("\icon[src]The [src] beeps several times.") +======= + T.visible_message("\icon[src]The [src] beeps several times.") +>>>>>>> 23cc197... Add Sounds to stuff! (Port from VOREStation) (#6494) icon_state = initial(icon_state) active = 0 playsound(src, 'sound/machines/boobeebeep.ogg', 50) diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index 063150f69d..ac1a203e4b 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -135,6 +135,12 @@ var/list/_client_preferences_by_type enabled_description = "Show" disabled_description = "Hide" +/datum/client_preference/air_pump_noise + description ="Air Pump Ambient Noise" + key = "SOUND_AIRPUMP" + enabled_description = "Audible" + disabled_description = "Silent" + /datum/client_preference/mob_tooltips description ="Mob tooltips" key = "MOB_TOOLTIPS" diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index fa51b9e4e9..0bf770e76c 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -224,6 +224,21 @@ feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/verb/toggle_air_pump_hum() + set name = "Toggle Air Pump Noise" + set category = "Preferences" + set desc = "Toggles Air Pumps humming" + + var/pref_path = /datum/client_preference/air_pump_noise + + toggle_preference(pref_path) + + to_chat(src, "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear air pumps hum, start, and stop.") + + SScharacter_setup.queue_preferences_save(prefs) + + feedback_add_details("admin_verb","TAirPumpNoise") + /client/verb/toggle_safe_firing() set name = "Toggle Gun Firing Intent Requirement" set category = "Preferences" diff --git a/sound/machines/air_pump/airpumpidle.ogg b/sound/machines/air_pump/airpumpidle.ogg new file mode 100644 index 0000000000..25635cc31c Binary files /dev/null and b/sound/machines/air_pump/airpumpidle.ogg differ diff --git a/sound/machines/air_pump/airpumpshutdown.ogg b/sound/machines/air_pump/airpumpshutdown.ogg new file mode 100644 index 0000000000..19969041be Binary files /dev/null and b/sound/machines/air_pump/airpumpshutdown.ogg differ diff --git a/sound/machines/air_pump/airpumpstart.ogg b/sound/machines/air_pump/airpumpstart.ogg new file mode 100644 index 0000000000..312cf94895 Binary files /dev/null and b/sound/machines/air_pump/airpumpstart.ogg differ