Add being able to delete a custom level quicksave

Custom level quicksaves are NOT affected by the clear data menu, so the
player should be able to delete quicksaves this way. The quicksave
confirmation menu now has an extra option to delete the save (and that
option also has its own confirmation menu before deleting).
This commit is contained in:
Misa
2021-08-11 20:26:58 -07:00
parent 12e8924efc
commit 3a2265ef0d
4 changed files with 45 additions and 0 deletions

View File

@@ -6033,9 +6033,15 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
case Menu::quickloadlevel:
option("continue from save");
option("start from beginning");
option("delete save");
option("back to levels");
menuyoff = -30;
break;
case Menu::deletequicklevel:
option("no! don't delete");
option("yes, delete save");
menuyoff = 64;
break;
case Menu::youwannaquit:
option("yes, quit");
option("no, return");
@@ -6537,6 +6543,16 @@ void Game::deletetele(void)
telesummary = "";
}
void Game::customdeletequick(const std::string& file)
{
const std::string path = "saves/" + file.substr(7) + ".vvv";
if (!FILESYSTEM_delete(path.c_str()))
{
printf("Error deleting %s\n", path.c_str());
}
}
void Game::swnpenalty(void)
{
//set the SWN clock back to the closest 5 second interval