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 <mattiathebest2000@hotmail.it>

---------

Co-authored-by: Werner <Arrow768@users.noreply.github.com>
Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
Werner
2023-12-09 14:03:42 +01:00
committed by GitHub
parent 79039df4c3
commit fc0f42c7e5
2 changed files with 45 additions and 3 deletions
+4 -3
View File
@@ -247,7 +247,7 @@ var/list/preferences_datums = list()
dat += "<a href='?src=\ref[src];save=1'>Save slot</a> - "
dat += "<a href='?src=\ref[src];reload=1'>Reload slot</a>"
if (config.sql_saves)
dat += " - <a href='?src=\ref[src];delete=1'>Delete slot</a>"
dat += " - <a href='?src=\ref[src];delete=1'>Permanently delete slot</a>"
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
@@ -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"