mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user