Add Sounds to stuff! (Port from VOREStation)

This commit is contained in:
Rykka Stormheart
2019-10-29 15:30:56 -06:00
committed by VirgoBot
parent 59fa7c2899
commit c177796c2d
8 changed files with 48 additions and 1 deletions

View File

@@ -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()

View File

@@ -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
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

View File

@@ -931,7 +931,11 @@
/obj/machinery/suit_cycler/proc/finished_job()
var/turf/T = get_turf(src)
<<<<<<< HEAD
T.audible_message("\icon[src]<span class='notice'>The [src] beeps several times.</span>")
=======
T.visible_message("\icon[src]<span class='notice'>The [src] beeps several times.</span>")
>>>>>>> 23cc197... Add Sounds to stuff! (Port from VOREStation) (#6494)
icon_state = initial(icon_state)
active = 0
playsound(src, 'sound/machines/boobeebeep.ogg', 50)

View File

@@ -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"

View File

@@ -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"

Binary file not shown.

Binary file not shown.

Binary file not shown.