From c727cc39833e5f24cebb6b36a50b4785c81026ba Mon Sep 17 00:00:00 2001 From: ajkroeg <50463892+ajkroeg@users.noreply.github.com> Date: Sun, 19 Feb 2023 09:16:32 -0500 Subject: [PATCH] disable story/restoration combat autosave --- IRTweaks/IRTweaks/Modules/UI/CombatSaves.cs | 13 +++++++++++++ IRTweaks/IRTweaks/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/IRTweaks/IRTweaks/Modules/UI/CombatSaves.cs b/IRTweaks/IRTweaks/Modules/UI/CombatSaves.cs index 0e3e148..1fc2cd6 100644 --- a/IRTweaks/IRTweaks/Modules/UI/CombatSaves.cs +++ b/IRTweaks/IRTweaks/Modules/UI/CombatSaves.cs @@ -80,5 +80,18 @@ static bool Prefix(SimGameOptionsMenu __instance, Action quitAction) } } + [HarmonyPatch(typeof(CombatGameState), "TriggerAutoSaving")] + static class CombatGameState_TriggerAutoSaving + { + static bool Prepare() => Mod.Config.Fixes.DisableCombatSaves; + static void Prefix(CombatGameState __instance) + { + if (__instance.NeedsStoryMissionStartSave) + { + __instance.NeedsStoryMissionStartSave = false; + Mod.Log.Info?.Write("[CombatGameState_TriggerAutoSaving] Skipping combat autosave."); + } + } + } } diff --git a/IRTweaks/IRTweaks/Properties/AssemblyInfo.cs b/IRTweaks/IRTweaks/Properties/AssemblyInfo.cs index 5377b9b..30772b8 100644 --- a/IRTweaks/IRTweaks/Properties/AssemblyInfo.cs +++ b/IRTweaks/IRTweaks/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.8.2")] -[assembly: AssemblyFileVersion("0.9.8.2")] +[assembly: AssemblyVersion("0.9.8.3")] +[assembly: AssemblyFileVersion("0.9.8.3")]