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-09 22:13:15 -04:00
committed by GitHub
co-authored by C.L.
parent 7303f34565
commit d9787e171e
15 changed files with 107 additions and 55 deletions
+8 -1
View File
@@ -136,6 +136,9 @@
switch(action)
// Basic actions
if("load")
if(!isnewplayer(ui.user))
to_chat(ui.user, span_userdanger("You can't change your character slot while being in round."))
return FALSE
if(!IsGuestKey(ui.user.key))
open_load_dialog(ui.user)
. = TRUE
@@ -152,6 +155,8 @@
sanitize_preferences()
. = TRUE
if("resetslot")
if(!isnewplayer(ui.user))
to_chat(ui.user, span_userdanger("You can't change your character slot while being in round."))
if("Yes" != tgui_alert(ui.user, "This will reset the current slot. Continue?", "Reset current slot?", list("No", "Yes")))
return
if("Yes" != tgui_alert(ui.user, "Are you completely sure that you want to reset this character slot?", "Reset current slot?", list("No", "Yes")))
@@ -160,6 +165,8 @@
sanitize_preferences()
. = TRUE
if("copy")
if(!isnewplayer(ui.user))
to_chat(ui.user, span_userdanger("You can't change your character slot while being in round."))
if(!IsGuestKey(ui.user.key))
open_copy_dialog(ui.user)
. = TRUE
@@ -192,7 +199,7 @@
PMH.screen_loc = LAZYACCESS(preview_screen_locs, "PMH")
/datum/preferences/tgui_close(mob/user)
// save_character()
load_character()
save_preferences()
/datum/preferences/proc/create_character_profiles()