using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("SaveBeforeLand")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("MelanieMelicious")] [assembly: AssemblyProduct("Save Before Landing")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal class HarmonyPatches { [HarmonyPrefix] [HarmonyPatch(typeof(StartMatchLever), "LeverAnimation")] private static void SaveBeforeLand() { GameNetworkManager.Instance.SaveGame(); } } [BepInPlugin("MelanieMelicious.SaveBeforeLand", "Melanie Melicious - Save Before Land", "1.0.0")] internal class Plugin : BaseUnityPlugin { private const string GUID = "MelanieMelicious.SaveBeforeLand"; private const string NAME = "Melanie Melicious - Save Before Land"; private const string VERSION = "1.0.0"; private readonly Harmony harmony = new Harmony("MelanieMelicious.SaveBeforeLand"); internal static ManualLogSource mls; private void Awake() { mls = Logger.CreateLogSource("2 sToRy ShiP"); mls = ((BaseUnityPlugin)this).Logger; harmony.PatchAll(typeof(HarmonyPatches)); } }