diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm
index a37c339e21..54e5e72f7d 100644
--- a/code/datums/outfits/outfit.dm
+++ b/code/datums/outfits/outfit.dm
@@ -169,6 +169,8 @@ var/list/outfits_decls_by_type_
pda.ownjob = assignment
pda.ownrank = rank
pda.name = "PDA-[H.real_name] ([assignment])"
+ if(H.client.prefs.ringtone) // YW Edit
+ pda.ringtone = H.client.prefs.ringtone
return pda
/decl/hierarchy/outfit/dd_SortValue()
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 53a83c66bd..b202311cb1 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -34,7 +34,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/tnote[0] //Current Texts
var/last_text //No text spamming
var/last_honk //Also no honk spamming that's bad too
- var/ttone = "beep" //The PDA ringtone!
+ var/ringtone = "beep" //The PDA ringtone!
var/newstone = "beep, beep" //The news ringtone!
var/lock_code = "" // Lockcode to unlock uplink
var/honkamt = 0 //How many honks left when infected with honk.exe
@@ -107,25 +107,25 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/janitor
default_cartridge = /obj/item/weapon/cartridge/janitor
icon_state = "pda-j"
- ttone = "slip"
+ ringtone = "slip"
/obj/item/device/pda/science
default_cartridge = /obj/item/weapon/cartridge/signal/science
icon_state = "pda-tox"
- ttone = "boom"
+ ringtone = "boom"
/obj/item/device/pda/clown
default_cartridge = /obj/item/weapon/cartridge/clown
icon_state = "pda-clown"
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
- ttone = "honk"
+ ringtone = "honk"
/obj/item/device/pda/mime
default_cartridge = /obj/item/weapon/cartridge/mime
icon_state = "pda-mime"
message_silent = 1
news_silent = 1
- ttone = "silence"
+ ringtone = "silence"
newstone = "silence"
/obj/item/device/pda/heads
@@ -187,12 +187,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/chaplain
default_cartridge = /obj/item/weapon/cartridge/service
icon_state = "pda-holy"
- ttone = "holy"
+ ringtone = "holy"
/obj/item/device/pda/lawyer
default_cartridge = /obj/item/weapon/cartridge/lawyer
icon_state = "pda-lawyer"
- ttone = "..."
+ ringtone = "..."
/obj/item/device/pda/botanist
default_cartridge = /obj/item/weapon/cartridge/service
@@ -239,7 +239,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
// Special AI/pAI PDAs that cannot explode.
/obj/item/device/pda/ai
icon_state = "NONE"
- ttone = "data"
+ ringtone = "data"
newstone = "news"
detonate = 0
@@ -318,14 +318,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/ai/pai
- ttone = "assist"
+ ringtone = "assist"
// Used for the PDA multicaster, which mirrors messages sent to it to a specific department,
/obj/item/device/pda/multicaster
ownjob = "Relay"
icon_state = "NONE"
- ttone = "data"
+ ringtone = "data"
detonate = 0
news_silent = 1
var/list/cartridges_to_send_to = list()
@@ -794,25 +794,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
mode=2
if("Ringtone")
- var/t = input(U, "Please enter new ringtone", name, ttone) as text
- if (in_range(src, U) && loc == U)
- if (t)
- if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
- to_chat(U, "The PDA softly beeps.")
- ui.close()
- else
- t = sanitize(t, 20)
- ttone = t
+ var/t = input(U, "Please enter a new ringtone.", name, ringtone) as text //Start of YW EDIT
+ if (in_range(src, U) && loc == U && t)
+ if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
+ to_chat(U, "The PDA softly beeps.")
+ ui.close()
+ else
+ ringtone = sanitize(t, 20) //End of YW EDIT
else
ui.close()
return 0
if("Newstone")
var/t = input(U, "Please enter new news tone", name, newstone) as text
- if (in_range(src, U) && loc == U)
- if (t)
- t = sanitize(t, 20)
- newstone = t
- else
+ if (in_range(src, U) && loc == U && t)
+ newstone = sanitize(t, 20)
ui.close()
return 0
if("Message")
@@ -858,7 +853,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.show_message("Virus sent!", 1)
P.message_silent = 1
P.news_silent = 1
- P.ttone = "silence"
+ P.ringtone = "silence"
P.newstone = "silence"
else
to_chat(U, "PDA not found.")
@@ -1145,7 +1140,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message, var/reply = 1)
var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" ([reply ? "Reply" : "Unable to Reply"])"
- new_info(message_silent, ttone, reception_message)
+ new_info(message_silent, ringtone, reception_message)
log_pda("(PDA: [sending_unit]) sent \"[message]\" to [name]", usr)
new_message = 1
diff --git a/code/modules/client/preference_setup/general/04_equipment.dm b/code/modules/client/preference_setup/general/04_equipment.dm
index 7197635e5b..85c4b7dc26 100644
--- a/code/modules/client/preference_setup/general/04_equipment.dm
+++ b/code/modules/client/preference_setup/general/04_equipment.dm
@@ -12,6 +12,7 @@
S["backbag"] >> pref.backbag
S["pdachoice"] >> pref.pdachoice
S["communicator_visibility"] >> pref.communicator_visibility
+ S["ringtone"] >> pref.ringtone //YW Edit
/datum/category_item/player_setup_item/general/equipment/save_character(var/savefile/S)
S["all_underwear"] << pref.all_underwear
@@ -19,6 +20,7 @@
S["backbag"] << pref.backbag
S["pdachoice"] << pref.pdachoice
S["communicator_visibility"] << pref.communicator_visibility
+ S["ringtone"] << pref.ringtone // YW EDIT
// Moved from /datum/preferences/proc/copy_to()
/datum/category_item/player_setup_item/general/equipment/copy_to_mob(var/mob/living/carbon/human/character)
@@ -73,6 +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.ringtone = sanitize(pref.ringtone, 20)//YW Edit
/datum/category_item/player_setup_item/general/equipment/content()
. = list()
@@ -89,6 +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.ringtone]
" //YW EDIT
return jointext(.,null)
@@ -146,6 +150,10 @@
if(CanUseTopic(user))
pref.communicator_visibility = !pref.communicator_visibility
return TOPIC_REFRESH
+ else if(href_list["set_ringtone"]) //Start of YW EDIT
+ if(CanUseTopic(user))
+ pref.ringtone = sanitize(input(user, "Please enter a new ringtone.", "Character Preference") as null|text, 20)
+ return TOPIC_REFRESH //End of YW EDIT
return ..()
\ No newline at end of file
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index c768d292c7..09daef2ecd 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -126,6 +126,9 @@ datum/preferences
// Communicator identity data
var/communicator_visibility = 0
+ // Default ringtone for character; if blank, use job default. YW EDIT
+ var/ringtone = null
+
var/datum/category_collection/player_setup_collection/player_setup
var/datum/browser/panel
diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm
index ced7c9a45f..c2519d3461 100644
--- a/code/modules/events/money_spam.dm
+++ b/code/modules/events/money_spam.dm
@@ -115,7 +115,7 @@
if (!P.message_silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
- if(!P.message_silent) O.show_message(text("\icon[P] *[P.ttone]*"))
+ if(!P.message_silent) O.show_message(text("\icon[P] *[P.ringtone]*")) //YW edit, ttone to ringtone
//Search for holder of the PDA.
var/mob/living/L = null
if(P.loc && isliving(P.loc))
diff --git a/code/modules/gamemaster/actions/money_spam.dm b/code/modules/gamemaster/actions/money_spam.dm
index e11baec090..98fb811bdc 100644
--- a/code/modules/gamemaster/actions/money_spam.dm
+++ b/code/modules/gamemaster/actions/money_spam.dm
@@ -115,7 +115,7 @@
if (!P.message_silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
- if(!P.message_silent) O.show_message(text("\icon[P] *[P.ttone]*"))
+ if(!P.message_silent) O.show_message(text("\icon[P] *[P.ringtone]*")) //YW EDIT. ttone to ringtone
//Search for holder of the PDA.
var/mob/living/L = null
if(P.loc && isliving(P.loc))