Fixes savefile corruption bug and allows character swapping (#18230)

* Converts original to a weakref

* More pref stuff

* Record Updater

* No in-round pref changing here

* Shadekin warning

* irrelevent

* make this booleanlike
This commit is contained in:
Cameron Lennox
2025-08-13 09:20:20 -07:00
committed by GitHub
parent 22572d341a
commit c61f74f7e9
22 changed files with 104 additions and 53 deletions
@@ -319,6 +319,7 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
data["b_type"] = pref.b_type
data["digitigrade"] = pref.digitigrade
data["tail_layering"] = pref.read_preference(/datum/preference/choiced/human/tail_layering)
data["synth_color_toggle"] = pref.synth_color
data["synth_color"] = pref.read_preference(/datum/preference/color/human/synth_color)
@@ -996,6 +997,13 @@ var/const/preview_icons = 'icons/mob/human_races/preview.dmi'
pref.digitigrade = !pref.digitigrade
return TOPIC_REFRESH_UPDATE_PREVIEW
if("set_tail_layering")
var/new_tail_layering = tgui_input_list(user, "Select a tail layer.", "Set Tail Layer", GLOB.tail_layer_options,
pref.read_preference(/datum/preference/choiced/human/tail_layering))
if(new_tail_layering)
pref.update_preference_by_type(/datum/preference/choiced/human/tail_layering, new_tail_layering)
return TOPIC_REFRESH_UPDATE_PREVIEW
if("synth_color_toggle")
pref.synth_color = !pref.synth_color
return TOPIC_REFRESH_UPDATE_PREVIEW