[MIRROR] Fix multiple pref issues (#11373)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-10 07:24:35 -07:00
committed by GitHub
parent b7c79d4a6a
commit ae778b99ee
15 changed files with 106 additions and 53 deletions

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()