private static void PlayerProgression_WipeAll(On.PlayerProgression.orig_WipeAll orig, PlayerProgression self) { orig(self); string[] files = Directory.GetFiles(GetSaveFileDirectory(), $"*-{self.rainWorld.options.saveSlot}.txt"); for (int i = 0; i < files.Length; i++) { File.Delete(files[i]); } }
private static void PlayerProgression_WipeAll(On.PlayerProgression.orig_WipeAll orig, PlayerProgression self) { orig(self); string saveFileName = Custom.RootFolderDirectory() + CustomWorldMod.regionSavePath + $"CRsav_{self.rainWorld.options.saveSlot + 1}.txt"; CustomWorldMod.Log($"Clearing CR save (data path [{saveFileName}])"); if (File.Exists(saveFileName)) { File.Delete(saveFileName); try { CustomWorldMod.packInfoInSaveSlot[self.rainWorld.options.saveSlot].Clear(); } catch (Exception) { } CustomWorldMod.Log("Deleted CR save"); CustomWorldMod.ReadSaveAnalyzerFiles(); CustomWorldMod.AnalyzeSave(); } }
internal static void PlayerProgression_WipeAll(On.PlayerProgression.orig_WipeAll orig, PlayerProgression self) { WipeOIsProgression(-1); orig(self); }