Some mods target the Mono version of the game, which is available by opting into the Steam beta branch "alternate"
Decompiled source of SeneekiMod v1.2.1
Mods/SeneekiMod.dll
Decompiled 4 months agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using System.Threading.Tasks; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppScheduleOne.Combat; using Il2CppScheduleOne.DevUtilities; using Il2CppScheduleOne.Economy; using Il2CppScheduleOne.Employees; using Il2CppScheduleOne.ItemFramework; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.NPCs; using Il2CppScheduleOne.PlayerScripts; using Il2CppScheduleOne.Property; using Il2CppScheduleOne.UI; using Il2CppScheduleOne.UI.ATM; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using MelonLoader; using MelonLoader.Preferences; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using SeneekiMod; using SeneekiMod.ATMUnlimited; using SeneekiMod.Cheats; using SeneekiMod.Enhancements; using SeneekiMod.Utils; using UnityEngine; [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: CompilationRelaxations(8)] [assembly: MelonInfo(typeof(MainMod), "SeneekiMod", "1.2.0", "Seneeki", null)] [assembly: MelonColor(128, 230, 136, 14)] [assembly: MelonGame("TVGS", "Schedule I")] [assembly: AssemblyCopyright("Copyright © 2025 Seneeki™\ufe0f")] [assembly: AssemblyMetadata("License", "GPL-3.0-or-later")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("SeneekiMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SeneekiMod")] [assembly: AssemblyTitle("SeneekiMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace SeneekiMod { internal class MainMod : MelonMod { public override void OnInitializeMelon() { Loggos.Header("═════════════════════════════════════════════════════════════════════════"); Loggos.Footer(" SeneekiMod - Begin Initialization"); ModPreferences.Init(); Loggos.Footer(" SeneekiMod - Initialization Complete"); Loggos.Footer("═════════════════════════════════════════════════════════════════════════"); } public override void OnUpdate() { ModPreferences.OnUpdate(); EmployeeMove.Init(); } public override void OnLateUpdate() { ModPreferences.OnLateUpdate(); try { AddMoney.GiveDirtyMoney(); } catch (Exception value) { Loggos.Error($"[Dirty Money] Failed to give really dirty money: {value}"); } } } } namespace SeneekiMod.Utils { internal static class Loggos { private static readonly HashSet<string> info = new HashSet<string>(); private static readonly HashSet<string> success = new HashSet<string>(); private static readonly HashSet<string> warn = new HashSet<string>(); private static readonly HashSet<string> error = new HashSet<string>(); private static readonly HashSet<string> unique = new HashSet<string>(); private static readonly HashSet<string> header = new HashSet<string>(); private static readonly HashSet<string> footer = new HashSet<string>(); private static readonly HashSet<string> debug = new HashSet<string>(); internal static void Info(string msg) { Once(info, Color.FromArgb(64, 117, 230, 147), msg); } internal static void Success(string msg) { Once(success, Color.FromArgb(255, 29, 168, 84), msg); } internal static void Warn(string msg) { Once(warn, Color.FromArgb(128, 221, 237, 71), msg); } internal static void Error(string msg) { Once(error, Color.FromArgb(128, 178, 34, 34), msg); } internal static void Unique(string msg) { Once(unique, Color.FromArgb(128, 43, 156, 245), msg); } internal static void Header(string msg) { Once(header, Color.FromArgb(0, 245, 133, 59), msg); } internal static void Footer(string msg) { Once(footer, Color.FromArgb(255, 245, 133, 59), msg); } internal static void Debug(string msg) { Once(debug, Color.FromArgb(0, 28, 102, 237), msg); } private static void Once(HashSet<string> store, object colour, string msg, double delay = 1.0) { if (msg == null) { return; } lock (store) { if (!store.Add(msg)) { return; } } if (colour is ConsoleColor consoleColor) { MelonLogger.Msg(consoleColor, msg); } else if (colour is Color color) { MelonLogger.Msg(color, msg); } else { MelonLogger.Msg(msg); } YeetLater(store, msg, delay); } internal static async Task YeetLater(HashSet<string> store, string msg, double sec) { await Task.Delay(TimeSpan.FromSeconds(sec)); lock (store) { store.Remove(msg); } } internal static void WipeItClean() { info.Clear(); success.Clear(); warn.Clear(); error.Clear(); unique.Clear(); header.Clear(); footer.Clear(); } } public static class ModPreferences { private static bool pressedAlready; internal static MelonPreferences_Category? SKFinancial { get; private set; } internal static MelonPreferences_Category? SKCheatMenu { get; private set; } internal static MelonPreferences_Category? SKQoL { get; private set; } internal static MelonPreferences_Entry<bool>? ATMUnlimitedEnabled { get; private set; } internal static MelonPreferences_Entry<bool>? LaunderingPlusEnabled { get; private set; } internal static MelonPreferences_Entry<int>? LaunderTimeHours { get; private set; } internal static MelonPreferences_Entry<float>? WeeklyDeposit { get; private set; } internal static MelonPreferences_Entry<int>? DupeMultiplier { get; private set; } internal static MelonPreferences_Entry<bool>? DupeEnabled { get; private set; } internal static MelonPreferences_Entry<bool>? RespectStackLimit { get; private set; } internal static MelonPreferences_Entry<float>? ReallyDirtyMoney { get; private set; } internal static MelonPreferences_Entry<bool>? UnlockPocketsEnabled { get; private set; } internal static MelonPreferences_Entry<bool>? DealPatchEnabled { get; private set; } internal static MelonPreferences_Entry<int>? CustomDealCooldownMinutes { get; private set; } internal static MelonPreferences_Entry<bool>? MoreMixNamesEnabled { get; private set; } internal static MelonPreferences_Entry<bool>? NSFWMixNamesEnabled { get; private set; } internal static void Init() { try { SKFinancial = MelonPreferences.CreateCategory("SeneekiMod:_Financial_Mods", "SeneekiMod: Financial Mods"); SKCheatMenu = MelonPreferences.CreateCategory("SeneekiMod:_Cheat_Menu", "SeneekiMod: Cheat Menu"); SKQoL = MelonPreferences.CreateCategory("SeneekiMod:_QoL", "SeneekiMod: Quality of Life"); ATMUnlimitedEnabled = SKFinancial.CreateEntry<bool>("ATMUnlimited", false, "ATM Unlimited", "If enabled, disables ATM deposit limits.", false, false, (ValueValidator)null, (string)null); LaunderingPlusEnabled = SKFinancial.CreateEntry<bool>("EnableLaunderingPlus", true, "Enable Laundering Plus", "Removes laundering caps.", false, false, (ValueValidator)null, (string)null); LaunderTimeHours = SKFinancial.CreateEntry<int>("LaunderTimeHours", 12, "Launder Time (Hours)", "How long laundering takes per entry.", false, false, (ValueValidator)null, (string)null); DupeEnabled = SKCheatMenu.CreateEntry<bool>("DupeEnabled", true, "Enable Dupe Cheat", "Toggles the item dupe cheat on or off.", false, false, (ValueValidator)null, (string)null); RespectStackLimit = SKCheatMenu.CreateEntry<bool>("RespectStackLimit", true, "Respect Stack Limit", "If disabled, duplicating will raise the stack limit to match the duplicated quantity.", false, false, (ValueValidator)null, (string)null); DupeMultiplier = SKCheatMenu.CreateEntry<int>("DupeMultiplier", 2, "Duplication Multiplier", "The multiplier for the amount of items you get when duplicating. Default is 2.", false, false, (ValueValidator)null, (string)null); ReallyDirtyMoney = SKCheatMenu.CreateEntry<float>("ReallyDirtyMoney", 1000f, "Really Dirty Money", "The amount of money you can conjure at once. Default is 1,000.", false, false, (ValueValidator)null, (string)null); UnlockPocketsEnabled = SKCheatMenu.CreateEntry<bool>("UnlockPocketsEnabled", true, "Unlock Pockets", "If enabled, you can unlock all pockets in the game.", false, false, (ValueValidator)null, (string)null); DealPatchEnabled = SKQoL.CreateEntry<bool>("DealPatchEnabled", true, "Enable Deal Patch", "If enabled, deal timer is ignored.", false, false, (ValueValidator)null, (string)null); CustomDealCooldownMinutes = SKQoL.CreateEntry<int>("CustomDealCooldownMinutes", 60, "Customer Deal Cooldown (minutes)", "Sets a custom cooldown in minutes for customer deals. Default is 60 mins (1 hour).", false, false, (ValueValidator)null, (string)null); MoreMixNamesEnabled = SKQoL.CreateEntry<bool>("EnableMoreMixNames", false, "Enable More Mix Names", "Adds additional random mix name options when creating a new product.", false, false, (ValueValidator)null, (string)null); NSFWMixNamesEnabled = SKQoL.CreateEntry<bool>("EnableNSFWMixNames", false, "Enable NSFW Mix Names", "Includes inappropriate/explicit terms when generating mix names. Disable for clean mode.", false, false, (ValueValidator)null, (string)null); LogCurrentState(); } catch (Exception value) { Loggos.Error($"[ModPreferences] Failed to initialize preferences: {value}"); } } internal static void LogCurrentState() { bool flag = ATMUnlimitedEnabled?.Value ?? false; bool flag2 = LaunderingPlusEnabled?.Value ?? false; bool flag3 = DupeEnabled?.Value ?? false; bool flag4 = UnlockPocketsEnabled?.Value ?? false; bool flag5 = MoreMixNamesEnabled?.Value ?? false; bool flag6 = NSFWMixNamesEnabled?.Value ?? false; Loggos.Unique("[ATMUnlimited] ATM weekly deposit limit override is now " + (flag ? "enabled" : "disabled") + "."); Loggos.Unique("[Laundering Plus] Laundering Plus is now " + (flag2 ? "enabled" : "disabled") + "."); Loggos.Unique("[Duplicator] Duplication cheat is now " + (flag3 ? "enabled" : "disabled") + "."); Loggos.Unique($"[Dirty Money] Dirty Money is set to ${ReallyDirtyMoney?.Value:N0}."); MelonPreferences_Entry<bool>? dealPatchEnabled = DealPatchEnabled; Loggos.Unique("[More Deals] More Deals is now " + ((dealPatchEnabled != null && dealPatchEnabled.Value) ? "enabled" : "disabled") + "."); Loggos.Unique("[MixNames] Extra Mix Names are " + (flag5 ? "enabled" : "disabled") + "."); Loggos.Unique("[MixNames] NSFW Mix Names are " + (flag6 ? "enabled" : "disabled") + "."); Loggos.Unique("[Pickpocket] Easy Pickpocketing is " + (flag4 ? "enabled" : "disabled") + "."); } internal static void OnUpdate() { bool flag = Input.GetKey((KeyCode)306) && Input.GetKey((KeyCode)285); if (flag && !pressedAlready) { pressedAlready = true; MelonPreferences.Load(); try { SKATM.ApplyOverrides(forceLog: true); } catch (Exception value) { Loggos.Error($"[ModPreferences] Failed to apply overrides: {value}"); } LogCurrentState(); } else if (!flag) { pressedAlready = false; } } internal static void OnLateUpdate() { MelonPreferences_Entry<bool>? dupeEnabled = DupeEnabled; if (dupeEnabled != null && dupeEnabled.Value) { try { Dupe.Update(); } catch (Exception value) { Loggos.Error($"[ModPreferences] Failed to update dupe: {value}"); } } } } internal static class SKNotify { internal static void ShowNotification(string? message = null, string? imageFile = "icon.png") { NotificationsManager instance = Singleton<NotificationsManager>.Instance; if ((Object)(object)instance == (Object)null) { Loggos.Warn("[SKNotify] NotificationsManager instance not found."); return; } SeneekiPaths.EnsureDirectory(); string path = SeneekiPaths.GetPath(imageFile); string text = "Seneeki LLC"; string text2 = message ?? $"Payment Received: ${ModPreferences.ReallyDirtyMoney?.Value:N0}."; Sprite val = LoadSprite(path); if ((Object)(object)val == (Object)null) { Loggos.Warn("[SKNotify] Sprite load failed — using no icon."); } instance.SendNotification(text, text2, val, 5f, true); } private static Sprite? LoadSprite(string iconPath) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (!File.Exists(iconPath)) { Loggos.Warn("[SKNotify] Icon not found at path: " + iconPath); return null; } try { byte[] array = File.ReadAllBytes(iconPath); Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); if (!ImageConversion.LoadImage(val, Il2CppStructArray<byte>.op_Implicit(array))) { Loggos.Warn("[SKNotify] Failed to load image data into texture."); return null; } ((Texture)val).filterMode = (FilterMode)0; return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); } catch (Exception value) { Loggos.Error($"[SKNotify] Exception while loading sprite: {value}"); return null; } } } internal static class SKMoney { internal static MoneyManager SKmoneyManager => Object.FindObjectOfType<MoneyManager>(); internal static void DepositCash(int amount) { if (!((Object)(object)SKmoneyManager == (Object)null) && amount > 0 && !(SKmoneyManager.cashInstance.Balance < (float)amount)) { CashInstance cashInstance = SKmoneyManager.cashInstance; cashInstance.Balance -= (float)amount; MoneyManager sKmoneyManager = SKmoneyManager; sKmoneyManager.onlineBalance += (float)amount; } } internal static void WithdrawCash(int amount) { if (!((Object)(object)SKmoneyManager == (Object)null) && amount > 0 && !(SKmoneyManager.onlineBalance < (float)amount)) { MoneyManager sKmoneyManager = SKmoneyManager; sKmoneyManager.onlineBalance -= (float)amount; CashInstance cashInstance = SKmoneyManager.cashInstance; cashInstance.Balance += (float)amount; } } internal static void DepositAllCash() { if (!((Object)(object)SKmoneyManager == (Object)null) && !(SKmoneyManager.cashInstance.Balance <= 0f)) { MoneyManager sKmoneyManager = SKmoneyManager; sKmoneyManager.onlineBalance += SKmoneyManager.cashInstance.Balance; SKmoneyManager.cashInstance.Balance = 0f; } } } internal static class ATMManager { [HarmonyPatch(typeof(ATM), "DropCash")] internal class ATMDropCashPatch { [CompilerGenerated] private sealed class <Transpiler>d__0 : IEnumerable<CodeInstruction>, IEnumerable, IEnumerator<CodeInstruction>, IEnumerator, IDisposable { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; private IEnumerable<CodeInstruction> instructions; public IEnumerable<CodeInstruction> <>3__instructions; private IEnumerator<CodeInstruction> <>7__wrap1; CodeInstruction IEnumerator<CodeInstruction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Transpiler>d__0(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 2u) { try { } finally { <>m__Finally1(); } } <>7__wrap1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>7__wrap1 = instructions.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; break; case 2: <>1__state = -3; break; case 3: <>1__state = -3; break; } if (<>7__wrap1.MoveNext()) { CodeInstruction current = <>7__wrap1.Current; if (current.opcode == OpCodes.Ldc_I4_2) { <>2__current = new CodeInstruction(OpCodes.Ldc_I4, (object)200); <>1__state = 1; return true; } if (current.opcode == OpCodes.Ldc_I4_8) { <>2__current = new CodeInstruction(OpCodes.Ldc_I4, (object)500); <>1__state = 2; return true; } <>2__current = current; <>1__state = 3; return true; } <>m__Finally1(); <>7__wrap1 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>7__wrap1 != null) { <>7__wrap1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<CodeInstruction> IEnumerable<CodeInstruction>.GetEnumerator() { <Transpiler>d__0 <Transpiler>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Transpiler>d__ = this; } else { <Transpiler>d__ = new <Transpiler>d__0(0); } <Transpiler>d__.instructions = <>3__instructions; return <Transpiler>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<CodeInstruction>)this).GetEnumerator(); } } [IteratorStateMachine(typeof(<Transpiler>d__0))] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Transpiler>d__0(-2) { <>3__instructions = instructions }; } } private static ATM SKatmManager => Object.FindObjectOfType<ATM>(); internal static float WeeklyDepositSum { get { return ATM.WeeklyDepositSum; } set { ATM.WeeklyDepositSum = value; } } } internal static class SKLaunderer { internal static void RemoveLaunderingCap(Business? business) { if ((Object)(object)business == (Object)null) { return; } try { business.LaunderCapacity = float.MaxValue; } catch (Exception value) { Loggos.Error($"[Laundering Plus] Failed to remove laundering cap: {value}"); } } internal static void ApplyCustomLaunderTime(LaunderingOperation? op) { if (op == null) { return; } try { float num = ((float?)ModPreferences.LaunderTimeHours?.Value) ?? 24f; op.completionTime_Minutes = Mathf.CeilToInt(num * 60f); } catch (Exception value) { Loggos.Error($"[Laundering Plus] Failed to apply custom launder time: {value}"); } } } internal static class SeneekiPaths { public static readonly string UserDataRoot = Path.Combine(MelonEnvironment.UserDataDirectory, "SeneekiMod"); public static string GetPath(string filename) { Loggos.Debug("[SeneekiPaths] Path: " + filename); Loggos.Debug("[SeneekiPaths] Path: " + UserDataRoot); return Path.Combine(UserDataRoot, filename); } internal static void EnsureDirectory() { if (!Directory.Exists(UserDataRoot)) { try { Directory.CreateDirectory(UserDataRoot); Loggos.Debug("[SeneekiPaths] Created directory: " + UserDataRoot); } catch (Exception value) { Loggos.Error($"[SeneekiPaths] Failed to create directory: {value}"); } } } } internal class Fields { internal static void AddIntField(string label, MelonPreferences_Entry<int>? entry, ref float y) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (entry != null) { GUI.Label(new Rect(20f, y, 200f, 20f), label + ":"); if (int.TryParse(GUI.TextField(new Rect(180f, y, 60f, 20f), entry.Value.ToString()), out var result) && result != entry.Value) { entry.Value = result; ((MelonPreferences_Entry)entry).Save(); } y += 30f; } } internal static void AddFloatField(string label, MelonPreferences_Entry<float>? entry, ref float y) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (entry != null) { GUI.Label(new Rect(20f, y, 200f, 20f), label + ":"); if (float.TryParse(GUI.TextField(new Rect(180f, y, 60f, 20f), entry.Value.ToString("0.##")), out var result) && result != entry.Value) { entry.Value = result; ((MelonPreferences_Entry)entry).Save(); } y += 30f; } } } } namespace SeneekiMod.Laundering { [HarmonyPatch(typeof(LaunderingInterface))] internal static class LaunderingPlus { [HarmonyPatch("Initialize")] [HarmonyPostfix] public static void Postfix_Initialize(Business bus) { MelonPreferences_Entry<bool>? launderingPlusEnabled = ModPreferences.LaunderingPlusEnabled; if (launderingPlusEnabled != null && launderingPlusEnabled.Value) { SKLaunderer.RemoveLaunderingCap(bus); } } [HarmonyPatch("CreateEntry")] [HarmonyPostfix] public static void Postfix_CreateEntry(LaunderingOperation op) { MelonPreferences_Entry<bool>? launderingPlusEnabled = ModPreferences.LaunderingPlusEnabled; if (launderingPlusEnabled != null && launderingPlusEnabled.Value) { SKLaunderer.RemoveLaunderingCap((op != null) ? op.business : null); SKLaunderer.ApplyCustomLaunderTime(op); } } } } namespace SeneekiMod.Enhancements { public static class EmployeeMove { [CompilerGenerated] private sealed class <RagdollPunch>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Employee emp; public int id; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RagdollPunch>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; Impact val = new Impact { HitPoint = ((Component)emp).transform.position + Vector3.up, ImpactForceDirection = Vector3.down, ImpactForce = 150f, ImpactDamage = 0f, ImpactType = (EImpactType)0, ImpactID = Random.Range(1, 9999), ImpactSource = null }; ((NPC)emp).ReceiveImpact(val); ((NPC)emp).ProcessImpactForce(val.HitPoint, val.ImpactForceDirection, 50f); ragdolled.Add(id); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; } case 1: <>1__state = -1; ragdolled.Remove(id); 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 static readonly List<Employee> trackedEmployees = new List<Employee>(); private static readonly HashSet<int> ragdolled = new HashSet<int>(); private static float nextCheckTime = 0f; public static void Init() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown ((MelonEventBase<LemonAction>)(object)MelonEvents.OnUpdate).Subscribe(new LemonAction(OnUpdate), 0, false); } public static void TrackEmployee(Employee emp) { if ((Object)(object)emp != (Object)null && !trackedEmployees.Contains(emp)) { trackedEmployees.Add(emp); } } private static void OnUpdate() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (!Input.GetKeyDown((KeyCode)114) || !Input.GetKey((KeyCode)306) || Time.time < nextCheckTime) { return; } nextCheckTime = Time.time + 0.2f; Player local = Player.Local; if ((Object)(object)local == (Object)null) { return; } foreach (Employee trackedEmployee in trackedEmployees) { if (!((Object)(object)trackedEmployee == (Object)null) && ((Component)trackedEmployee).gameObject.activeInHierarchy) { int instanceID = ((Object)((Component)trackedEmployee).gameObject).GetInstanceID(); if (!ragdolled.Contains(instanceID) && !(Vector3.Distance(((Component)trackedEmployee).transform.position, ((Component)local).transform.position) > 6f)) { MelonCoroutines.Start(RagdollPunch(trackedEmployee, instanceID)); } } } } [IteratorStateMachine(typeof(<RagdollPunch>d__6))] private static IEnumerator RagdollPunch(Employee emp, int id) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <RagdollPunch>d__6(0) { emp = emp, id = id }; } } [HarmonyPatch(typeof(Employee), "Awake")] public static class EmployeeAwakePatch { public static void Postfix(Employee __instance) { try { EmployeeMove.TrackEmployee(__instance); } catch { } } } [HarmonyPatch(typeof(Employee), "Start")] public static class EmployeeStartPatch { public static void Postfix(Employee __instance) { try { EmployeeMove.TrackEmployee(__instance); } catch { } } } [HarmonyPatch(typeof(Object), "Instantiate", new Type[] { typeof(Object) })] public static class InstantiatePatch { public static void Postfix(Object __result) { try { GameObject val = (GameObject)(object)((__result is GameObject) ? __result : null); if (!((Object)(object)val == (Object)null)) { Employee component = val.GetComponent<Employee>(); if ((Object)(object)component != (Object)null) { EmployeeMove.TrackEmployee(component); } } } catch { } } } internal class FastDeal { [HarmonyPatch(typeof(Customer), "OfferDealValid")] internal static class CustomDealCooldownPatch { [HarmonyPrefix] internal static bool Prefix(Customer __instance, ref string invalidReason, ref bool __result) { int? num = ModPreferences.CustomDealCooldownMinutes?.Value; if (!num.HasValue || num <= 0) { return true; } int value = num.Value; if (__instance.TimeSinceLastDealCompleted < value || __instance.TimeSinceLastDealOffered < value || __instance.TimeSinceInstantDealOffered < value) { invalidReason = "Customer is already fuck-eyed. Let them rest."; __result = false; return false; } invalidReason = string.Empty; __result = true; return false; } } } internal class MixNames { [HarmonyPatch(typeof(NewMixScreen), "Open")] internal static class PrepareTemporaryNames { [HarmonyPostfix] private static void Postfix(NewMixScreen __instance) { MelonPreferences_Entry<bool>? moreMixNamesEnabled = ModPreferences.MoreMixNamesEnabled; if (moreMixNamesEnabled == null || !moreMixNamesEnabled.Value) { return; } LoadNameData(); tempName1.Clear(); tempName2.Clear(); if (__instance.name1Library != null) { tempName1.AddRange((IEnumerable<string>)__instance.name1Library.ToArray()); } if (__instance.name2Library != null) { tempName2.AddRange((IEnumerable<string>)__instance.name2Library.ToArray()); } tempName1.AddRange(name1Clean); tempName2.AddRange(name2Clean); for (int i = 0; i < 3; i++) { tempName1.Add("MILF"); } for (int j = 0; j < 5; j++) { tempName2.Add("Girl Scout"); } MelonPreferences_Entry<bool>? nSFWMixNamesEnabled = ModPreferences.NSFWMixNamesEnabled; if (nSFWMixNamesEnabled != null && nSFWMixNamesEnabled.Value) { tempName1.AddRange(name1NSFW); tempName2.AddRange(name2NSFW); } try { if (!((Object)(object)__instance.mixAlreadyExistsText != (Object)null)) { return; } int value = 0; while (value++ < 10) { __instance.RandomizeButtonClicked(); if (!__instance.mixAlreadyExistsText.activeSelf) { Loggos.Debug($"[MixNames] Unique name accepted after {value} rerolls."); break; } } if (__instance.mixAlreadyExistsText.activeSelf) { Loggos.Warn("[MixNames] All generated names were duplicates after 10 tries."); } } catch (Exception value2) { Loggos.Error($"[MixNames] Error rerolling name: {value2}"); } } } [HarmonyPatch(typeof(NewMixScreen), "GenerateUniqueName")] internal static class MixNameOverride { [HarmonyPostfix] private static void Postfix(ref string __result) { MelonPreferences_Entry<bool>? moreMixNamesEnabled = ModPreferences.MoreMixNamesEnabled; if (moreMixNamesEnabled == null || !moreMixNamesEnabled.Value) { return; } string randomSafe = GetRandomSafe(tempName1); string randomSafe2 = GetRandomSafe(tempName2); if (randomSafe == "Rusty" && randomSafe2 == "Trombone") { Loggos.Debug("[MixNames] Rusty Trombone detected — skipping third name."); __result = FormatName(randomSafe, randomSafe2); return; } string third = null; if (Random.value < 0.3f) { List<string> list = new List<string>(name3Clean); MelonPreferences_Entry<bool>? nSFWMixNamesEnabled = ModPreferences.NSFWMixNamesEnabled; if (nSFWMixNamesEnabled != null && nSFWMixNamesEnabled.Value) { list.AddRange(name3NSFW); } third = TryGetThirdName(randomSafe, randomSafe2, list); } __result = SanitizeNameParts(randomSafe, randomSafe2, third); } } private static readonly List<string> name1Clean = new List<string>(); private static readonly List<string> name1NSFW = new List<string>(); private static readonly List<string> name2Clean = new List<string>(); private static readonly List<string> name2NSFW = new List<string>(); private static readonly List<string> name3Clean = new List<string>(); private static readonly List<string> name3NSFW = new List<string>(); private static readonly List<string> tempName1 = new List<string>(); private static readonly List<string> tempName2 = new List<string>(); private static readonly TextInfo TextInfo = CultureInfo.InvariantCulture.TextInfo; private static void LoadNameData() { name1Clean.Clear(); name1NSFW.Clear(); name2Clean.Clear(); name2NSFW.Clear(); name3Clean.Clear(); name3NSFW.Clear(); string path = SeneekiPaths.GetPath("names.json"); if (!File.Exists(path)) { Loggos.Warn("[MixNames] names.json not found."); return; } try { foreach (Match item in Regex.Matches(File.ReadAllText(path), "\"(\\w+)\"\\s*:\\s*\\[(.*?)\\]", RegexOptions.Singleline)) { string value = item.Groups[1].Value; List<string> collection = (from Match m in Regex.Matches(item.Groups[2].Value, "\"(.*?)\"") select m.Groups[1].Value.Trim()).ToList(); switch (value) { case "name1Clean": name1Clean.AddRange(collection); break; case "name1NSFW": name1NSFW.AddRange(collection); break; case "name2Clean": name2Clean.AddRange(collection); break; case "name2NSFW": name2NSFW.AddRange(collection); break; case "name3Clean": name3Clean.AddRange(collection); break; case "name3NSFW": name3NSFW.AddRange(collection); break; } } Loggos.Debug("[MixNames] Loaded name lists from JSON manually."); } catch (Exception value2) { Loggos.Error($"[MixNames] Failed to load names.json: {value2}"); } } private static string GetRandomSafe(List<string> list) { if (list.Count <= 0) { return "Error"; } return list[Random.Range(0, list.Count)]; } private static string TryGetThirdName(string first, string second, List<string> pool) { for (int i = 0; i < 3; i++) { string text = pool[Random.Range(0, pool.Count)]; if (text != first && text != second) { return text; } } return "Error"; } private static string SanitizeNameParts(string first, string second, string? third = null) { string[] array = (from w in new string[3] { first, second, third ?? "" }.SelectMany((string w) => w.Split(' ')) select w.Trim().ToLowerInvariant()).ToArray(); string[] group2 = new string[5] { "dick", "cock", "dick punch", "dong", "balls" }; string[] group3 = new string[10] { "cunt", "cunt cheese", "piss flaps", "pussy", "pussy lips", "flaps", "panties", "milf", "girl scout", "cooch" }; for (int i = 0; i < array.Length - 1; i++) { if (array[i] == array[i + 1]) { array[i + 1] = ""; } } string[][] array2 = new string[2][] { group2, group3 }; foreach (string[] group in array2) { List<string> list = array.Where((string p) => group.Contains(p)).ToList(); if (list.Count > 1) { for (int k = 1; k < list.Count; k++) { array[Array.IndexOf(array, list[k])] = ""; } } } bool num = array.Any((string p) => group2.Contains(p)); bool flag = array.Any((string p) => group3.Contains(p)); if (num && flag) { List<string> list2 = new List<string>(name3Clean); MelonPreferences_Entry<bool>? nSFWMixNamesEnabled = ModPreferences.NSFWMixNamesEnabled; if (nSFWMixNamesEnabled != null && nSFWMixNamesEnabled.Value) { list2.AddRange(name3NSFW); } int num2 = array.Length - 1; while (num2 >= 2) { string text; if (!string.IsNullOrWhiteSpace(array[num2])) { int num3 = 0; while (num3 < 2) { text = list2[Random.Range(0, list2.Count)]; if (group2.Contains(text.ToLower()) || group3.Contains(text.ToLower()) || array.Contains(text.ToLower())) { num3++; continue; } goto IL_027d; } Loggos.Debug("[MixNames] Group conflict unresolved. Removed third word."); array[num2] = ""; } num2--; continue; IL_027d: array[num2] = text.ToLowerInvariant(); Loggos.Debug("[MixNames] Group conflict replaced with '" + text + "'"); break; } } return CapEach(string.Join(" ", array.Where((string p) => !string.IsNullOrWhiteSpace(p)))); } private static string FormatName(string first, string second) { return CapEach(first) + " " + CapEach(second); } private static string CapEach(string input) { return string.Join(" ", (from s in input.Split(' ') where !string.IsNullOrWhiteSpace(s) select s).Select(delegate(string p) { p = p.Trim(); return p.Equals("milf", StringComparison.InvariantCultureIgnoreCase) ? "MILF" : (p.Length switch { 0 => "", 1 => p.ToUpperInvariant(), 2 => p.ToUpperInvariant(), _ => char.ToUpperInvariant(p[0]) + p.Substring(1).ToLowerInvariant(), }); })); } } } namespace SeneekiMod.Cheats { internal static class AddMoney { private static bool greedyBeggar; internal static void GiveDirtyMoney() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) bool flag = Input.GetKey((KeyCode)306) && (Input.GetKey((KeyCode)270) || Input.GetKey((KeyCode)43) || Input.GetKey((KeyCode)61)); bool flag2 = Input.GetKey((KeyCode)306) && (Input.GetKey((KeyCode)45) || Input.GetKey((KeyCode)269)); if (flag && !greedyBeggar) { greedyBeggar = true; try { int num = Mathf.RoundToInt(ModPreferences.ReallyDirtyMoney.Value); NetworkSingleton<MoneyManager>.Instance.ChangeCashBalance((float)num, true, true); return; } catch (Exception value) { Loggos.Error($"[Dirty Money] Failed to add dirty money: {value}"); return; } } if (flag2 && !greedyBeggar) { greedyBeggar = true; try { int num2 = Mathf.RoundToInt(ModPreferences.ReallyDirtyMoney.Value); NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("Totally Legit Cash", (float)num2, 1f, "Courtesy of Seneeki LLC"); new _ShowOnlineBalanceChange_d__55(0); NetworkSingleton<MoneyManager>.Instance.CashSound.Play(); SKNotify.ShowNotification(); return; } catch (Exception value2) { Loggos.Error($"[Dirty Money] Failed to give dirty online money: {value2}"); return; } } if (!flag && !flag2) { greedyBeggar = false; } } } internal static class Dupe { private static bool KP; internal static void Update() { if (ModPreferences.DupeEnabled.Value) { bool flag = Input.GetKey((KeyCode)308) && Input.GetKey((KeyCode)304) && Input.GetKey((KeyCode)306); if (flag && !KP) { KP = true; TryDuplicateEquippedItem(); } else if (!flag) { KP = false; } } } private static void TryDuplicateEquippedItem() { PlayerInventory instance = PlayerSingleton<PlayerInventory>.Instance; if (((instance != null) ? instance.hotbarSlots : null) == null) { return; } Enumerator<HotbarSlot> enumerator = instance.hotbarSlots.GetEnumerator(); while (enumerator.MoveNext()) { HotbarSlot current = enumerator.Current; if (current == null || !current.IsEquipped) { continue; } ItemInstance itemInstance = ((ItemSlot)current).ItemInstance; if (itemInstance == null) { break; } int quantity = itemInstance.Quantity; int num = quantity * ModPreferences.DupeMultiplier.Value; int num2 = 16384; if (num > num2) { num = num2; } Loggos.Info("[SeneekiMod]Item dupe capped at 16384"); if (num > itemInstance.StackLimit) { MelonPreferences_Entry<bool>? respectStackLimit = ModPreferences.RespectStackLimit; if (respectStackLimit != null && respectStackLimit.Value) { num = itemInstance.StackLimit; } else { try { ItemDefinition definition = itemInstance.Definition; if ((Object)(object)definition != (Object)null) { definition.StackLimit = num; Loggos.Debug($"[Duplicator] Increased stack limit to {num}"); } else { Loggos.Warn("[Duplicator] Item definition was null."); } } catch (Exception value) { Loggos.Error($"[Duplicator] Failed to raise stack limit: {value}"); } } } try { if (((object)itemInstance).GetType().GetMethod("SetQuantity", BindingFlags.Instance | BindingFlags.Public) != null) { itemInstance.SetQuantity(num); } else { itemInstance.Quantity = num; } Action onDataChanged = itemInstance.onDataChanged; if (onDataChanged != null) { onDataChanged.Invoke(); } instance.Reequip(); Loggos.Debug($"[Duplicator] Duplicated item from {quantity} to {num}"); break; } catch (Exception value2) { Loggos.Error($"[Duplicator] Failed to apply duplicated quantity: {value2}"); break; } } } } [HarmonyPatch(typeof(PickpocketScreen), "Update")] internal static class Pickpocket { private static readonly HashSet<PickpocketScreen> unlockedScreens = new HashSet<PickpocketScreen>(); private static void Postfix(PickpocketScreen __instance) { MelonPreferences_Entry<bool>? unlockPocketsEnabled = ModPreferences.UnlockPocketsEnabled; if ((unlockPocketsEnabled != null && !unlockPocketsEnabled.Value) || (Object)(object)__instance == (Object)null || __instance.Slots == null) { return; } if (!__instance.IsOpen || __instance.isSliding) { unlockedScreens.Remove(__instance); } else { if (unlockedScreens.Contains(__instance)) { return; } try { Il2CppArrayBase<ItemSlotUI> slots = (Il2CppArrayBase<ItemSlotUI>)(object)__instance.Slots; if (slots == null || slots.Count <= 0) { return; } for (int i = 0; i < slots.Count; i++) { if ((Object)(object)slots[i] != (Object)null) { __instance.SetSlotLocked(i, false); } } unlockedScreens.Add(__instance); } catch (Exception value) { Loggos.Error($"[Pickpocket] Failed unlocking slots: {value}"); } } } } [HarmonyPatch(typeof(PickpocketScreen), "Open")] internal static class PickpocketEasyMode { [HarmonyPostfix] private static void Postfix(PickpocketScreen __instance) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) MelonPreferences_Entry<bool>? unlockPocketsEnabled = ModPreferences.UnlockPocketsEnabled; if (unlockPocketsEnabled != null && !unlockPocketsEnabled.Value) { return; } try { Il2CppArrayBase<RectTransform> greenAreas = (Il2CppArrayBase<RectTransform>)(object)__instance.GreenAreas; if (greenAreas != null) { foreach (RectTransform item in greenAreas) { if ((Object)(object)item != (Object)null) { Vector2 sizeDelta = item.sizeDelta; sizeDelta.x = 160f; item.sizeDelta = sizeDelta; } } } __instance.GreenAreaMinWidth = 160f; __instance.GreenAreaMaxWidth = 160f; __instance.SlideTime *= 2.5f; __instance.SlideTimeMaxMultiplier = 1f; __instance.Tolerance *= 2f; } catch (Exception value) { Loggos.Error($"[Pickpocket] Failed to apply easy mode settings: {value}"); } } } } namespace SeneekiMod.ATMUnlimited { internal static class SKATM { [HarmonyPatch(typeof(ATM), "Enter")] internal static class Patch_ATM_Enter { [HarmonyPostfix] private static void Postfix() { MelonPreferences_Entry<bool>? aTMUnlimitedEnabled = ModPreferences.ATMUnlimitedEnabled; if (aTMUnlimitedEnabled != null && aTMUnlimitedEnabled.Value && ATM.WeeklyDepositSum > 0f) { try { ATM.WeeklyDepositSum = 0f; } catch (Exception value) { Loggos.Error($"[ATMUnlimited] Failed to reset ATM weekly deposit sum: {value}"); } } } } [HarmonyPatch(typeof(ATMInterface), "ReturnToMenuButtonPressed")] internal static class Patch_ATMInterface_ReturnToMenuButtonPressed { [HarmonyPostfix] private static void Postfix() { MelonPreferences_Entry<bool>? aTMUnlimitedEnabled = ModPreferences.ATMUnlimitedEnabled; if (aTMUnlimitedEnabled != null && aTMUnlimitedEnabled.Value && ATM.WeeklyDepositSum > 0f) { try { ATM.WeeklyDepositSum = 0f; } catch (Exception value) { Loggos.Error($"[ATMUnlimited] Failed to reset ATM weekly deposit sum: {value}"); } } } } internal static bool? lastState; internal static void ApplyOverrides(bool forceLog) { bool flag = ModPreferences.ATMUnlimitedEnabled?.Value ?? false; if (forceLog || lastState != flag) { lastState = flag; } } } }