From fc0f42c7e5ce2d22e9971c46c8da6725ac24e5de Mon Sep 17 00:00:00 2001 From: Werner <1331699+Arrow768@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:03:42 +0100 Subject: [PATCH] Adds a warning that character deletions are permanent (#17887) * Adds a warning that character deletions are permanent * Add confirmation prompt * Update code/modules/client/preferences.dm Co-authored-by: Matt Atlas --------- Co-authored-by: Werner Co-authored-by: Matt Atlas --- code/modules/client/preferences.dm | 7 ++-- .../arrow768-permanent-char-deletion.yml | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/arrow768-permanent-char-deletion.yml diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a7d11c507b8..fa396dd6dab 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -247,7 +247,7 @@ var/list/preferences_datums = list() dat += "Save slot - " dat += "Reload slot" if (config.sql_saves) - dat += " - Delete slot" + dat += " - Permanently delete slot" else dat += "Please create an account to save your preferences." @@ -369,8 +369,9 @@ var/list/preferences_datums = list() else if(href_list["delete"]) if (!config.sql_saves) return 0 - if (alert(usr, "You will be unable to re-create a character with the same name! Are you sure you want to delete the loaded character?", "Delete Character", "No", "Yes") == "Yes") - delete_character_sql(usr.client) + if (alert(usr, "You will be unable to re-create a character with the same name! Are you sure you want to permanently [real_name]? The slot can not be restored.", "Permanently Delete Character", "No", "Yes") == "Yes") + if(alert(usr, "Are you sure you want to PERMANENTLY delete your character?","Confirm Permanent Deletion","Yes","No") == "Yes") + delete_character_sql(usr.client) else return 0 diff --git a/html/changelogs/arrow768-permanent-char-deletion.yml b/html/changelogs/arrow768-permanent-char-deletion.yml new file mode 100644 index 00000000000..5157d9e49ca --- /dev/null +++ b/html/changelogs/arrow768-permanent-char-deletion.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Arrow768 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a warning that characters can not be restored when deleting a character"