using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("MoreAutosaves")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("MoreAutosaves")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8a0fada3-3f30-4c58-a951-fe7e1d140341")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")] [assembly: AssemblyVersion("1.0.0.0")] namespace MoreAutosaves; [BepInPlugin("Trotyl.MoreAutosaves", "MoreAutosaves", "0.0.0.1")] [BepInProcess("valheim.exe")] public class MoreAutosaves : BaseUnityPlugin { [HarmonyPatch(typeof(Game), "Start")] private class AutosavePatches { [HarmonyPrefix] private static void setAutosavePatch(ref float ___m_saveInterval, ref bool ___isModded) { ___m_saveInterval = 180f; ___isModded = true; } } private const string modGUID = "Trotyl.MoreAutosaves"; private const string modName = "MoreAutosaves"; private const string modVersion = "0.0.0.1"; private readonly Harmony harmony = new Harmony("Trotyl.MoreAutosaves"); private void Awake() { harmony.PatchAll(); } }