Skip to content

Commit

Permalink
adds some missing save preference calls (#7793)
Browse files Browse the repository at this point in the history
title

:cl:
fix: some random preference verbs weren't saving the preference
/:cl:
  • Loading branch information
harryob authored Dec 14, 2024
1 parent a3ba124 commit 8ede75a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You will no longer get attack log messages."))

prefs.save_preferences()


/client/proc/toggleffattacklogs()
set name = "Toggle FF Attack Log Messages"
Expand All @@ -538,6 +540,7 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You will no longer get friendly fire attack log messages."))

prefs.save_preferences()

/client/proc/toggledebuglogs()
set name = "Toggle Debug Log Messages"
Expand All @@ -549,6 +552,8 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You will no longer get debug log messages."))

prefs.save_preferences()

// TODO Port this to Statpanel Options Window probably
/client/proc/togglestatpanelsplit()
set name = "Toggle Split Tabs"
Expand All @@ -559,6 +564,8 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You disabled split admin tabs in Statpanel."))

prefs.save_preferences()

/client/proc/togglenichelogs()
set name = "Toggle Niche Log Messages"
set category = "Preferences.Logs"
Expand All @@ -569,6 +576,7 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You will no longer get niche log messages."))

prefs.save_preferences()

/client/proc/announce_random_fact()
set name = "Announce Random Fact"
Expand All @@ -592,6 +600,8 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You will no longer hear an audio cue for ARES and Prayer messages."))

prefs.save_preferences()

/client/proc/toggle_admin_stealth()
set name = "Toggle Admin Stealth"
set category = "Preferences.Admin"
Expand All @@ -601,6 +611,8 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You disabled admin stealth mode."))

prefs.save_preferences()

/client/proc/toggle_admin_afk_safety()
set name = "Toggle AFK Safety"
set category = "Preferences.Admin"
Expand All @@ -610,5 +622,7 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
else
to_chat(usr, SPAN_BOLDNOTICE("You disabled afk safety. You will now be auto kicked by the afk timer."))

prefs.save_preferences()

#undef MAX_WARNS
#undef AUTOBANTIME
2 changes: 2 additions & 0 deletions code/modules/client/preferences_toggles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@
prefs.custom_cursors = FALSE
to_chat(src, SPAN_NOTICE("You're no longer using custom cursors."))

prefs.save_preferences()

/client/verb/toggle_auto_viewport_fit()
set name = "Toggle Auto Viewport Fit"
set category = "Preferences.UI"
Expand Down

0 comments on commit 8ede75a

Please sign in to comment.