From 5c0c8aa4c98a65ba12368e3c430b19aadaec88d0 Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Mon, 15 Apr 2019 23:43:36 -0400 Subject: [PATCH] Update PDA.dm --- code/game/objects/items/devices/PDA/PDA.dm | 92 ++++++++++++++-------- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 9ff717816c..94b7617022 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -391,7 +391,7 @@ GLOBAL_LIST_EMPTY(PDAs) //BASIC FUNCTIONS=================================== if("Refresh")//Refresh, goes to the end of the proc. - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if ("Toggle_Font") //CODE REVISION 2 @@ -406,16 +406,19 @@ GLOBAL_LIST_EMPTY(PDAs) font_mode = FONT_ORBITRON if (MODE_VT) font_mode = FONT_VT - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if ("Change_Color") var/new_color = input("Please enter a color name or hex value (Default is \'#808000\').",background_color)as color background_color = new_color - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if ("Toggle_Underline") underline_flag = !underline_flag - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Return")//Return if(mode<=9) @@ -424,7 +427,8 @@ GLOBAL_LIST_EMPTY(PDAs) mode = round(mode/10) if(mode==4 || mode == 5)//Fix for cartridges. Redirects to hub. mode = 0 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if ("Authenticate")//Checks for ID id_check(U) @@ -434,8 +438,9 @@ GLOBAL_LIST_EMPTY(PDAs) if(istype(id, /obj/item/card/id/syndicate)) owner = id.registered_name update_label() - playsound(src, 'sound/machines/terminal_processing.ogg', 50, 1) - addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/machines/terminal_success.ogg', 50, 1), 13) + if (!silent) + playsound(src, 'sound/machines/terminal_processing.ogg', 15, 1) + addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/machines/terminal_success.ogg', 15, 1), 13) if("Eject")//Ejects the cart, only done from hub. if (!isnull(cartridge)) @@ -445,65 +450,76 @@ GLOBAL_LIST_EMPTY(PDAs) cartridge.host_pda = null cartridge = null update_icon() - playsound(src, 'sound/machines/terminal_eject_disc.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_eject_disc.ogg', 15, 1) //MENU FUNCTIONS=================================== if("0")//Hub mode = 0 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("1")//Notes mode = 1 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("2")//Messenger mode = 2 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("21")//Read messeges mode = 21 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("3")//Atmos scan mode = 3 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("4")//Redirects to hub mode = 0 - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) //MAIN FUNCTIONS=================================== if("Light") toggle_light() - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Medical Scan") if(scanmode == PDA_SCANNER_MEDICAL) scanmode = PDA_SCANNER_NONE else if((!isnull(cartridge)) && (cartridge.access & CART_MEDICAL)) scanmode = PDA_SCANNER_MEDICAL - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Reagent Scan") if(scanmode == PDA_SCANNER_REAGENT) scanmode = PDA_SCANNER_NONE else if((!isnull(cartridge)) && (cartridge.access & CART_REAGENT_SCANNER)) scanmode = PDA_SCANNER_REAGENT - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Halogen Counter") if(scanmode == PDA_SCANNER_HALOGEN) scanmode = PDA_SCANNER_NONE else if((!isnull(cartridge)) && (cartridge.access & CART_ENGINE)) scanmode = PDA_SCANNER_HALOGEN - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Honk") if ( !(last_noise && world.time < last_noise + 20) ) - playsound(src, 'sound/items/bikehorn.ogg', 50, 1) + playsound(src, 'sound/items/bikehorn.ogg', 15, 1) last_noise = world.time if("Trombone") if ( !(last_noise && world.time < last_noise + 20) ) - playsound(src, 'sound/misc/sadtrombone.ogg', 50, 1) + playsound(src, 'sound/misc/sadtrombone.ogg', 15, 1) last_noise = world.time if("Gas Scan") @@ -511,7 +527,8 @@ GLOBAL_LIST_EMPTY(PDAs) scanmode = PDA_SCANNER_NONE else if((!isnull(cartridge)) && (cartridge.access & CART_ATMOS)) scanmode = PDA_SCANNER_GAS - playsound(src, 'sound/machines/terminal_select.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_select.ogg', 15, 1) if("Drone Phone") var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical") @@ -520,7 +537,8 @@ GLOBAL_LIST_EMPTY(PDAs) var/msg = "NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!" _alert_drones(msg, TRUE, U) to_chat(U, msg) - playsound(src, 'sound/machines/terminal_success.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_success.ogg', 15, 1) //NOTEKEEPER FUNCTIONS=================================== @@ -672,7 +690,8 @@ GLOBAL_LIST_EMPTY(PDAs) if (!signal.data["done"]) to_chat(user, "ERROR: Server isn't responding.") return - playsound(src, 'sound/machines/terminal_error.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_error.ogg', 15, 1) var/target_text = signal.format_target() // Log it in our logs @@ -685,7 +704,8 @@ GLOBAL_LIST_EMPTY(PDAs) // Log in the talk log user.log_talk(message, LOG_PDA, tag="PDA: [initial(name)] to [target_text]") to_chat(user, "Message sent to [target_text]: \"[message]\"") - playsound(src, 'sound/machines/terminal_success.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_success.ogg', 15, 1) // Reset the photo picture = null last_text = world.time @@ -696,7 +716,7 @@ GLOBAL_LIST_EMPTY(PDAs) tnote += "← From [signal.data["name"]] ([signal.data["job"]]):
[signal.format_message()]
" if (!silent) - playsound(src, 'sound/machines/twobeep.ogg', 50, 1) + playsound(src, 'sound/machines/twobeep.ogg', 15, 1) audible_message("[icon2html(src, hearers(src))] *[ttone]*", null, 3) //Search for holder of the PDA. var/mob/living/L = null @@ -732,10 +752,12 @@ GLOBAL_LIST_EMPTY(PDAs) if(id) remove_id() - playsound(src, 'sound/machines/terminal_eject_disc.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_eject_disc.ogg', 15, 1) else remove_pen() - playsound(src, 'sound/machines/button4.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/button4.ogg', 15, 1) /obj/item/pda/CtrlClick() ..() @@ -811,7 +833,8 @@ GLOBAL_LIST_EMPTY(PDAs) if(old_id) user.put_in_hands(old_id) update_icon() - playsound(src, 'sound/machines/button.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/button.ogg', 15, 1) return TRUE // access to status display signals @@ -823,21 +846,24 @@ GLOBAL_LIST_EMPTY(PDAs) cartridge.host_pda = src to_chat(user, "You insert [cartridge] into [src].") update_icon() - playsound(src, 'sound/machines/button.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/button.ogg', 15, 1) else if(istype(C, /obj/item/card/id)) var/obj/item/card/id/idcard = C if(!idcard.registered_name) to_chat(user, "\The [src] rejects the ID!") return - playsound(src, 'sound/machines/terminal_error.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_error.ogg', 15, 1) if(!owner) owner = idcard.registered_name ownjob = idcard.assignment update_label() to_chat(user, "Card scanned.") - playsound(src, 'sound/machines/terminal_success.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/terminal_success.ogg', 15, 1) else //Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand. if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents)) @@ -863,7 +889,8 @@ GLOBAL_LIST_EMPTY(PDAs) to_chat(user, "You slide \the [C] into \the [src].") inserted_item = C update_icon() - playsound(src, 'sound/machines/button.ogg', 50, 1) + if (!silent) + playsound(src, 'sound/machines/button.ogg', 15, 1) else if(istype(C, /obj/item/photo)) var/obj/item/photo/P = C @@ -1053,3 +1080,4 @@ GLOBAL_LIST_EMPTY(PDAs) #undef PDA_SCANNER_HALOGEN #undef PDA_SCANNER_GAS #undef PDA_SPAM_DELAY +