Skip to content

Commit

Permalink
Fix preferences (namely toggle_prefs) not saving because of 16 bit sa…
Browse files Browse the repository at this point in the history
…nitization when loaded. Now 24 bit.
  • Loading branch information
Drulikar committed Jul 24, 2023
1 parent 967389d commit 75cab10
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,22 +199,22 @@
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
UI_style = sanitize_inlist(UI_style, list("white", "dark", "midnight", "orange", "old"), initial(UI_style))
tgui_say = sanitize_integer(tgui_say, FALSE, TRUE, TRUE)
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
be_special = sanitize_integer(be_special, 0, SHORT_REAL_LIMIT, initial(be_special))
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
toggles_chat = sanitize_integer(toggles_chat, 0, 65535, initial(toggles_chat))
chat_display_preferences = sanitize_integer(chat_display_preferences, 0, 65535, initial(chat_display_preferences))
toggles_ghost = sanitize_integer(toggles_ghost, 0, 65535, initial(toggles_ghost))
toggles_langchat = sanitize_integer(toggles_langchat, 0, 65535, initial(toggles_langchat))
toggles_sound = sanitize_integer(toggles_sound, 0, 65535, initial(toggles_sound))
toggle_prefs = sanitize_integer(toggle_prefs, 0, 65535, initial(toggle_prefs))
toggles_flashing= sanitize_integer(toggles_flashing, 0, 65535, initial(toggles_flashing))
toggles_ert = sanitize_integer(toggles_ert, 0, 65535, initial(toggles_ert))
toggles_admin = sanitize_integer(toggles_admin, 0, 65535, initial(toggles_admin))
toggles_chat = sanitize_integer(toggles_chat, 0, SHORT_REAL_LIMIT, initial(toggles_chat))
chat_display_preferences = sanitize_integer(chat_display_preferences, 0, SHORT_REAL_LIMIT, initial(chat_display_preferences))
toggles_ghost = sanitize_integer(toggles_ghost, 0, SHORT_REAL_LIMIT, initial(toggles_ghost))
toggles_langchat = sanitize_integer(toggles_langchat, 0, SHORT_REAL_LIMIT, initial(toggles_langchat))
toggles_sound = sanitize_integer(toggles_sound, 0, SHORT_REAL_LIMIT, initial(toggles_sound))
toggle_prefs = sanitize_integer(toggle_prefs, 0, SHORT_REAL_LIMIT, initial(toggle_prefs))
toggles_flashing= sanitize_integer(toggles_flashing, 0, SHORT_REAL_LIMIT, initial(toggles_flashing))
toggles_ert = sanitize_integer(toggles_ert, 0, SHORT_REAL_LIMIT, initial(toggles_ert))
toggles_admin = sanitize_integer(toggles_admin, 0, SHORT_REAL_LIMIT, initial(toggles_admin))
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
item_animation_pref_level = sanitize_integer(item_animation_pref_level, SHOW_ITEM_ANIMATIONS_NONE, SHOW_ITEM_ANIMATIONS_ALL, SHOW_ITEM_ANIMATIONS_ALL)
pain_overlay_pref_level = sanitize_integer(pain_overlay_pref_level, PAIN_OVERLAY_BLURRY, PAIN_OVERLAY_LEGACY, PAIN_OVERLAY_BLURRY)
window_skin = sanitize_integer(window_skin, 0, 65535, initial(window_skin))
window_skin = sanitize_integer(window_skin, 0, SHORT_REAL_LIMIT, initial(window_skin))
ghost_vision_pref = sanitize_inlist(ghost_vision_pref, list(GHOST_VISION_LEVEL_NO_NVG, GHOST_VISION_LEVEL_MID_NVG, GHOST_VISION_LEVEL_FULL_NVG), GHOST_VISION_LEVEL_MID_NVG)
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
playtime_perks = sanitize_integer(playtime_perks, 0, 1, 1)
Expand Down

0 comments on commit 75cab10

Please sign in to comment.