From d2c491e7979ca24a26b4e829b5dd86045bc67c46 Mon Sep 17 00:00:00 2001 From: CHOMPStation2 <58959929+CHOMPStation2@users.noreply.github.com> Date: Sat, 2 Dec 2023 08:23:58 -0700 Subject: [PATCH] [MIRROR] PDA Ringtone Pref (#7303) Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Selis Co-authored-by: Selis --- code/datums/outfits/outfit.dm | 4 ++-- .../preference_setup/general/04_equipment.dm | 15 +++++++------- code/modules/client/preferences.dm | 4 ++-- code/modules/pda/pda.dm | 20 ++++++++++++++++--- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 74cb76871b..ef7e9ea8ee 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -182,8 +182,8 @@ var/list/outfits_decls_by_type_ pda.ownjob = assignment pda.ownrank = rank pda.name = "PDA-[H.real_name] ([assignment])" - if(H.client.prefs.ttone) // YW Edit - pda.ttone = H.client.prefs.ttone + if(H.client.prefs.ringtone) // if null we use the job default + pda.ttone = H.client.prefs.ringtone return pda /decl/hierarchy/outfit/dd_SortValue() diff --git a/code/modules/client/preference_setup/general/04_equipment.dm b/code/modules/client/preference_setup/general/04_equipment.dm index 9422af96c8..a5afab63d6 100644 --- a/code/modules/client/preference_setup/general/04_equipment.dm +++ b/code/modules/client/preference_setup/general/04_equipment.dm @@ -12,7 +12,7 @@ S["backbag"] >> pref.backbag S["pdachoice"] >> pref.pdachoice S["communicator_visibility"] >> pref.communicator_visibility - S["ttone"] >> pref.ttone //YW Edit + S["ttone"] >> pref.ringtone // CHOMPEdit - We use ttone in the pref so that it doesnt get reset /datum/category_item/player_setup_item/general/equipment/save_character(var/savefile/S) S["all_underwear"] << pref.all_underwear @@ -20,7 +20,7 @@ S["backbag"] << pref.backbag S["pdachoice"] << pref.pdachoice S["communicator_visibility"] << pref.communicator_visibility - S["ttone"] << pref.ttone // YW EDIT + S["ttone"] << pref.ringtone // CHOMPEdit - We use ttone in the pref so that it doesnt get reset // Moved from /datum/preferences/proc/copy_to() /datum/category_item/player_setup_item/general/equipment/copy_to_mob(var/mob/living/carbon/human/character) @@ -75,7 +75,7 @@ pref.all_underwear_metadata -= underwear_metadata pref.backbag = sanitize_integer(pref.backbag, 1, backbaglist.len, initial(pref.backbag)) pref.pdachoice = sanitize_integer(pref.pdachoice, 1, pdachoicelist.len, initial(pref.pdachoice)) - pref.ttone = sanitize(pref.ttone, 20)//YW Edit + pref.ringtone = sanitize(pref.ringtone, 20) /datum/category_item/player_setup_item/general/equipment/content() . = list() @@ -92,7 +92,7 @@ . += "Backpack Type: [backbaglist[pref.backbag]]
" . += "PDA Type: [pdachoicelist[pref.pdachoice]]
" . += "Communicator Visibility: [(pref.communicator_visibility) ? "Yes" : "No"]
" - . += "Ringtone (leave blank for job default): [pref.ttone]
" //YW EDIT + . += "Ringtone (leave blank for job default): [pref.ringtone]
" return jointext(.,null) @@ -150,10 +150,9 @@ if(CanUseTopic(user)) pref.communicator_visibility = !pref.communicator_visibility return TOPIC_REFRESH - else if(href_list["set_ttone"]) //Start of YW EDIT + else if(href_list["set_ringtone"]) if(CanUseTopic(user)) - pref.ttone = sanitize(input(user, "Please enter a new ringtone.", "Character Preference") as null|text, 20) - return TOPIC_REFRESH //End of YW EDIT - + pref.ringtone = sanitize(input(user, "Please enter a new ringtone.", "Character Preference") as null|text, 20) + return TOPIC_REFRESH return ..() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 8b9a88d6cc..d729ce6805 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -159,8 +159,8 @@ var/list/preferences_datums = list() // Communicator identity data var/communicator_visibility = 0 - // Default ringtone for character; if blank, use job default. YW EDIT - var/ttone = null + /// Default ringtone for character; if blank, use job default. + var/ringtone = null var/datum/category_collection/player_setup_collection/player_setup var/datum/browser/panel diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm index cd6f4f039c..7d1ce9e0d5 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -33,12 +33,26 @@ var/global/list/obj/item/device/pda/PDAs = list() "slip" = 'sound/misc/slip.ogg', "honk" = 'sound/items/bikehorn.ogg', "SKREE" = 'sound/voice/shriek1.ogg', - // "holy" = 'sound/items/PDA/ambicha4-short.ogg', "xeno" = 'sound/voice/hiss1.ogg', - "dust" = 'sound/effects/supermatter.ogg', + "dust" = 'sound/effects/supermatter.ogg', // CHOMPEdit - Keeps dust as ringtone "spark" = 'sound/effects/sparks4.ogg', "rad" = 'sound/items/geiger/high1.ogg', - "servo" = 'sound/machines/rig/rigservo.ogg') + "servo" = 'sound/machines/rig/rigservo.ogg', + // "buh-boop" = 'sound/misc/buh-boop.ogg', // CHOMPEdit - No. + "trombone" = 'sound/misc/sadtrombone.ogg', + "whistle" = 'sound/misc/boatswain.ogg', + "chirp" = 'sound/misc/nymphchirp.ogg', + "slurp" = 'sound/items/drink.ogg', + "pwing" = 'sound/items/nif_tone_good.ogg', + "clack" = 'sound/items/storage/toolbox.ogg', + "bzzt" = 'sound/misc/null.ogg', //vibrate mode + "chimes" = 'sound/misc/notice3.ogg', + "prbt" = 'sound/voice/prbt.ogg', + "bark" = 'sound/voice/bark2.ogg', + "bork" = 'sound/voice/bork.ogg', + "roark" = 'sound/voice/roarbark.ogg', + "chitter" = 'sound/voice/moth/moth_chitter.ogg', + "squish" = 'sound/effects/slime_squish.ogg') var/hidden = 0 // Is the PDA hidden from the PDA list? var/touch_silent = 0 //If 1, no beeps on interacting.