/tg/ pref datums (part 1) (#16219)

* TG Prefs (Step 1: JSON savefiles)

* TG Prefs (Step 2: Preference Datum Code)

* TG Prefs (Step 3: Convert /datum/client_preferences)

* TG Prefs (Step 4: Clean up and finishing touches)

* Fix some weird compile errors from the rebase
This commit is contained in:
ShadowLarkens
2024-08-31 07:09:05 +10:00
committed by GitHub
parent 0cfc6e9e94
commit faac97e352
184 changed files with 4968 additions and 2198 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ var/list/mentor_verbs_default = list(
log_admin("[key_name(src)]->[key_name(recipient)]: [msg]")
if(recipient.is_preference_enabled(/datum/client_preference/play_mentorhelp_ping))
if(recipient.prefs?.read_preference(/datum/preference/toggle/play_mentorhelp_ping))
recipient << 'sound/effects/mentorhelp.mp3'
for(var/client/C in GLOB.mentors)
+2 -2
View File
@@ -194,10 +194,10 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
var/chat_msg = "<span class='notice'>(<A HREF='?_src_=mentorholder;mhelp=[ref_src];[HrefToken()];mhelp_action=escalate'>ESCALATE</A>) Ticket [TicketHref("#[id]", ref_src)]<b>: [LinkedReplyName(ref_src)]:</b> [msg]</span>"
AddInteraction("<font color='red'>[LinkedReplyName(ref_src)]: [msg]</font>")
for (var/client/C in GLOB.mentors)
if (C.is_preference_enabled(/datum/client_preference/play_mentorhelp_ping))
if (C.prefs?.read_preference(/datum/preference/toggle/play_mentorhelp_ping))
C << 'sound/effects/mentorhelp.mp3'
for (var/client/C in GLOB.admins)
if (C.is_preference_enabled(/datum/client_preference/play_mentorhelp_ping))
if (C.prefs?.read_preference(/datum/preference/toggle/play_mentorhelp_ping))
C << 'sound/effects/mentorhelp.mp3'
message_mentors(chat_msg)