Some mods target the Mono version of the game, which is available by opting into the Steam beta branch "alternate"
Decompiled source of LongerDays Il2cpp v1.11.0
longerdays.dll
Decompiled 10 months agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Il2CppScheduleOne.GameTime; using MelonLoader; using MelonLoader.Preferences; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: MelonInfo(typeof(LongerDaysMod), "LongerDays", "1.11", "xVilho", null)] [assembly: MelonColor(255, 200, 150, 255)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("longerdays")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+d7007bd0163ada4000dd1eb63453fb0c3c284587")] [assembly: AssemblyProduct("longerdays")] [assembly: AssemblyTitle("longerdays")] [assembly: AssemblyVersion("1.0.0.0")] public class LongerDaysMod : MelonMod { [CompilerGenerated] private sealed class <FindTimeManagerLoop>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LongerDaysMod <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FindTimeManagerLoop>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown int num = <>1__state; LongerDaysMod longerDaysMod = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } if (!longerDaysMod.initialized) { if (longerDaysMod.cfgMultiplier == null) { Log("❌ cfgMultiplier is null — config was not initialized?"); return false; } TimeManager val = Object.FindObjectOfType<TimeManager>(); if ((Object)(object)val != (Object)null) { float num3 = (val.TimeProgressionMultiplier = Mathf.Clamp(longerDaysMod.cfgMultiplier.Value, 0.1f, 2f)); Log($"⏳ Time slowed down to {num3:0.##}x ({num3 * 100f:0.#}% of normal speed)."); longerDaysMod.initialized = true; return false; } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 2; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private MelonPreferences_Category cfgCategory; private MelonPreferences_Entry<float> cfgMultiplier; private static Instance Logger; private bool initialized; public override void OnInitializeMelon() { Logger = ((MelonBase)this).LoggerInstance; cfgCategory = MelonPreferences.CreateCategory("LongerDays", "Longer Days Mod Settings"); cfgMultiplier = cfgCategory.CreateEntry<float>("TimeMultiplier", 0.5f, "Time Speed Multiplier", "Controls how fast in-game time passes.\n1.0 = normal speed (100%), 0.5 = 50% (slower), 2.0 = 200% (faster).\nAllowed range: 0.1 (very slow) to 2.0 (very fast).", false, false, (ValueValidator)null, (string)null); } public override void OnSceneWasInitialized(int buildIndex, string sceneName) { if (sceneName == "Menu") { initialized = false; Log("\ud83d\udd01 Scene 'menu' loaded — reset mod state."); } if (sceneName == "Main") { Log("\ud83e\udde9 Scene 'main' initialized. Will begin checking for TimeManager every 2s..."); MelonCoroutines.Start(FindTimeManagerLoop()); } } [IteratorStateMachine(typeof(<FindTimeManagerLoop>d__6))] private IEnumerator FindTimeManagerLoop() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FindTimeManagerLoop>d__6(0) { <>4__this = this }; } private static void Log(string msg) { Logger.Msg(msg ?? ""); } }