Fix multiple pref issues (#18083)

* fix tail alyering pref

* .

* .

* .

* .

* -

* return

* fix that

* write needs save after

* urg

* ban slot change mid round

* -

* .

* properly save

* .

* queue to ss

* read current

* performance

* .

* .

* bit better optimized

* no resetsploit

* this works at least but is it proper (#13)

* this works at least but is it proper

* Update changeling.dm

* this too...

* dont be private

* fix asset ss

---------

Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
Kashargul
2025-08-10 04:13:15 +02:00
committed by GitHub
parent 7303f34565
commit d9787e171e
15 changed files with 107 additions and 55 deletions
@@ -69,19 +69,14 @@
set category = "IC.Game"
set desc = "Switch tail layer to show below/above/between clothing or other things such as wings!."
var/input = tgui_input_list(src, "Select a tail layer.", "Set Tail Layer", list(SWITCH_TAIL_LAYER_UPPER, SWITCH_TAIL_LAYER_STANDARD, SWITCH_TAIL_LAYER_LOWER))
if(isnull(input))
var/input = tgui_input_list(src, "Select a tail layer.", "Set Tail Layer", GLOB.tail_layer_options, read_preference(/datum/preference/choiced/human/tail_layering))
if(!input)
return
switch(input)
if(SWITCH_TAIL_LAYER_UPPER)
tail_layering = input
write_preference_directly(/datum/preference/numeric/human/tail_layering, TAIL_UPPER_LAYER_HIGH)
if(SWITCH_TAIL_LAYER_STANDARD)
tail_layering = input
write_preference_directly(/datum/preference/numeric/human/tail_layering, TAIL_UPPER_LAYER)
if(SWITCH_TAIL_LAYER_LOWER)
tail_layering = input
write_preference_directly(/datum/preference/numeric/human/tail_layering, TAIL_UPPER_LAYER_LOW)
var/tail_option = GLOB.tail_layer_options[input]
if(!tail_option)
return
tail_layering = tail_option
write_preference_directly(/datum/preference/choiced/human/tail_layering, input)
update_tail_showing()