aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/MUDControlCentre.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-23 17:04:10 -0500
committerMichael <[email protected]>2017-02-23 17:04:10 -0500
commiteb4c65f1921f8f74e6a0ea086444f7c034f50f44 (patch)
tree721c7d2b0ec1b54b3a136681d3ac4f8113db4803 /ShiftOS.WinForms/Applications/MUDControlCentre.cs
parent39d3579e271a88a03fe6170c751e5e86378d5a1a (diff)
downloadshiftos_thereturn-eb4c65f1921f8f74e6a0ea086444f7c034f50f44.tar.gz
shiftos_thereturn-eb4c65f1921f8f74e6a0ea086444f7c034f50f44.tar.bz2
shiftos_thereturn-eb4c65f1921f8f74e6a0ea086444f7c034f50f44.zip
Save deletion (client)
Diffstat (limited to 'ShiftOS.WinForms/Applications/MUDControlCentre.cs')
-rw-r--r--ShiftOS.WinForms/Applications/MUDControlCentre.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
index c8289ab..0d67776 100644
--- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs
+++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs
@@ -862,5 +862,26 @@ Current legions: {legionname}";
{
ServerManager.SendMessage("chat_getallchannels", "");
}
+
+ private void btndeletesave_Click(object sender, EventArgs e)
+ {
+ Infobox.PromptYesNo("Delete your system", "Are you SURE you want to delete your system? If you do, you will lose ALL of your Codepoints and file system.", (firstres) =>
+ {
+ if(firstres == true)
+ {
+ Infobox.PromptYesNo("Last chance.", "What you are about to do is IRREVERSABLE. You will lose access to any legions or shops you are a part of. Continue anyway?", (second) =>
+ {
+ if(second == true)
+ {
+ SaveSystem.CurrentSave = null;
+ ShiftOS.Objects.ShiftFS.Utils.Delete(Paths.GetPath("user.dat"));
+ TerminalBackend.InvokeCommand("sos.shutdown");
+ MessageBox.Show("Thank you for playing ShiftOS. Your save data has been deleted successfully. You can come back at anytime, but you will have to restart your game.");
+ System.IO.File.Delete(Paths.SaveFile);
+ }
+ });
+ }
+ });
+ }
}
}