diff --git a/code/__DEFINES/modular_computer.dm b/code/__DEFINES/modular_computer.dm index 8326e63214d..5c1ffe9e6e4 100644 --- a/code/__DEFINES/modular_computer.dm +++ b/code/__DEFINES/modular_computer.dm @@ -45,5 +45,6 @@ /// The default ringtone of the Messenger app. #define MESSENGER_RINGTONE_DEFAULT "beep" + /// The maximum length of the ringtone of the Messenger app. #define MESSENGER_RINGTONE_MAX_LENGTH 20 diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index bdd70571155..513d78f5f58 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -127,6 +127,9 @@ /// You'll probably break someone's config if you change this, so it's best to not to. var/config_tag = "" + /// custom ringtone for this job + var/job_tone + /datum/job/New() . = ..() @@ -359,12 +362,13 @@ if(istype(pda)) pda.saved_identification = equipped.real_name pda.saved_job = equipped_job.title + pda.update_ringtone(equipped_job.job_tone) pda.UpdateDisplay() var/client/equipped_client = GLOB.directory[ckey(equipped.mind?.key)] if(equipped_client) - pda.update_ringtone(equipped_client) + pda.update_ringtone_pref(equipped_client) /datum/outfit/job/get_chameleon_disguise_info() diff --git a/code/modules/jobs/job_types/chaplain.dm b/code/modules/jobs/job_types/chaplain.dm index 6360315d6e1..aa4a52a2b0c 100644 --- a/code/modules/jobs/job_types/chaplain.dm +++ b/code/modules/jobs/job_types/chaplain.dm @@ -36,6 +36,8 @@ voice_of_god_power = 2 //Chaplains are very good at speaking with the voice of god + job_tone = "holy" + /datum/job/chaplain/after_spawn(mob/living/spawned, client/player_client) . = ..() diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm index 8910d43b297..9703e291d5a 100644 --- a/code/modules/jobs/job_types/clown.dm +++ b/code/modules/jobs/job_types/clown.dm @@ -36,6 +36,8 @@ rpg_title = "Jester" job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN + job_tone = "honk" + /datum/job/clown/after_spawn(mob/living/spawned, client/player_client) . = ..() diff --git a/code/modules/jobs/job_types/detective.dm b/code/modules/jobs/job_types/detective.dm index f43768a39ef..72cb0a73542 100644 --- a/code/modules/jobs/job_types/detective.dm +++ b/code/modules/jobs/job_types/detective.dm @@ -43,6 +43,8 @@ rpg_title = "Thiefcatcher" //I guess they caught them all rip thief... job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN + job_tone = "objection" + /datum/outfit/job/detective name = "Detective" diff --git a/code/modules/jobs/job_types/head_of_personnel.dm b/code/modules/jobs/job_types/head_of_personnel.dm index 164eee68f1d..3c4725f41f1 100644 --- a/code/modules/jobs/job_types/head_of_personnel.dm +++ b/code/modules/jobs/job_types/head_of_personnel.dm @@ -41,7 +41,6 @@ family_heirlooms = list(/obj/item/reagent_containers/cup/glass/trophy/silver_cup) rpg_title = "Guild Questgiver" job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_BOLD_SELECT_TEXT | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN - voice_of_god_power = 1.4 //Command staff has authority diff --git a/code/modules/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm index 6b4415cc66b..8278bffb847 100644 --- a/code/modules/jobs/job_types/janitor.dm +++ b/code/modules/jobs/job_types/janitor.dm @@ -31,6 +31,8 @@ rpg_title = "Groundskeeper" job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN + job_tone = "slip" + /datum/outfit/job/janitor name = "Janitor" diff --git a/code/modules/jobs/job_types/lawyer.dm b/code/modules/jobs/job_types/lawyer.dm index ca76059bd72..8cf6ef08bda 100644 --- a/code/modules/jobs/job_types/lawyer.dm +++ b/code/modules/jobs/job_types/lawyer.dm @@ -28,6 +28,8 @@ job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN + job_tone = "objection" + /datum/outfit/job/lawyer name = "Lawyer" diff --git a/code/modules/jobs/job_types/mime.dm b/code/modules/jobs/job_types/mime.dm index 80d554bb535..e1d23d94c05 100644 --- a/code/modules/jobs/job_types/mime.dm +++ b/code/modules/jobs/job_types/mime.dm @@ -35,6 +35,8 @@ voice_of_god_power = 0.5 //Why are you speaking voice_of_god_silence_power = 3 + job_tone = "silence" + /datum/job/mime/after_spawn(mob/living/spawned, client/player_client) . = ..() diff --git a/code/modules/jobs/job_types/scientist.dm b/code/modules/jobs/job_types/scientist.dm index 3faecd1d2c6..4d21f6a3bdd 100644 --- a/code/modules/jobs/job_types/scientist.dm +++ b/code/modules/jobs/job_types/scientist.dm @@ -36,6 +36,8 @@ rpg_title = "Thaumaturgist" job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN + job_tone = "boom" + /datum/outfit/job/scientist name = "Scientist" diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm index d8b275edeca..c5a77688e95 100644 --- a/code/modules/modular_computers/computers/item/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet.dm @@ -199,7 +199,7 @@ * Arguments: * * ringtone_client - The client whose prefs we'll use to set the ringtone of this PDA. */ -/obj/item/modular_computer/tablet/proc/update_ringtone(client/ringtone_client) +/obj/item/modular_computer/tablet/proc/update_ringtone_pref(client/ringtone_client) if(!ringtone_client) return @@ -208,10 +208,16 @@ if(!new_ringtone || new_ringtone == MESSENGER_RINGTONE_DEFAULT) return + update_ringtone(new_ringtone) + + +/// A simple proc to set the ringtone from a pda. +/obj/item/modular_computer/tablet/proc/update_ringtone(new_ringtone) + if(!istext(new_ringtone)) + return for(var/datum/computer_file/program/messenger/messenger_app in stored_files) messenger_app.ringtone = new_ringtone - // SUBTYPES /obj/item/modular_computer/tablet/syndicate_contract_uplink