Decompiled source of BetterSMT v3.0.0
BepInEx/plugins/BetterSMT.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using BetterSMT.Patches; using Cinemachine; using HarmonyLib; using HighlightPlus; using HutongGames.PlayMaker; using HutongGames.PlayMaker.Actions; using Microsoft.CodeAnalysis; using Mirror; using StarterAssets; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("Mirror")] [assembly: IgnoresAccessChecksTo("PlayMaker")] [assembly: IgnoresAccessChecksTo("Rewired_Core")] [assembly: AssemblyCompany("BetterSMT")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("BetterSMT")] [assembly: AssemblyFileVersion("3.0.0.0")] [assembly: AssemblyInformationalVersion("3.0.0+947e7f7a34397bcd399985333d70c036f61b3ddd")] [assembly: AssemblyProduct("BetterSMT")] [assembly: AssemblyTitle("BetterSMT")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("3.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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; } } } namespace BetterSMT { [BepInPlugin("BetterSMT", "BetterSMT", "3.0.0")] public class BetterSMT : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("BetterSMT"); public static BetterSMT Instance; public static ConfigEntry<float> PillarPrice; public static ConfigEntry<bool> PillarRubble; public static ConfigEntry<bool> AutoPayAllInvoices; public static ConfigEntry<int> SalesActiveAmount; public static ConfigEntry<KeyboardShortcut> ClearSales; public static ConfigEntry<bool> ToggleClearSalesHotkey; public static ConfigEntry<bool> SalesToggle; public static ConfigEntry<KeyboardShortcut> SalesHotkey; public static ConfigEntry<bool> LowStockAlertEnabled; public static ConfigEntry<int> LowStockThreshold; public static ConfigEntry<bool> AutoOrderEnabled; public static ConfigEntry<int> AutoOrderCheckInterval; public static ConfigEntry<int> CustomersPerPerk; public static ConfigEntry<int> MaxCustomerInStore; public static ConfigEntry<int> BaseCustomerSpawns; public static ConfigEntry<int> BaseCustomerCart; public static ConfigEntry<int> MaxCustomerCart; public static ConfigEntry<int> EmployeesLevel; public static ConfigEntry<bool> EmployeesEnabled; public static ConfigEntry<float> EmployeeSpeedPerPerk; public static ConfigEntry<float> EmployeeRestockPerPerk; public static ConfigEntry<float> EmployeeCheckoutPerPerk; public static ConfigEntry<float> EmployeExtraCheckoutMoney; public static ConfigEntry<bool> OneHitThief; public static ConfigEntry<bool> SelfCheckoutTheft; public static ConfigEntry<bool> DisableAllThieves; public static ConfigEntry<bool> AllNPCAreThieves; public static ConfigEntry<bool> InstantSelfCheckout; public static ConfigEntry<bool> FasterCheckout; public static ConfigEntry<bool> ShowFPS; public static ConfigEntry<bool> ShowPing; public static ConfigEntry<bool> DisableAllTrash; public static ConfigEntry<bool> AlwaysAbleToDeleteMode; public static ConfigEntry<bool> DeleteAllCheckouts; public static ConfigEntry<bool> FullDeletionRefund; public static ConfigEntry<bool> AllTrashToRecyclers; public static ConfigEntry<bool> roundDown; public static ConfigEntry<bool> NearestFive; public static ConfigEntry<bool> NearestTen; public static bool doublePrice = true; public static ConfigEntry<bool> ToggleDoublePrice; public static ConfigEntry<bool> AutoAdjustPriceDaily; public static ConfigEntry<float> AutoAdjustPriceDailyValue; public static bool notify = false; public static string notificationType; public static ConfigEntry<bool> EnableMTV; public static ConfigEntry<int> MaxBoxes; public static ConfigEntry<float> AutoPickupRange; public static ConfigEntry<KeyboardShortcut> MTVHotkey; public static ConfigEntry<float> DropCooldown; public static ConfigEntry<bool> ShoplifterDetectionNotif; public static ConfigEntry<bool> OneClickCheckMark; public static ConfigEntry<bool> AllowFreePlacement; public static ConfigEntry<bool> CheatPlacement; public static ConfigEntry<bool> ProductStacking; public static ConfigEntry<bool> EnablePalletDisplaysPerk; public static ConfigEntry<bool> ReplaceCommasWithPeriods; public static ConfigEntry<string> CurrencyTypeToAny; public static ConfigEntry<bool> CardboardBalerBreak; public static ConfigEntry<bool> SelfCheckoutBreak; public static ConfigEntry<bool> CloserBoxSpawning; public static ConfigEntry<bool> StorageHighlighting; public static ConfigEntry<bool> ThirdPersonToggle; public static ConfigEntry<KeyboardShortcut> ThirdPersonHotkey; public static ConfigEntry<KeyboardShortcut> KeyboardShortcutDoublePrice; public static ConfigEntry<KeyboardShortcut> KeyboardShortcutRoundDownSwitch; public static ConfigEntry<KeyboardShortcut> KeyboardShortcutRoundDownToggle; public static ConfigEntry<KeyboardShortcut> PricingGunHotkey; public static ConfigEntry<bool> PricingGunToggle; public static ConfigEntry<KeyboardShortcut> BroomHotkey; public static ConfigEntry<bool> BroomToggle; public static ConfigEntry<KeyboardShortcut> DLCTabletHotkey; public static ConfigEntry<bool> DLCTabletToggle; public static ConfigEntry<KeyboardShortcut> EmptyHandsHotkey; public static ConfigEntry<bool> SledgeToggle; public static ConfigEntry<KeyboardShortcut> SledgeHotkey; public static ConfigEntry<bool> OsMartToggle; public static ConfigEntry<KeyboardShortcut> OsMartHotkey; public static ConfigEntry<bool> TrayToggle; public static ConfigEntry<KeyboardShortcut> TrayHotkey; public static ConfigEntry<KeyboardShortcut> LadderHotkey; public static ConfigEntry<bool> LadderToggle; public static ConfigEntry<KeyboardShortcut> ClockHotkey; public static ConfigEntry<bool> ClockToggle; public static ConfigEntry<bool> LoanEarly; public static ConfigEntry<bool> NumberKeys; public static ConfigEntry<int> SelfCheckoutLimit; public static ConfigEntry<bool> TooExpensiveNotifications; public static ConfigEntry<bool> MissingProductNotifications; public static ConfigEntry<int> MaxBoxSize; public static ConfigEntry<bool> DisableBoxCollisions; public static ConfigEntry<bool> FastBoxSpawns; public static ConfigEntry<float> ClockSpeed; public static ConfigEntry<bool> ClockMorning; public static ConfigEntry<bool> AutoOrdering; public static ConfigEntry<bool> QuickStocking; public static ConfigEntry<int> CardboardBalerValue; public static ConfigEntry<bool> PalletProduct; public static ConfigEntry<bool> AllProduct; public static ConfigEntry<bool> OrderPackaging; public static ConfigEntry<float> OrderSpeedUp; public static ConfigEntry<float> OrderIncreasedMax; internal static ManualLogSource Logger { get; private set; } = null; [Obsolete] private void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Expected O, but got Unknown //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Expected O, but got Unknown //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Expected O, but got Unknown //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Expected O, but got Unknown //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Expected O, but got Unknown //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Expected O, but got Unknown //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Expected O, but got Unknown //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Expected O, but got Unknown //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Expected O, but got Unknown //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05ba: Expected O, but got Unknown //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Expected O, but got Unknown //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Expected O, but got Unknown //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Expected O, but got Unknown //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Expected O, but got Unknown //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Expected O, but got Unknown //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Expected O, but got Unknown //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Expected O, but got Unknown //IL_0740: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Expected O, but got Unknown //IL_077d: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Expected O, but got Unknown //IL_07af: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Expected O, but got Unknown //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Expected O, but got Unknown //IL_0822: Unknown result type (might be due to invalid IL or missing references) //IL_082c: Expected O, but got Unknown //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Expected O, but got Unknown //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_0882: Expected O, but got Unknown //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Expected O, but got Unknown //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Expected O, but got Unknown //IL_08f9: Unknown result type (might be due to invalid IL or missing references) //IL_0903: Expected O, but got Unknown //IL_0924: Unknown result type (might be due to invalid IL or missing references) //IL_092e: Expected O, but got Unknown //IL_094f: Unknown result type (might be due to invalid IL or missing references) //IL_0959: Expected O, but got Unknown //IL_097a: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Expected O, but got Unknown //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Expected O, but got Unknown //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09de: Expected O, but got Unknown //IL_09ff: Unknown result type (might be due to invalid IL or missing references) //IL_0a09: Expected O, but got Unknown //IL_0a25: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0a3f: Expected O, but got Unknown //IL_0a60: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Expected O, but got Unknown //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Expected O, but got Unknown //IL_0ac1: Unknown result type (might be due to invalid IL or missing references) //IL_0acb: Expected O, but got Unknown //IL_0ae7: Unknown result type (might be due to invalid IL or missing references) //IL_0af7: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Expected O, but got Unknown //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b2c: Expected O, but got Unknown //IL_0b48: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b62: Expected O, but got Unknown //IL_0b83: Unknown result type (might be due to invalid IL or missing references) //IL_0b8d: Expected O, but got Unknown //IL_0bae: Unknown result type (might be due to invalid IL or missing references) //IL_0bb8: Expected O, but got Unknown //IL_0bd4: Unknown result type (might be due to invalid IL or missing references) //IL_0be4: Unknown result type (might be due to invalid IL or missing references) //IL_0bee: Expected O, but got Unknown //IL_0c0a: Unknown result type (might be due to invalid IL or missing references) //IL_0c1a: Unknown result type (might be due to invalid IL or missing references) //IL_0c24: Expected O, but got Unknown //IL_0c45: Unknown result type (might be due to invalid IL or missing references) //IL_0c4f: Expected O, but got Unknown //IL_0c70: Unknown result type (might be due to invalid IL or missing references) //IL_0c7a: Expected O, but got Unknown //IL_0c96: Unknown result type (might be due to invalid IL or missing references) //IL_0ca6: Unknown result type (might be due to invalid IL or missing references) //IL_0cb0: Expected O, but got Unknown //IL_0cd1: Unknown result type (might be due to invalid IL or missing references) //IL_0cdb: Expected O, but got Unknown //IL_0cf7: Unknown result type (might be due to invalid IL or missing references) //IL_0d07: Unknown result type (might be due to invalid IL or missing references) //IL_0d11: Expected O, but got Unknown //IL_0d32: Unknown result type (might be due to invalid IL or missing references) //IL_0d3c: Expected O, but got Unknown //IL_0d58: Unknown result type (might be due to invalid IL or missing references) //IL_0d68: Unknown result type (might be due to invalid IL or missing references) //IL_0d72: Expected O, but got Unknown //IL_0d8e: Unknown result type (might be due to invalid IL or missing references) //IL_0d9e: Unknown result type (might be due to invalid IL or missing references) //IL_0da8: Expected O, but got Unknown //IL_0dc9: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Expected O, but got Unknown //IL_0e06: Unknown result type (might be due to invalid IL or missing references) //IL_0e10: Expected O, but got Unknown //IL_0e31: Unknown result type (might be due to invalid IL or missing references) //IL_0e3b: Expected O, but got Unknown //IL_0e57: Unknown result type (might be due to invalid IL or missing references) //IL_0e67: Unknown result type (might be due to invalid IL or missing references) //IL_0e71: Expected O, but got Unknown //IL_0e92: Unknown result type (might be due to invalid IL or missing references) //IL_0e9c: Expected O, but got Unknown //IL_0ebd: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Expected O, but got Unknown //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Expected O, but got Unknown //IL_0f17: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Unknown result type (might be due to invalid IL or missing references) //IL_0f31: Expected O, but got Unknown //IL_0f5e: Unknown result type (might be due to invalid IL or missing references) //IL_0f6e: Unknown result type (might be due to invalid IL or missing references) //IL_0f78: Expected O, but got Unknown //IL_0f99: Unknown result type (might be due to invalid IL or missing references) //IL_0fa3: Expected O, but got Unknown //IL_0fc4: Unknown result type (might be due to invalid IL or missing references) //IL_0fce: Expected O, but got Unknown //IL_0fef: Unknown result type (might be due to invalid IL or missing references) //IL_0ff9: Expected O, but got Unknown //IL_101a: Unknown result type (might be due to invalid IL or missing references) //IL_1024: Expected O, but got Unknown //IL_104d: Unknown result type (might be due to invalid IL or missing references) //IL_1057: Expected O, but got Unknown //IL_1078: Unknown result type (might be due to invalid IL or missing references) //IL_1082: Expected O, but got Unknown //IL_10a3: Unknown result type (might be due to invalid IL or missing references) //IL_10ad: Expected O, but got Unknown //IL_10ce: Unknown result type (might be due to invalid IL or missing references) //IL_10d8: Expected O, but got Unknown //IL_110b: Unknown result type (might be due to invalid IL or missing references) //IL_1115: Expected O, but got Unknown //IL_1136: Unknown result type (might be due to invalid IL or missing references) //IL_1140: Expected O, but got Unknown //IL_1161: Unknown result type (might be due to invalid IL or missing references) //IL_116b: Expected O, but got Unknown //IL_118c: Unknown result type (might be due to invalid IL or missing references) //IL_1196: Expected O, but got Unknown //IL_11b7: Unknown result type (might be due to invalid IL or missing references) //IL_11c1: Expected O, but got Unknown //IL_11e9: Unknown result type (might be due to invalid IL or missing references) //IL_11f3: Expected O, but got Unknown //IL_121b: Unknown result type (might be due to invalid IL or missing references) //IL_1225: Expected O, but got Unknown //IL_1246: Unknown result type (might be due to invalid IL or missing references) //IL_1250: Expected O, but got Unknown //IL_128e: Unknown result type (might be due to invalid IL or missing references) //IL_1294: Expected O, but got Unknown OrderPackaging = ((BaseUnityPlugin)this).Config.Bind<bool>("Order Packaging", "Enables custom order packaging", false, new ConfigDescription("Optionally does not spawn rubble when destroying a pillar", (AcceptableValueBase)null, Array.Empty<object>())); OrderSpeedUp = ((BaseUnityPlugin)this).Config.Bind<float>("Order Packaging", "Speeds up how often orders come", 0f, new ConfigDescription("Works as a percent multiplier. 1.1 = 10% faster. 2.3 = 130% faster.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>())); OrderIncreasedMax = ((BaseUnityPlugin)this).Config.Bind<float>("Order Packaging", "Increases max amount of orders per day", 0f, new ConfigDescription("Flat number to increase the max amount of orders you get per day. Default was random value of 2 through 40.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 240f), Array.Empty<object>())); PillarRubble = ((BaseUnityPlugin)this).Config.Bind<bool>("Pillar Mods", "Disable Rubble", false, new ConfigDescription("Optionally does not spawn rubble when destroying a pillar", (AcceptableValueBase)null, Array.Empty<object>())); PillarPrice = ((BaseUnityPlugin)this).Config.Bind<float>("Pillar Mods", "Change Price", 4000f, new ConfigDescription("Changes the price of destroying a pillar.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 50000f), Array.Empty<object>())); SalesHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Sales Settings", "Sales Tablet Hotkey", new KeyboardShortcut((KeyCode)122, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Sales Tablet in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); SalesToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Sales Settings", "Sales Tablet Toggle", false, new ConfigDescription("Enables the hotkey to activate Sales Tablet", (AcceptableValueBase)null, Array.Empty<object>())); ClearSales = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Sales Settings", "Clear Sales", new KeyboardShortcut((KeyCode)120, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to clear current sales.", (AcceptableValueBase)null, Array.Empty<object>())); ToggleClearSalesHotkey = ((BaseUnityPlugin)this).Config.Bind<bool>("Sales Settings", "Enables or disables hotkey to clear sales", false, new ConfigDescription("Enables or disables the hotkey to clear sales", (AcceptableValueBase)null, Array.Empty<object>())); SalesActiveAmount = ((BaseUnityPlugin)this).Config.Bind<int>("Sales Settings", "Amount of sales unlocked each perk", 2, new ConfigDescription("Adjusts the amount of sales you unlock for each perk", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), Array.Empty<object>())); AutoOrderEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Auto Ordering", "Enable Auto Ordering", false, new ConfigDescription("Automatically orders products when stock is low. Only works when Ordering Tablet is in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); AutoOrderCheckInterval = ((BaseUnityPlugin)this).Config.Bind<int>("Auto Ordering", "Auto Order Check Interval", 30, new ConfigDescription("Time interval (in seconds) for checking product stock", (AcceptableValueBase)(object)new AcceptableValueRange<int>(10, 600), Array.Empty<object>())); LowStockAlertEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Low Stock Alerts", "Enable Low Stock Alerts", false, new ConfigDescription("Show alerts when products drop below the threshold", (AcceptableValueBase)null, Array.Empty<object>())); LowStockThreshold = ((BaseUnityPlugin)this).Config.Bind<int>("Low Stock Alerts", "Low Stock Threshold", 2, new ConfigDescription("The stock count at which alerts are triggered", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 1000), Array.Empty<object>())); EmployeExtraCheckoutMoney = ((BaseUnityPlugin)this).Config.Bind<float>("Employee & Customer Settings", "Employe Increased Income While Checking Customer Out Perk", 0.1f, new ConfigDescription("Adjust the amount of extra income you receive when an employee checks out a customer (Higher = more income)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.3f), Array.Empty<object>())); EmployeeCheckoutPerPerk = ((BaseUnityPlugin)this).Config.Bind<float>("Employee & Customer Settings", "Employee Checkout Time Reduction Perk 1", 0.15f, new ConfigDescription("Adjust the amount of time employees wait to scan items in checkout (Perk 1) (Lower = slower)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 0.24f), Array.Empty<object>())); MaxCustomerCart = ((BaseUnityPlugin)this).Config.Bind<int>("Employee & Customer Settings", "Maximum amount of product customers will buy", 25, new ConfigDescription("Adjust the maximum amount of product customers will buy", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 75), Array.Empty<object>())); BaseCustomerCart = ((BaseUnityPlugin)this).Config.Bind<int>("Employee & Customer Settings", "Minimum amount of product customers will buy", 5, new ConfigDescription("Adjust the minimum amount of product customers will buy", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 15), Array.Empty<object>())); BaseCustomerSpawns = ((BaseUnityPlugin)this).Config.Bind<int>("Employee & Customer Settings", "Minimum amount of customers that will spawn", 3, new ConfigDescription("Adjust the minimum amount of customer's that can spawn", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 9), Array.Empty<object>())); MaxCustomerInStore = ((BaseUnityPlugin)this).Config.Bind<int>("Employee & Customer Settings", "Max amount of customers in store", 70, new ConfigDescription("Adjust the amount of customers that can spawn at one time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 210), Array.Empty<object>())); CustomersPerPerk = ((BaseUnityPlugin)this).Config.Bind<int>("Employee & Customer Settings", "Extra Customers per perk", 1, new ConfigDescription("Adjust the amount of customers you gain per perk (Higher number = more customers)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), Array.Empty<object>())); EmployeesLevel = ((BaseUnityPlugin)this).Config.Bind<int>("Employee & Customer Settings", "Employees Level", 0, new ConfigDescription("Adjust the level of employee's that spawn (1 sets all of their stats to minimum, 30 sets them all to max)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 30), Array.Empty<object>())); EmployeeSpeedPerPerk = ((BaseUnityPlugin)this).Config.Bind<float>("Employee & Customer Settings", "Employee Speed Per Perk", 0.2f, new ConfigDescription("Adjust the amount of speed employees gain per perk (Higher = faster)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 0.6f), Array.Empty<object>())); EmployeeRestockPerPerk = ((BaseUnityPlugin)this).Config.Bind<float>("Employee & Customer Settings", "Employee Restock Time Reduction Per Perk", 0.05f, new ConfigDescription("Adjust the amount of time it takes for employees to restock per perk (Lower = faster)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 0.15f), Array.Empty<object>())); AllNPCAreThieves = ((BaseUnityPlugin)this).Config.Bind<bool>("Thieves & Crime Settings", "All Thieves", false, new ConfigDescription("Causes every NPC to be a thief", (AcceptableValueBase)null, Array.Empty<object>())); SelfCheckoutTheft = ((BaseUnityPlugin)this).Config.Bind<bool>("Thieves & Crime Settings", "Self-Checkout Theft", true, new ConfigDescription("Enables or disables default game's theft from self checkout", (AcceptableValueBase)null, Array.Empty<object>())); DisableAllThieves = ((BaseUnityPlugin)this).Config.Bind<bool>("Thieves & Crime Settings", "Disable Thieves", false, new ConfigDescription("Prevent thieves from spawning (Does not stop checkout-related thieves)", (AcceptableValueBase)null, Array.Empty<object>())); OneHitThief = ((BaseUnityPlugin)this).Config.Bind<bool>("Thieves & Crime Settings", "Thiefs Drop Everything On Hit", false, new ConfigDescription("Thiefs Drop Everything On Hit", (AcceptableValueBase)null, Array.Empty<object>())); InstantSelfCheckout = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Setting", "Faster Self-Checkout", false, new ConfigDescription("Customers place all items instantly on to the self-checkout", (AcceptableValueBase)null, Array.Empty<object>())); FasterCheckout = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Faster Checkout", false, new ConfigDescription("Customers place all items instantly on to the checkout", (AcceptableValueBase)null, Array.Empty<object>())); ShowFPS = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Show FPS Counter", false, (ConfigDescription)null); ShowPing = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Show Ping Counter", false, (ConfigDescription)null); DisableAllTrash = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Despawns trash", false, new ConfigDescription("Despawns all trash at the end of the day", (AcceptableValueBase)null, Array.Empty<object>())); AlwaysAbleToDeleteMode = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Always access to delete", false, new ConfigDescription("Delete shelves and others while customers are in store and store is open", (AcceptableValueBase)null, Array.Empty<object>())); DeleteAllCheckouts = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Enable or disable deleting all checkout lanes", false, new ConfigDescription("Adds the ability to delete every checkout lane", (AcceptableValueBase)null, Array.Empty<object>())); FullDeletionRefund = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "Full refund on buildings", false, new ConfigDescription("Provides 100% of the cost of buildings when being deleted", (AcceptableValueBase)null, Array.Empty<object>())); AllTrashToRecyclers = ((BaseUnityPlugin)this).Config.Bind<bool>("Gameplay Settings", "All Recyclers", false, new ConfigDescription("Turns the nearest trash can into a recycler without the perk.", (AcceptableValueBase)null, Array.Empty<object>())); StorageHighlighting = ((BaseUnityPlugin)this).Config.Bind<bool>("Highlighting", "This feature has been deprecated from BetterSMT and moved to SuperQoLity.", false, new ConfigDescription("This feature has been deprecated from BetterSMT and moved to SuperQoLity.", (AcceptableValueBase)null, Array.Empty<object>())); EnableMTV = ((BaseUnityPlugin)this).Config.Bind<bool>("Mini Transport Vehicle", "Enable custom Mini Transport Vehicle features", false, new ConfigDescription("Enables or disables custom Mini Transport Vehicle features below.", (AcceptableValueBase)null, Array.Empty<object>())); AutoPickupRange = ((BaseUnityPlugin)this).Config.Bind<float>("Mini Transport Vehicle", "Change the range of auto-picking up boxes", 3f, new ConfigDescription("Adjusts how far away a box will be automatically picked up onto the Mini Transport Vehicle.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 30f), Array.Empty<object>())); MaxBoxes = ((BaseUnityPlugin)this).Config.Bind<int>("Mini Transport Vehicle", "Change the max boxes", 6, new ConfigDescription("Adjusts the max amount of boxes the Mini Transport Vehicle will hold at one time.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(6, 16), Array.Empty<object>())); MTVHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Mini Transport Vehicle", "Change the drop hotkey", new KeyboardShortcut((KeyCode)108, Array.Empty<KeyCode>()), new ConfigDescription("Changes the hotkey used to dispense all boxes from the Mini Transport Vehicle instantly.", (AcceptableValueBase)null, Array.Empty<object>())); DropCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("Mini Transport Vehicle", "Item Pickup Cooldown", 10f, new ConfigDescription("Changes how long it will wait to pickup boxes again after the drop hotkey has been pressed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 30f), Array.Empty<object>())); ShoplifterDetectionNotif = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Shoplifter Notification", false, new ConfigDescription("Adds a visual que to notify you when a shoplifter runs through anti-theft doors.", (AcceptableValueBase)null, Array.Empty<object>())); CloserBoxSpawning = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Closer Box Spawning", false, new ConfigDescription("Causes boxes to spawn closer to the storage area", (AcceptableValueBase)null, Array.Empty<object>())); OneClickCheckMark = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Surveillance Camera One Click", false, new ConfigDescription("Makes all customers one click when using security console", (AcceptableValueBase)null, Array.Empty<object>())); AllowFreePlacement = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Disable Placement Blocking", false, new ConfigDescription("Enables or disables you to place structures wherever in the main area, even overlapping", (AcceptableValueBase)null, Array.Empty<object>())); CheatPlacement = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Disable PLacement Checks", false, new ConfigDescription("Similar to Free Placement, but allows building anywhere and everywhere", (AcceptableValueBase)null, Array.Empty<object>())); ProductStacking = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Enable product stacking", false, new ConfigDescription("Enables or disables most products in the game to stack on shelves", (AcceptableValueBase)null, Array.Empty<object>())); EnablePalletDisplaysPerk = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Enable pallet displays", false, new ConfigDescription("Enables pallet displays without unlocking the perk.", (AcceptableValueBase)null, Array.Empty<object>())); ReplaceCommasWithPeriods = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Replace commas with periods", false, new ConfigDescription("Changes all commas in the game into periods.", (AcceptableValueBase)null, Array.Empty<object>())); CurrencyTypeToAny = ((BaseUnityPlugin)this).Config.Bind<string>("Random Features", "CurrencySymbol", "$", new ConfigDescription("Sets the currency symbol used in the game. Default is $.", (AcceptableValueBase)null, Array.Empty<object>())); CardboardBalerBreak = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Enable or disable cardboard baler breaking", false, new ConfigDescription("Enables or disables the cardboard baler needing to be repaired.", (AcceptableValueBase)null, Array.Empty<object>())); SelfCheckoutBreak = ((BaseUnityPlugin)this).Config.Bind<bool>("Random Features", "Enable or disable Self Checkout breaking", false, new ConfigDescription("Enables or disables the self checkout needing to be repaired.", (AcceptableValueBase)null, Array.Empty<object>())); LadderHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Sledgehammer Hotkey", new KeyboardShortcut((KeyCode)109, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Sledgehammer in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); LadderToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Sledgehammer Toggle", false, new ConfigDescription("Enables the hotkey to activate Sledgehammer", (AcceptableValueBase)null, Array.Empty<object>())); SledgeHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Sledgehammer Hotkey", new KeyboardShortcut((KeyCode)106, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Sledgehammer in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); SledgeToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Sledgehammer Toggle", false, new ConfigDescription("Enables the hotkey to activate Sledgehammer", (AcceptableValueBase)null, Array.Empty<object>())); OsMartHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Os Mart 2.0 Tablet Hotkey", new KeyboardShortcut((KeyCode)104, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Os Mart 2.0 Tablet in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); OsMartToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Os Mart 2.0 Toggle", false, new ConfigDescription("Enables the hotkey to activate Os Mart 2.0", (AcceptableValueBase)null, Array.Empty<object>())); TrayHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Tray Hotkey", new KeyboardShortcut((KeyCode)107, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Tray in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); TrayToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Tray Toggle", false, new ConfigDescription("Enables the hotkey to activate Tray", (AcceptableValueBase)null, Array.Empty<object>())); ClockToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Enable hotkey for clock", false, new ConfigDescription("Enables or disabled hotkey activating clock.", (AcceptableValueBase)null, Array.Empty<object>())); ClockHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Toggle Clock", new KeyboardShortcut((KeyCode)111, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to enable/disable the clock", (AcceptableValueBase)null, Array.Empty<object>())); ThirdPersonHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Third Person Hotkey", new KeyboardShortcut((KeyCode)103, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to enter and leave third person/first person.", (AcceptableValueBase)null, Array.Empty<object>())); ThirdPersonToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Enable or disable third person", false, new ConfigDescription("Enables or disables the hotkey to enter and leave third person/first person", (AcceptableValueBase)null, Array.Empty<object>())); PricingGunToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Pricing Gun Toggle", false, new ConfigDescription("Enables the hotkey to activate Pricing Gun", (AcceptableValueBase)null, Array.Empty<object>())); PricingGunHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Pricing Gun Hotkey", new KeyboardShortcut((KeyCode)121, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Pricing Gun in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); BroomToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "Broom Toggle", false, new ConfigDescription("Enables the hotkey to activate Broom", (AcceptableValueBase)null, Array.Empty<object>())); BroomHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Broom Hotkey", new KeyboardShortcut((KeyCode)117, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a Broom in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); DLCTabletToggle = ((BaseUnityPlugin)this).Config.Bind<bool>("Hotkey Configurations", "DLC Tablet Toggle", false, new ConfigDescription("Enables the hotkey to activate DLC Tablet", (AcceptableValueBase)null, Array.Empty<object>())); DLCTabletHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "DLC Tablet Hotkey", new KeyboardShortcut((KeyCode)105, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to spawn a DLC Tablet in your hands.", (AcceptableValueBase)null, Array.Empty<object>())); EmptyHandsHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkey Configurations", "Empty Hands Hotkey", new KeyboardShortcut((KeyCode)114, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to remove active item in your hand.", (AcceptableValueBase)null, Array.Empty<object>())); AutoAdjustPriceDaily = ((BaseUnityPlugin)this).Config.Bind<bool>("Pricing Assistance", "Auto Adjust Prices Daily", false, new ConfigDescription("Enables or disables automatically doubling the price of products daily", (AcceptableValueBase)null, Array.Empty<object>())); AutoAdjustPriceDailyValue = ((BaseUnityPlugin)this).Config.Bind<float>("Pricing Assistance", "Adjust the amount prices are automatically set to every day", 2f, new ConfigDescription("Adjusts the amount prices are set to be multiplied by daily. Value of 2x is 2$ * 2 = 4$. Value of 1.99x is 2$*1.99=3.98", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 2f), Array.Empty<object>())); ToggleDoublePrice = ((BaseUnityPlugin)this).Config.Bind<bool>("Double Price Gun", "Enable or disable double price module", false, new ConfigDescription("Enables or disables the price gun automatically having 2x the market price", (AcceptableValueBase)null, Array.Empty<object>())); KeyboardShortcutDoublePrice = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Double Price Gun", "Enable Double Price module", new KeyboardShortcut((KeyCode)113, Array.Empty<KeyCode>()), new ConfigDescription("Hotkey to enable and disable double price module", (AcceptableValueBase)null, Array.Empty<object>())); roundDown = ((BaseUnityPlugin)this).Config.Bind<bool>("Double Price Gun", "Enable rounding down", false, new ConfigDescription("Enables rounding down to prevent 'Too Expensive'", (AcceptableValueBase)null, Array.Empty<object>())); NearestFive = ((BaseUnityPlugin)this).Config.Bind<bool>("Double Price Gun", "Enable rounding down to nearest 0.05", true, new ConfigDescription("Enable rounding down to the nearest fifth", (AcceptableValueBase)null, Array.Empty<object>())); NearestTen = ((BaseUnityPlugin)this).Config.Bind<bool>("Double Price Gun", "Enable rounding down to nearest 0.10", false, new ConfigDescription("Enable rounding down to the nearest tenth", (AcceptableValueBase)null, Array.Empty<object>())); KeyboardShortcutRoundDownSwitch = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Double Price Gun", "Round Down Shortcuts", new KeyboardShortcut((KeyCode)113, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), new ConfigDescription("Hotkey to round down the double price", (AcceptableValueBase)null, Array.Empty<object>())); KeyboardShortcutRoundDownToggle = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Double Price Gun", "Round Down Hotkey", new KeyboardShortcut((KeyCode)113, (KeyCode[])(object)new KeyCode[2] { (KeyCode)306, (KeyCode)304 }), new ConfigDescription("Hotkey to round down to setting set", (AcceptableValueBase)null, Array.Empty<object>())); PalletProduct = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "More Product on Pallets", false, new ConfigDescription("Enables or disables allowing smaller products on pallets **Note: fully stocked pallets with smaller products can cause lag when being looked at", (AcceptableValueBase)null, Array.Empty<object>())); AllProduct = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "No Product Requirement", false, new ConfigDescription("Enables or disables the need for freezers, pegboards, fridges, etc. **Note: fully stocked pallets with smaller products can cause lag when being looked at", (AcceptableValueBase)null, Array.Empty<object>())); LoanEarly = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Payoff Loans Early", false, new ConfigDescription("Enables or disables a button to pay off loans early", (AcceptableValueBase)null, Array.Empty<object>())); NumberKeys = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enables normal numbers", false, new ConfigDescription("Enables or disables using non-numpad numbers to set prices", (AcceptableValueBase)null, Array.Empty<object>())); CardboardBalerValue = ((BaseUnityPlugin)this).Config.Bind<int>("Random QoL", "Cardboard Baler", 10, new ConfigDescription("Adjust the amount of boxes required for the cardboard baler to spit out a bale", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 50), Array.Empty<object>())); QuickStocking = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enables quick stocking", false, new ConfigDescription("Enables or disables stocking the entire box onto shelf in one click", (AcceptableValueBase)null, Array.Empty<object>())); AutoOrdering = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enables auto-ordering items", false, new ConfigDescription("Enables or disables automatically adding enough stock to the shopping order when picking up the OS Mart device", (AcceptableValueBase)null, Array.Empty<object>())); ClockMorning = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enables clock usage in morning", false, new ConfigDescription("Enables or disables using the clock in the morning", (AcceptableValueBase)null, Array.Empty<object>())); ClockSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Random QoL", "Clock Speed", 5f, new ConfigDescription("Adjust the amount of speed enabling the clock gives", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 15f), Array.Empty<object>())); DisableBoxCollisions = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enable or disable collision with boxes", false, new ConfigDescription("Enables or disables collision with boxes allowing them to stack inside of each other https://i.imgur.com/ffJrHOA.jpeg", (AcceptableValueBase)null, Array.Empty<object>())); FastBoxSpawns = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enable or disable fast spawning of boxes", false, new ConfigDescription("Enables or disables making purchases boxes spawn quickly https://i.imgur.com/92Ex4V6.png", (AcceptableValueBase)null, Array.Empty<object>())); MissingProductNotifications = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enable or disable notification Missing Product", false, new ConfigDescription("Enables or disables the notification for missing products", (AcceptableValueBase)null, Array.Empty<object>())); TooExpensiveNotifications = ((BaseUnityPlugin)this).Config.Bind<bool>("Random QoL", "Enable or disable notification Too Expensive", false, new ConfigDescription("Enables or disables the notification for too expensive products", (AcceptableValueBase)null, Array.Empty<object>())); SelfCheckoutLimit = ((BaseUnityPlugin)this).Config.Bind<int>("Random QoL", "Product limit on self checkout", 4, new ConfigDescription("Limits the amount of item's a customer can have before using the self checkout", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); MaxBoxSize = ((BaseUnityPlugin)this).Config.Bind<int>("Random QoL", "Modify amount of products in boxes", 1, new ConfigDescription("** WARNING THIS IS EXTREMELY BUGGY IN MULTIPLAYER ** Multiples the amount of product in a box, aswell as it's cost. Higher = more products in box and higher cost https://imgur.com/a/QT5l2Ky", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 50), Array.Empty<object>())); AutoPayAllInvoices = ((BaseUnityPlugin)this).Config.Bind<bool>("Debt", "Enables or disables automatic invoice payment", false, new ConfigDescription("Enables or disables paying for invoices automatically", (AcceptableValueBase)null, Array.Empty<object>())); Instance = this; Logger = ((BaseUnityPlugin)this).Logger; harmony.PatchAll(); Logger.LogInfo((object)"Plugin BetterSMT v3.0.0 is loaded!"); Harmony.DEBUG = true; GameObject val = new GameObject("ManualSaleClearHotkeyListener"); val.AddComponent<ManualSaleClearHotkeyListener>(); Object.DontDestroyOnLoad((Object)(object)val); } public static void CreateCanvasNotification(string text) { GameObject val = Object.Instantiate<GameObject>(GameCanvas.Instance.notificationPrefab, GameCanvas.Instance.notificationParentTransform); ((TMP_Text)val.GetComponent<TextMeshProUGUI>()).text = text; val.SetActive(true); } public static void CreateImportantNotification(string text) { GameObject val = Object.Instantiate<GameObject>(GameCanvas.Instance.importantNotificationPrefab, GameCanvas.Instance.importantNotificationParentTransform); ((TMP_Text)val.GetComponent<TextMeshProUGUI>()).text = text; val.SetActive(true); } private void Update() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if (ToggleDoublePrice.Value) { KeyboardShortcut value = KeyboardShortcutDoublePrice.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { doublePrice = !doublePrice; notificationType = "priceToggle"; notify = true; } else { value = KeyboardShortcutRoundDownSwitch.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { if (NearestTen.Value) { NearestTen.Value = false; NearestFive.Value = true; } else { NearestTen.Value = true; NearestFive.Value = false; } notificationType = "roundDownSwitch"; notify = true; } else { value = KeyboardShortcutRoundDownToggle.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { roundDown.Value = !roundDown.Value; notificationType = "roundDownToggle"; notify = true; } } } } if (NearestFive.Value && NearestTen.Value) { NearestTen.Value = false; } } } public static class PluginInfo { public const string PLUGIN_GUID = "BetterSMT"; public const string PLUGIN_NAME = "BetterSMT"; public const string PLUGIN_VERSION = "3.0.0"; } } namespace BetterSMT.Patches { [HarmonyPatch(typeof(AntiTheftBehaviour))] public static class AntiTheftBehaviourPatch { [CompilerGenerated] private sealed class <CustomAlarmBehaviour>d__1 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AntiTheftBehaviour __instance; private int <iterations>5__1; private bool <set>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CustomAlarmBehaviour>d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; __instance.alarmIsPlaying = true; <iterations>5__1 = 0; <set>5__2 = true; goto IL_0130; case 1: <>1__state = -1; <iterations>5__1++; <set>5__2 = !<set>5__2; BetterSMT.CreateImportantNotification("Shoplifted Detected!"); goto IL_0130; case 2: { <>1__state = -1; __instance.alarmIsPlaying = false; return false; } IL_0130: if (<iterations>5__1 < 20) { if (<set>5__2) { ((Renderer)__instance.lightOBJ1.GetComponent<MeshRenderer>()).material = __instance.lightOn; ((Renderer)__instance.lightOBJ2.GetComponent<MeshRenderer>()).material = __instance.lightOn; } else { ((Renderer)__instance.lightOBJ1.GetComponent<MeshRenderer>()).material = __instance.lightOff; ((Renderer)__instance.lightOBJ2.GetComponent<MeshRenderer>()).material = __instance.lightOff; } <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 1; return true; } <>2__current = null; <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPrefix] [HarmonyPatch("AlarmBehaviour")] public static bool AlarmBehaviourPrefix(AntiTheftBehaviour __instance, ref IEnumerator __result) { if (BetterSMT.ShoplifterDetectionNotif.Value) { __result = CustomAlarmBehaviour(__instance); return false; } return true; } [IteratorStateMachine(typeof(<CustomAlarmBehaviour>d__1))] private static IEnumerator CustomAlarmBehaviour(AntiTheftBehaviour __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CustomAlarmBehaviour>d__1(0) { __instance = __instance }; } } [HarmonyPatch(typeof(BoxData))] public static class BoxDataPatch { private static int _initialLayer = -1; [HarmonyPostfix] [HarmonyPatch("OnStartClient")] public static void OnStartClientPostfix(BoxData __instance) { ConfigEntry<bool> disableBoxCollisions = BetterSMT.DisableBoxCollisions; if (disableBoxCollisions != null && disableBoxCollisions.Value && !((Object)(object)((__instance != null) ? ((Component)__instance).gameObject : null) == (Object)null)) { ApplyCollisionChanges(((Component)__instance).gameObject); } } private static void ApplyCollisionChanges(GameObject boxObject) { _initialLayer = ((_initialLayer == -1) ? boxObject.layer : _initialLayer); boxObject.layer = 20; Physics.IgnoreLayerCollision(20, 20, true); } } [HarmonyPatch(typeof(Builder_Main))] public class Builder_MainPatch { [HarmonyPatch(typeof(Builder_Main), "RetrieveInitialBehaviours")] [HarmonyPostfix] public static void ProductStackingWaitEndOfIEnumerable() { if (!BetterSMT.ProductStacking.Value) { return; } GameObject[] productPrefabs = ProductListing.Instance.productPrefabs; Data_Product val2 = default(Data_Product); foreach (GameObject val in productPrefabs) { if (!((Object)(object)val == (Object)null) && val.TryGetComponent<Data_Product>(ref val2)) { val2.isStackable = true; } } } [HarmonyPatch("DeleteBehaviour")] [HarmonyPrefix] public static bool DeleteWheneverPatch(Builder_Main __instance) { //IL_002c: 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) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) if (BetterSMT.AlwaysAbleToDeleteMode.Value || BetterSMT.DeleteAllCheckouts.Value) { RaycastHit val = default(RaycastHit); if (Physics.Raycast(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward, ref val, 4f, LayerMask.op_Implicit(__instance.lMask))) { if (((Component)((RaycastHit)(ref val)).transform).gameObject.CompareTag("Movable")) { if (Object.op_Implicit((Object)(object)__instance.oldHitOBJ2) && (Object)(object)((Component)((RaycastHit)(ref val)).transform).gameObject != (Object)(object)__instance.oldHitOBJ2 && Object.op_Implicit((Object)(object)__instance.hEffect2)) { __instance.hEffect2.highlighted = false; } __instance.hEffect2 = ((Component)((RaycastHit)(ref val)).transform).GetComponent<HighlightEffect>(); __instance.hEffect2.highlighted = true; if (__instance.MainPlayer.GetButtonDown("Build") || __instance.MainPlayer.GetButtonDown("Main Action") || __instance.MainPlayer.GetButtonDown("Secondary Action")) { if (!BetterSMT.AlwaysAbleToDeleteMode.Value) { if (GameData.Instance.isSupermarketOpen) { GameCanvas.Instance.CreateCanvasNotification("message15"); return false; } if (NPC_Manager.Instance.customersnpcParentOBJ.transform.childCount > 0) { GameCanvas.Instance.CreateCanvasNotification("message16"); return false; } } if (__instance.FurnitureContainsProduct(((RaycastHit)(ref val)).transform) && !__instance.MainPlayer.GetButton("Drop Item")) { GameCanvas.Instance.CreateCanvasNotification("message17a"); return false; } if (Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent<Data_Container>())) { int containerID = ((Component)((RaycastHit)(ref val)).transform).GetComponent<Data_Container>().containerID; if (!BetterSMT.DeleteAllCheckouts.Value && (containerID == 6 || containerID == 7) && ((Component)((Component)GameData.Instance).GetComponent<NetworkSpawner>().levelPropsOBJ.transform.GetChild(2)).transform.childCount == 1) { GameCanvas.Instance.CreateCanvasNotification("checkoutwarning"); return false; } } if (Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent<NetworkIdentity>())) { float num = (float)((Component)((RaycastHit)(ref val)).transform).GetComponent<Data_Container>().cost * (BetterSMT.FullDeletionRefund.Value ? 1f : 0.9f); if (__instance.MainPlayer.GetButton("Drop Item")) { num += __instance.CalculateShelfProductCost(((RaycastHit)(ref val)).transform); } GameData.Instance.CmdAlterFundsWithoutExperience(num); ((Component)GameData.Instance).GetComponent<NetworkSpawner>().CmdDestroyBox(((Component)((RaycastHit)(ref val)).transform).gameObject); } } __instance.oldHitOBJ2 = ((Component)((RaycastHit)(ref val)).transform).gameObject; } else if (Object.op_Implicit((Object)(object)__instance.hEffect2)) { __instance.hEffect2.highlighted = false; } } else if (Object.op_Implicit((Object)(object)__instance.hEffect2)) { __instance.hEffect2.highlighted = false; } RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(((Component)Camera.main).transform.position, ((Component)Camera.main).transform.forward, ref val2, 4f, LayerMask.op_Implicit(__instance.lMask))) { if (((Component)((RaycastHit)(ref val2)).transform).gameObject.CompareTag("Decoration")) { if (Object.op_Implicit((Object)(object)__instance.oldHitOBJ) && (Object)(object)((Component)((RaycastHit)(ref val2)).transform).gameObject != (Object)(object)__instance.oldHitOBJ && Object.op_Implicit((Object)(object)__instance.hEffect)) { ((Behaviour)__instance.hEffect).enabled = false; } __instance.hEffect = ((Component)((RaycastHit)(ref val2)).transform.Find("Mesh")).GetComponent<HighlightEffect>(); ((Behaviour)__instance.hEffect).enabled = true; if ((__instance.MainPlayer.GetButtonDown("Build") || __instance.MainPlayer.GetButtonDown("Main Action") || __instance.MainPlayer.GetButtonDown("Secondary Action")) && Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref val2)).transform).GetComponent<NetworkIdentity>())) { float num2 = ((Component)((RaycastHit)(ref val2)).transform).GetComponent<BuildableInfo>().cost * 0.9f; GameData.Instance.CmdAlterFundsWithoutExperience(num2); ((Component)GameData.Instance).GetComponent<NetworkSpawner>().CmdDestroyBox(((Component)((RaycastHit)(ref val2)).transform).gameObject); if (__instance.currentTabIndex == 4 && !GameData.Instance.removeLightsLimit) { ((MonoBehaviour)__instance).StartCoroutine(__instance.DelayedSetLightsInfo()); } } __instance.oldHitOBJ = ((Component)((RaycastHit)(ref val2)).transform).gameObject; } else if (Object.op_Implicit((Object)(object)__instance.hEffect)) { ((Behaviour)__instance.hEffect).enabled = false; } } else if (Object.op_Implicit((Object)(object)__instance.hEffect)) { ((Behaviour)__instance.hEffect).enabled = false; } return false; } return true; } [HarmonyPatch(typeof(Builder_Main), "DecorationBehaviour")] [HarmonyPrefix] public static bool DecorationBehaviourPatch(Builder_Main __instance) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) if (BetterSMT.CheatPlacement.Value || BetterSMT.AllowFreePlacement.Value) { if (BetterSMT.CheatPlacement.Value) { __instance.inCorrectBounds = true; __instance.overlapping = false; __instance.raycastIsCorrect = true; __instance.canPlace = true; HighlightEffect val = default(HighlightEffect); if (__instance.dummyOBJ.TryGetComponent<HighlightEffect>(ref val)) { val.glowHQColor = Color.green; } } else if (BetterSMT.AllowFreePlacement.Value) { __instance.inCorrectBounds = __instance.InCorrectBounds(); __instance.overlapping = false; __instance.raycastIsCorrect = __instance.RaycastCheck(); __instance.canPlace = __instance.inCorrectBounds && __instance.raycastIsCorrect; HighlightEffect val2 = default(HighlightEffect); if (__instance.dummyOBJ.TryGetComponent<HighlightEffect>(ref val2)) { val2.glowHQColor = (__instance.canPlace ? Color.green : Color.red); } } if (__instance.MainPlayer.GetButtonDown("Build") && __instance.canPlace) { Quaternion rotation; if (__instance.currentElementIndex == 0) { if (!Object.op_Implicit((Object)(object)__instance.currentMovedOBJ.GetComponent<MiniTransportBehaviour>())) { NetworkSpawner component = ((Component)GameData.Instance).GetComponent<NetworkSpawner>(); GameObject currentMovedOBJ = __instance.currentMovedOBJ; Vector3 position = __instance.dummyOBJ.transform.position; rotation = __instance.dummyOBJ.transform.rotation; component.GetMoveData(currentMovedOBJ, position, ((Quaternion)(ref rotation)).eulerAngles); } __instance.currentMovedOBJ = null; __instance.recentlyMoved = true; if (Object.op_Implicit((Object)(object)__instance.dummyOBJ)) { Object.Destroy((Object)(object)__instance.dummyOBJ); } } else { if (__instance.currentTabIndex == 4 && !GameData.Instance.removeLightsLimit && __instance.GetLightsCounter() >= 240) { GameCanvas.Instance.CreateCanvasNotification("lghtlimit00"); return false; } if (GameData.Instance.gameFunds < __instance.decorationCost) { GameCanvas.Instance.CreateCanvasNotification("message6"); } GameData.Instance.CmdAlterFunds(0f - __instance.decorationCost); NetworkSpawner component2 = ((Component)GameData.Instance).GetComponent<NetworkSpawner>(); int currentPropIndex = __instance.currentPropIndex; Vector3 position2 = __instance.dummyOBJ.transform.position; rotation = __instance.dummyOBJ.transform.rotation; component2.CmdSpawnDecoration(currentPropIndex, position2, ((Quaternion)(ref rotation)).eulerAngles); if (__instance.currentTabIndex == 4 && !GameData.Instance.removeLightsLimit) { ((MonoBehaviour)__instance).StartCoroutine(__instance.DelayedSetLightsInfo()); } } } __instance.SharedBehaviour(); return false; } return true; } [HarmonyPatch(typeof(Builder_Main), "BuildableBehaviour")] [HarmonyPrefix] public static bool BuildableBehaviourPatch(Builder_Main __instance) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) if (BetterSMT.CheatPlacement.Value || BetterSMT.AllowFreePlacement.Value) { if (BetterSMT.CheatPlacement.Value) { __instance.correctSector = __instance.CheckCorrectGround(); __instance.correctSector = true; __instance.overlapping = false; __instance.canPlace = true; HighlightEffect val = default(HighlightEffect); if (__instance.dummyOBJ.TryGetComponent<HighlightEffect>(ref val)) { val.glowHQColor = Color.green; } } else if (BetterSMT.AllowFreePlacement.Value) { __instance.correctSector = __instance.CheckCorrectGround(); __instance.overlapping = false; __instance.canPlace = __instance.correctSector; HighlightEffect val2 = default(HighlightEffect); if (__instance.dummyOBJ.TryGetComponent<HighlightEffect>(ref val2)) { val2.glowHQColor = (__instance.canPlace ? Color.green : Color.red); } } else { __instance.overlapping = __instance.pmakerFSM.FsmVariables.GetFsmBool("Overlapping").Value; if (__instance.correctSector && !__instance.overlapping && !__instance.canPlace) { __instance.canPlace = true; HighlightEffect val3 = default(HighlightEffect); if (__instance.dummyOBJ.TryGetComponent<HighlightEffect>(ref val3)) { val3.glowHQColor = Color.green; } } if ((!__instance.correctSector || __instance.overlapping) && __instance.canPlace) { __instance.canPlace = false; HighlightEffect val4 = default(HighlightEffect); if (__instance.dummyOBJ.TryGetComponent<HighlightEffect>(ref val4)) { val4.glowHQColor = Color.red; } } } if (__instance.MainPlayer.GetButtonDown("Build") && __instance.canPlace) { Quaternion rotation; if (__instance.currentElementIndex == 0) { GameObject currentMovedOBJ = __instance.currentMovedOBJ; if (Object.op_Implicit((Object)(object)((currentMovedOBJ != null) ? currentMovedOBJ.GetComponent<NetworkIdentity>() : null))) { NetworkSpawner component = ((Component)GameData.Instance).GetComponent<NetworkSpawner>(); GameObject currentMovedOBJ2 = __instance.currentMovedOBJ; Vector3 position = __instance.dummyOBJ.transform.position; rotation = __instance.dummyOBJ.transform.rotation; component.GetMoveData(currentMovedOBJ2, position, ((Quaternion)(ref rotation)).eulerAngles); __instance.currentMovedOBJ.GetComponent<Data_Container>().RemoveMoveEffect(); __instance.currentMovedOBJ = null; __instance.recentlyMoved = true; if (Object.op_Implicit((Object)(object)__instance.dummyOBJ)) { Object.Destroy((Object)(object)__instance.dummyOBJ); } } } else if (GameData.Instance.gameFunds < __instance.buildableCost) { GameCanvas.Instance.CreateCanvasNotification("message6"); } else { NetworkSpawner component2 = ((Component)GameData.Instance).GetComponent<NetworkSpawner>(); int currentPropIndex = __instance.currentPropIndex; Vector3 position2 = __instance.dummyOBJ.transform.position; rotation = __instance.dummyOBJ.transform.rotation; component2.CmdSpawn(currentPropIndex, position2, ((Quaternion)(ref rotation)).eulerAngles); } } __instance.SharedBehaviour(); return false; } return true; } } [HarmonyPatch(typeof(CardboardBaler))] public static class CardboardBalerPatch { private static readonly FieldInfo BoxesLimitField = typeof(CardboardBaler).GetField("boxesLimitToCreateACardboardBale", BindingFlags.Instance | BindingFlags.NonPublic); public static bool Prepare() { return BetterSMT.CardboardBalerValue.Value != 10; } [HarmonyPatch("BreakingEvent")] [HarmonyPostfix] public static void BreakingEvent(CardboardBaler __instance) { if (BetterSMT.CardboardBalerBreak.Value) { __instance.isBroken = false; } } [HarmonyPostfix] [HarmonyPatch(/*Could not decode attribute arguments.*/)] public static void SetBoxLimitPostfix(CardboardBaler __instance) { BoxesLimitField?.SetValue(__instance, BetterSMT.CardboardBalerValue.Value); } [HarmonyPatch("OnStartServer")] [HarmonyPostfix] private static void OnStartServerPatch() { float num = BetterSMT.CardboardBalerValue.Value; if (Mathf.Approximately(num, 10f)) { return; } PlayMakerFSM[] array = Object.FindObjectsOfType<PlayMakerFSM>(); foreach (PlayMakerFSM val in array) { if (val.FsmName != "Behaviour" || !((Object)((Component)val).gameObject).name.StartsWith("Trash_Recycle")) { continue; } FsmState[] fsmStates = val.FsmStates; foreach (FsmState val2 in fsmStates) { FsmStateAction[] actions = val2.Actions; foreach (FsmStateAction val3 in actions) { FloatOperator val4 = (FloatOperator)(object)((val3 is FloatOperator) ? val3 : null); if (val4 != null && Mathf.Approximately(val4.float1.Value, 15f)) { val4.float1.Value = num; } } } } } } [HarmonyPatch(typeof(CustomCameraController), "LateUpdate")] public class LateUpdateRaycastPatch { private static bool isThirdPersonEnabled; private static void Postfix(CustomCameraController __instance) { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance == (Object)null) && !FsmVariables.GlobalVariables.GetFsmBool("InChat").Value && !FsmVariables.GlobalVariables.GetFsmBool("inEvent").Value && !FsmVariables.GlobalVariables.GetFsmBool("inOptions").Value && !FsmVariables.GlobalVariables.GetFsmBool("isBeingPushed").Value && !FsmVariables.GlobalVariables.GetFsmBool("inCameraEvent").Value && !FsmVariables.GlobalVariables.GetFsmBool("inVehicle").Value && BetterSMT.ThirdPersonToggle.Value) { KeyboardShortcut value = BetterSMT.ThirdPersonHotkey.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { isThirdPersonEnabled = !isThirdPersonEnabled; } __instance.inEmoteEvent = isThirdPersonEnabled; Cinemachine3rdPersonFollow thirdPersonFollow = __instance.thirdPersonFollow; if ((Object)(object)thirdPersonFollow != (Object)null) { thirdPersonFollow.CameraDistance = (isThirdPersonEnabled ? 2f : 0f); thirdPersonFollow.CameraCollisionFilter = (isThirdPersonEnabled ? __instance.thirdPersonDefaultLayerMask : LayerMask.op_Implicit(0)); } __instance.ShowCharacter(isThirdPersonEnabled); } } } [HarmonyPatch(typeof(Data_Container))] public class Patch_Data_Container { [HarmonyPatch("BreakingEvent")] [HarmonyPostfix] public static void BreakingEvent(Data_Container __instance) { if (BetterSMT.SelfCheckoutBreak.Value) { __instance.isBroken = false; } } [HarmonyPatch("AddItemToRow")] [HarmonyPrefix] private static bool AddItemToRowPatch(Data_Container __instance, int containerNumber, int productIDToAdd) { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) if (!BetterSMT.QuickStocking.Value || !BetterSMT.PalletProduct.Value || !BetterSMT.AllProduct.Value) { return true; } if (!((Component)FirstPersonController.Instance).GetComponent<PlayerPermissions>().RequestRP()) { return false; } bool flag = !((NetworkBehaviour)__instance).isServer && FsmVariables.GlobalVariables.FindFsmBool("HighLatencyMode").Value; if (flag && __instance.highLatencyCooldown) { return false; } if (!Object.op_Implicit((Object)(object)__instance.productlistComponent)) { __instance.productlistComponent = ((Component)GameData.Instance).GetComponent<ProductListing>(); } GameObject val = __instance.productlistComponent.productPrefabs[productIDToAdd]; Vector3 size = val.GetComponent<BoxCollider>().size; if (!BetterSMT.PalletProduct.Value && __instance.isVolumeRestricted && size.x * size.y * size.z < __instance.productVolumeLimit) { GameCanvas.Instance.CreateCanvasNotification("message20"); return false; } if (!BetterSMT.AllProduct.Value && val.GetComponent<Data_Product>().productContainerClass != __instance.containerClass) { GameCanvas.Instance.CreateCanvasNotification("message0"); return false; } bool isStackable = val.GetComponent<Data_Product>().isStackable; int num = Mathf.FloorToInt(__instance.shelfLength / (size.x * 1.1f)); num = Mathf.Clamp(num, 1, 100); int num2 = Mathf.FloorToInt(__instance.shelfWidth / (size.z * 1.1f)); num2 = Mathf.Clamp(num2, 1, 100); int num3 = num * num2; if (isStackable) { int num4 = Mathf.FloorToInt(__instance.shelfHeight / (size.y * 1.1f)); num4 = Mathf.Clamp(num4, 1, 100); num3 = num * num2 * num4; } int num5 = containerNumber * 2; int num6 = __instance.productInfoArray[num5]; int num7 = __instance.productInfoArray[num5 + 1]; if (num7 >= num3) { GameCanvas.Instance.CreateCanvasNotification("message1"); return false; } if (num6 != productIDToAdd && num6 != -1 && num7 != 0) { GameCanvas.Instance.CreateCanvasNotification("message2"); return false; } PlayerNetwork component = ((Component)FirstPersonController.Instance).GetComponent<PlayerNetwork>(); if (flag) { ((MonoBehaviour)__instance).StartCoroutine(__instance.HighLatencyCoroutine()); int num8 = num3 - num7; int extraParameter = component.extraParameter2; int num9 = Mathf.Min(num8, extraParameter); if (num9 <= 0) { GameCanvas.Instance.CreateCanvasNotification("message1"); return false; } component.extraParameter2 -= num9; num7 += num9; AchievementsManager.Instance.CmdAddAchievementPoint(1, num9); } else { int extraParameter2 = component.extraParameter2; int num10 = num3 - num7; int num11 = Mathf.Min(extraParameter2, num10); if (num11 <= 0) { GameCanvas.Instance.CreateCanvasNotification("message1"); return false; } AchievementsManager.Instance.CmdAddAchievementPoint(1, num11); component.extraParameter2 -= num11; num7 += num11; } GameData.Instance.PlayPopSound(); __instance.productInfoArray[num5 + 1] = num7; __instance.CmdUpdateArrayValues(num5, productIDToAdd, num7); return false; } } [HarmonyPatch] public class Patch_DemolishableManager { private static MethodBase TargetMethod() { return AccessTools.Method(typeof(DemolishableManager), "UserCode_CmdDemolishItem__Int32__Int32", new Type[2] { typeof(int), typeof(int) }, (Type[])null); } private static bool Prefix(DemolishableManager __instance, int parentIndex, int whichObjectToDemolish) { if (parentIndex >= __instance.demolishableParentRootOBJ.transform.childCount || parentIndex >= __instance.demolishableValues.Length) { return false; } GameObject gameObject = ((Component)__instance.demolishableParentRootOBJ.transform.GetChild(parentIndex)).gameObject; if (whichObjectToDemolish >= gameObject.transform.childCount || parentIndex >= __instance.demolishingCosts.Length) { return false; } float num = __instance.demolishingCosts[parentIndex]; float num2 = ((BetterSMT.PillarPrice.Value != num) ? BetterSMT.PillarPrice.Value : num); if (num2 > GameData.Instance.gameFunds) { return false; } ((Component)__instance).GetComponent<GameData>().AlterFundsFromEmployee(0f - num2); GameData component = ((Component)__instance).GetComponent<GameData>(); component.otherCosts += num2; string text = __instance.demolishableValues[parentIndex]; if (text != "") { char c = text[whichObjectToDemolish]; char c2 = __instance.nullValue[0]; if (c != c2) { return false; } } __instance.demolishableValues[parentIndex] = __instance.AssembleValue(parentIndex, whichObjectToDemolish); if (!BetterSMT.PillarRubble.Value) { ((MonoBehaviour)__instance).StartCoroutine((IEnumerator)AccessTools.Method(((object)__instance).GetType(), "DelayedDemolishEffectInstantiation", (Type[])null, (Type[])null).Invoke(__instance, new object[2] { parentIndex, whichObjectToDemolish })); } __instance.RpcDemolishItem(parentIndex, whichObjectToDemolish); return false; } } [HarmonyPatch(typeof(EmployeesDataGeneration))] public class EmployeesDataGenerationPatch { [HarmonyPatch("GenerateTodayEmployeesData")] [HarmonyPrefix] private static bool GenerateTodayEmployeesDataPatch(EmployeesDataGeneration __instance) { if (BetterSMT.EmployeesLevel.Value != 0) { EmployeeLevelPatch(__instance); return false; } return true; } public static void EmployeeLevelPatch(EmployeesDataGeneration __instance) { int num = Random.Range(0, 5); int num2 = Random.Range(5, 10); for (int i = 0; i < 10; i++) { int num3 = Random.Range(0, 7); int[] array = new int[7]; if (i == num) { for (int j = 0; j < array.Length; j++) { array[j] = Random.Range((j % 2 == 0) ? 6 : 7, 11); } } else if (i == num2) { for (int k = 0; k < array.Length; k++) { array[k] = Random.Range((k % 2 == 0) ? 5 : 4, 11); } } else { for (int l = 0; l < array.Length; l++) { array[l] = Random.Range(1, 11); } } if (BetterSMT.EmployeesLevel.Value != 0) { for (int m = 0; m < array.Length; m++) { array[m] = BetterSMT.EmployeesLevel.Value; } } int num4 = (array[0] + array[1] + array[2] + array[3]) * Random.Range(3, 6) + Random.Range(-2, 3) * 10; num4 = Mathf.Clamp(num4, 30, 1000); string text = num3 + "|" + num4 + "|" + string.Join("|", array); __instance.managerComponent.todaysEmployeesData[i] = text; __instance.managerComponent.UpdateTodayEmployeesOnClients(i, text); } } } [HarmonyPatch(typeof(GameCanvas))] internal class NotificationHandler { [HarmonyPatch("Update")] [HarmonyPostfix] public static void NotificationHandler_Postfix(GameCanvas __instance, ref bool ___inCooldown) { if (!BetterSMT.ToggleDoublePrice.Value || !BetterSMT.notify) { return; } ___inCooldown = false; BetterSMT.notify = false; string text = "`"; switch (BetterSMT.notificationType) { default: return; case "priceToggle": text = text + "Double Price: " + (BetterSMT.doublePrice ? "ON" : "OFF"); break; case "roundDownSwitch": text = text + "Rounding to nearest " + (BetterSMT.NearestTen.Value ? "ten" : "five"); if (!BetterSMT.roundDown.Value) { text += "\r\n(Currently disabled)"; } break; case "roundDownToggle": text = text + "Rounding has been " + (BetterSMT.roundDown.Value ? "enabled" : "disabled"); break; } __instance.CreateCanvasNotification(text); } } [HarmonyPatch(typeof(GameData))] public class GameDataPatch { public class BetterSMTLoanSystem : NetworkBehaviour { [Command(requiresAuthority = false)] public void CmdPayLoanEarly() { DebtManager component = ((Component)GameData.Instance).GetComponent<DebtManager>(); int networkloanAmount = component.NetworkloanAmount; if (networkloanAmount <= 0) { BetterSMT.CreateImportantNotification("No active loan to pay."); return; } if (GameData.Instance.gameFunds < (float)networkloanAmount) { BetterSMT.CreateImportantNotification("Not enough funds to pay off the loan."); return; } GameData.Instance.CmdAlterFundsWithoutExperience((float)(-networkloanAmount)); component.NetworkloanAmount = 0; component.NetworkloanPaymentPerDay = 0; int num = default(int); float num2 = default(float); int num3 = default(int); int num4 = default(int); string text2 = default(string); for (int i = 0; i < component.NetworkcurrentInvoicesData.Length; i++) { string text = component.NetworkcurrentInvoicesData[i]; if (!string.IsNullOrEmpty(text)) { component.GetInvoiceDataValues(text, ref num, ref num2, ref num3, ref num4, ref text2); if (num == 0) { component.NetworkcurrentInvoicesData[i] = ""; } } } if ((Object)(object)component.loanDisclaimerContainerOBJ != (Object)null && component.loanDisclaimerContainerOBJ.activeSelf) { component.loanDisclaimerContainerOBJ.SetActive(false); } component.GenerateExistingDebtsInUI(); BetterSMT.CreateImportantNotification("Loan paid off early."); } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__3_0; internal void <UpdateInvoiceMenu>b__3_0() { if ((Object)(object)loanSystemInstance != (Object)null && NetworkClient.active) { loanSystemInstance.CmdPayLoanEarly(); } } } public static readonly Dictionary<int, string> productNames = new Dictionary<int, string> { { 0, "Pasta Penne" }, { 1, "Water Bottle" }, { 2, "Honey Cereals" }, { 3, "Rice" }, { 4, "Salt" }, { 5, "Sugar" }, { 6, "Margarine" }, { 7, "Flour" }, { 8, "Apple Juice" }, { 9, "Olive Oil" }, { 10, "Ketchup" }, { 11, "Sliced Bread" }, { 12, "Pepper" }, { 13, "Orange Juice" }, { 14, "Barbaque Sauce" }, { 15, "Mustard Sauce" }, { 16, "Spaghetti Box" }, { 17, "Tuna Pate" }, { 18, "Fiber Cereals" }, { 19, "Supreme Flour" }, { 20, "Black Coffee" }, { 21, "Egg Box" }, { 22, "Houmous" }, { 23, "White Flour" }, { 24, "Cane Sugar Box" }, { 25, "Sugar" }, { 26, "Macarroni" }, { 27, "Ecologic Sugar" }, { 28, "Brown Sugar" }, { 29, "Sunflower Oil" }, { 30, "Mash Potatoes" }, { 31, "Potato Bag" }, { 32, "Espresso Coffee" }, { 33, "Basmati Rice" }, { 34, "Long Grain Rice" }, { 35, "Coffee" }, { 36, "Supreme Pasta" }, { 37, "Chocolate Cereals" }, { 38, "Premium Water" }, { 39, "Spring Water" }, { 40, "Powdered Sugar" }, { 41, "Sugar - Big Box" }, { 42, "Brown Sugar - Big Box" }, { 43, "Emmental Cheese" }, { 44, "Gruyere Cheese" }, { 45, "Skimmed Cheese" }, { 46, "Fruit Yoghurt" }, { 47, "Vanilla Yoghurt" }, { 48, "Milk Brick" }, { 49, "Butter" }, { 50, "Parmigiano Cheese" }, { 51, "Reggiano Cheese" }, { 52, "Mozzarella Cheese" }, { 53, "Skimmed Yoghurt" }, { 54, "Cola Pack" }, { 55, "Soda Pack" }, { 56, "Decaf Soda Pack" }, { 57, "Soda Bottle" }, { 58, "Cola Bottle" }, { 59, "Sugar Free Soda Bottle" }, { 60, "Premium Soda" }, { 61, "Pizza Barbaque" }, { 62, "Fondue" }, { 63, "Crocanti Ham" }, { 64, "Ham Cheese Crepe" }, { 65, "French Fries" }, { 66, "Crispy Potato Pops" }, { 67, "Green Beans" }, { 68, "Four Cheese Pizza" }, { 69, "Four Seasons Pizza" }, { 70, "Vegetable Mix" }, { 71, "Chicken Mix" }, { 72, "Bolognaise Lasagna" }, { 73, "Vegetable Lasagna" }, { 74, "Toothpaste" }, { 75, "Toilet Paper" }, { 76, "Hand Soap" }, { 77, "Avocado Shampoo" }, { 78, "Egg Shampoo" }, { 79, "Bath Gel" }, { 80, "Toilet Paper" }, { 81, "Mango Soap" }, { 82, "Extra Soft Shampoo" }, { 83, "Jojoba Honey Shampoo" }, { 84, "Argan Oil Shampoo" }, { 85, "Paper Towel" }, { 86, "Double Side Toilet Paper" }, { 87, "Lemon Soap" }, { 88, "Premium Bath Gel" }, { 89, "Shampoo For Babies" }, { 90, "Detergent" }, { 91, "Stain Remover" }, { 92, "Glass Cleaner" }, { 93, "Detergent Tables" }, { 94, "Dishwasher" }, { 95, "Bleach" }, { 96, "Bleach - Big Bottle" }, { 97, "Softener" }, { 98, "Premium Detergent" }, { 99, "Insecticide" }, { 100, "Cleaning Cloths" }, { 101, "Premium Capsules" }, { 102, "Premium Bleach" }, { 103, "Ammonia" }, { 104, "Cookie Jar" }, { 105, "Maxi Cone" }, { 106, "Chocolate Spread" }, { 107, "Chocolate Powder" }, { 108, "Chips" }, { 109, "Sweet Bonbek" }, { 110, "Peach Jam" }, { 111, "Ice Cream Box" }, { 112, "Chocolate Box" }, { 113, "Chocolate Biscuit" }, { 114, "Vanilate Biscuit" }, { 115, "Madeleine" }, { 116, "Strawberry Jam" }, { 117, "Peanut Butter" }, { 118, "Chipos" }, { 119, "Marshmallow" }, { 120, "Lemon Biscuit" }, { 121, "Hazelnut Biscuit" }, { 122, "Premium Ice Cream" }, { 123, "Honey" }, { 124, "Premium Chocolate Box" }, { 125, "Foditos" }, { 126, "Premium Cake" }, { 127, "Chopped Beef" }, { 128, "Pure Beef" }, { 129, "Veal" }, { 130, "Chicken Wings" }, { 131, "Chicken" }, { 132, "Parma Ham" }, { 133, "Sliced Ham" }, { 134, "Peas - Big" }, { 135, "Tuna - Big" }, { 136, "Red Beans" }, { 137, "Cat Food" }, { 138, "Cat Food" }, { 139, "Dog Food" }, { 140, "Green Tea" }, { 141, "Lemon Tea" }, { 142, "Black Tea" }, { 143, "Peppermint" }, { 144, "Mint" }, { 145, "Valerian" }, { 146, "Big Sushi" }, { 147, "Small Sushi" }, { 148, "Smoked Salmon" }, { 149, "Crab Sticks" }, { 150, "Book - Electromagnetic" }, { 151, "Book - Surprise" }, { 152, "Book - ABC" }, { 153, "Book - Mother And Child" }, { 154, "Book - Colors" }, { 155, "Book - Piticha" }, { 156, "Book - OnceUpon" }, { 157, "Book - Krok" }, { 158, "Book - Adventures" }, { 159, "Book - Donnine" }, { 160, "Book - Vintage" }, { 161, "Book - I Wont Share" }, { 162, "Beer Pack" }, { 163, "Beer Pack" }, { 164, "Beer Pack" }, { 165, "Beer Barrel" }, { 166, "Beer Barrel" }, { 167, "Vodka" }, { 168, "Red Wine" }, { 169, "Rose Wine" }, { 170, "White Wine" }, { 171, "Beer Barrel" }, { 172, "Premium Vodka" }, { 173, "Japanese Whisky" }, { 174, "Premium Whisky" }, { 175, "Premium Whisky" }, { 176, "Hydrogen Peroxide" }, { 177, "Disinfectant" }, { 178, "Ibuprofen" }, { 179, "Paracetamol" }, { 180, "Adhesive Bandages" }, { 181, "Laxative" }, { 182, "Antihistamine" }, { 183, "Zinc Supplement" }, { 184, "Antioxidant" }, { 185, "Fish Oil" }, { 186, "Algae Pills" }, { 187, "Vitamins" }, { 188, "Melatonin" }, { 189, "Sunscreen" }, { 190, "Stretch Cream" }, { 191, "Red Apple Tray" }, { 192, "Green Apple Tray" }, { 193, "Clementine Tray" }, { 194, "Orange Tray" }, { 195, "Pear Tray" }, { 196, "Lemon Tray" }, { 197, "Mango Tray" }, { 198, "Avocado Tray" }, { 199, "Kiwi Tray" }, { 200, "Papaya Tray" }, { 201, "Strawberry Tray" }, { 202, "Cherry Tray" }, { 203, "Artichoke Tray" }, { 204, "Zucchini Tray" }, { 205, "Carrot Tray" }, { 206, "Tomato Tray" }, { 207, "Potato Tray" }, { 208, "Onion Tray" }, { 209, "Banana Pack" }, { 210, "Melon" }, { 211, "Pineapple" }, { 212, "Pumpkin" }, { 213, "Watermelon" }, { 214, "Baby Food: Vegetables" }, { 215, "Baby Food: Fish" }, { 216, "Baby Food: Fruits" }, { 217, "Baby Food: Meat" }, { 218, "Nutritive Milk Mix" }, { 219, "Nutritive Milk Powder" }, { 220, "Ecologic Diapers" }, { 221, "Basic Diapers" }, { 222, "Toddler Diapers" }, { 223, "Premium Diapers" }, { 224, "Aloe Baby Wipes " }, { 225, "Basic Baby Wipes" }, { 226, "Baby Powder" }, { 227, "Orange Soda" }, { 228, "Pineapple Soda" }, { 229, "Tropical Soda" }, { 230, "Green Tea Drink" }, { 231, "Red Tea Drink" }, { 232, "Lemon Tea Drink" }, { 233, "Cold Brew Coffee" }, { 234, "Blueberry Energy Drink" }, { 235, "Guava Energy Drink" }, { 236, "Lima Energy Drink" }, { 237, "Fruit Punch Energy Drink" }, { 238, "Mango Energy Drink" }, { 239, "Cola Energy Drink" }, { 240, "Sugar Free Energy Drink" }, { 241, "Basic Strawberry Ice Cream" }, { 242, "Lemon Ice Cream" }, { 243, "Coffee Ice Cream" }, { 244, "Stracciatella Ice Cream" }, { 245, "Strawberry Meringue Ice Cream" }, { 246, "Caramel Ice Cream" }, { 247, "Premium Strawberry Ice Cream" }, { 248, "Strawberry Cheesecake Ice Cream" }, { 249, "Premium Caramel Ice Cream" }, { 250, "Pink Strawberry Ice Cream" }, { 251, "Alcoholic Ice Cream" }, { 252, "Chickpeas" }, { 253, "Meatballs" }, { 254, "Lentils" }, { 255, "Tomato Soup" }, { 256, "Canned Corn" }, { 257, "Canned Peas" }, { 258, "Strawberry Seeds" }, { 259, "Raspberry Seeds" }, { 260, "Blueberry Seeds" }, { 261, "Pineapple Seeds" }, { 262, "Meyer Lemon Seeds" }, { 263, "Tomato Seeds" }, { 264, "Pepper Seeds" }, { 265, "Cucumber Seeds" }, { 266, "Radish Seeds" }, { 267, "Carrots Seeds" }, { 268, "Lawn Seeds" }, { 269, "Poppy Seeds" }, { 270, "Tulip Seeds" }, { 271, "Sunflower Seeds" }, { 272, "Petunia Seeds" }, { 273, "Hand Rake (A)" }, { 274, "Hand Rake (B)" }, { 275, "Hand Shovel" }, { 276, "Hand Cultivator" }, { 277, "Potting Soil" }, { 278, "Fertilizer" }, { 279, "Plant Pot Dish" }, { 280, "Plant Pot" }, { 281, "AA Batteries" }, { 282, "AAA Batteries" }, { 283, "C Batteries" }, { 284, "9V Batteries" }, { 285, "Universal TV Remote" }, { 286, "Universal Phone Charger" }, { 287, "Basic Prepaid Phone" }, { 288, "Basic Mouse" }, { 289, "Wifi Dongle" }, { 290, "Basic Earbuds" }, { 291, "Basic Keyboard" }, { 292, "Basic Gamepad" }, { 293, "USB Flash Drive (128GB)" }, { 294, "USB Flash Drive (256GB)" }, { 295, "USB Flash Drive (512GB)" }, { 296, "USB Flash Drive (1TB)" }, { 297, "Basic Speaker" }, { 298, "Basic Headphones" }, { 299, "Basic Gaming Console" }, { 300, "Garlic Tray" }, { 301, "Mushroom Tray" }, { 302, "Bell Pepper Tray" }, { 303, "Lettuce Tray" }, { 304, "Coconut" }, { 305, "Cauliflower" }, { 306, "Peanuts" }, { 307, "Almonds" }, { 308, "Hazelnuts" }, { 309, "Pistachios" }, { 310, "Raisins" }, { 311, "Cashew Nuts" }, { 312, "Shelled Walnuts" }, { 313, "Coconut Chips" }, { 314, "Baking Powder" }, { 315, "Baking Soda" }, { 316, "Cake Mix" }, { 317, "Cocoa Powder" }, { 318, "Cornstarch" }, { 319, "Icing Tube" }, { 320, "Candy Sprinkles" }, { 321, "Vanilla Extract" } }; private static BetterSMTLoanSystem loanSystemInstance; [HarmonyPatch("OnStartClient")] [HarmonyPostfix] private static void AutopayInvoices(DebtManager __instance) { if (!((Object)(object)__instance == (Object)null)) { ((Component)__instance).GetComponent<DebtManager>().autopayInvoices = BetterSMT.AutoPayAllInvoices?.Value ?? false; } } [HarmonyPatch("OnStartClient")] [HarmonyPostfix] private static void UpdateInvoiceMenu() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown if (!BetterSMT.LoanEarly.Value) { return; } GameObject val = GameObject.Find("Interactables/Canvas_Manager/Tabs/Invoices_Tab/"); Transform obj = val.transform.Find("PayThisInvoiceButton"); GameObject val2 = ((obj != null) ? ((Component)obj).gameObject : null); GameObject val3 = new GameObject("PayInvoiceEarlyButton", new Type[4] { typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(Button) }); val3.transform.SetParent(val.transform, false); RectTransform component = val3.GetComponent<RectTransform>(); RectTransform component2 = val2.GetComponent<RectTransform>(); component.anchorMin = component2.anchorMin; component.anchorMax = component2.anchorMax; component.pivot = component2.pivot; component.sizeDelta = component2.sizeDelta; component.anchoredPosition = new Vector2(431f, -109f); Image component3 = val3.GetComponent<Image>(); Image component4 = val2.GetComponent<Image>(); component3.sprite = component4.sprite; component3.type = component4.type; ((Graphic)component3).color = ((Graphic)component4).color; GameObject val4 = new GameObject("PayInvoiceEarly_Text", new Type[3] { typeof(RectTransform), typeof(CanvasRenderer), typeof(TextMeshProUGUI) }); val4.transform.SetParent(val3.transform, false); RectTransform component5 = val4.GetComponent<RectTransform>(); component5.anchorMin = Vector2.zero; component5.anchorMax = Vector2.one; component5.offsetMin = Vector2.zero; component5.offsetMax = Vector2.zero; TextMeshProUGUI component6 = val4.GetComponent<TextMeshProUGUI>(); ((TMP_Text)component6).text = "Pay Loan Early"; ((TMP_Text)component6).alignment = (TextAlignmentOptions)514; ((TMP_Text)component6).fontSize = 24f; ((Graphic)component6).color = Color.black; TextMeshProUGUI componentInChildren = val2.GetComponentInChildren<TextMeshProUGUI>(); ((TMP_Text)component6).font = ((TMP_Text)componentInChildren).font; ((Graphic)component6).material = ((Graphic)componentInChildren).material; Button component7 = val3.GetComponent<Button>(); ButtonClickedEvent onClick = component7.onClick; object obj2 = <>c.<>9__3_0; if (obj2 == null) { UnityAction val5 = delegate { if ((Object)(object)loanSystemInstance != (Object)null && NetworkClient.active) { loanSystemInstance.CmdPayLoanEarly(); } }; <>c.<>9__3_0 = val5; obj2 = (object)val5; } ((UnityEvent)onClick).AddListener((UnityAction)obj2); Button component8 = val2.GetComponent<Button>(); ((Selectable)component7).transition = ((Selectable)component8).transition; ((Selectable)component7).colors = ((Selectable)component8).colors; ((Selectable)component7).navigation = ((Selectable)component8).navigation; if (!((NetworkBehaviour)GameData.Instance).isServer) { val3.SetActive(false); } } [HarmonyPatch("Awake")] [HarmonyPostfix] private static void EnsureLoanSystemComponent(GameData __instance) { loanSystemInstance = ((Component)__instance).GetComponent<BetterSMTLoanSystem>(); if ((Object)(object)loanSystemInstance == (Object)null) { loanSystemInstance = ((Component)__instance).gameObject.AddComponent<BetterSMTLoanSystem>(); } } [HarmonyPatch("ServerCalculateNewInflation")] [HarmonyPostfix] public static void OptimizeProductPrices() { if (!BetterSMT.AutoAdjustPriceDaily.Value) { return; } ProductListing instance = ProductListing.Instance; GameObject[] productPrefabs = instance.productPrefabs; float[] tierInflation = instance.tierInflation; float value = BetterSMT.AutoAdjustPriceDailyValue.Value; for (int i = 0; i < productPrefabs.Length; i++) { GameObject obj = productPrefabs[i]; Data_Product val = ((obj != null) ? obj.GetComponent<Data_Product>() : null); if (!((Object)(object)val == (Object)null)) { float basePricePerUnit = val.basePricePerUnit; int productTier = val.productTier; float num = ((productTier >= 0 && productTier < tierInflation.Length) ? tierInflation[productTier] : 1f); float num2 = basePricePerUnit * num * value; float num3 = Mathf.Floor(num2 * 100f) / 100f; instance.CmdUpdateProductPrice(i, num3); } } } [HarmonyPatch("OnStartClient")] [HarmonyPostfix] public static void ShowCounters() { if (BetterSMT.ShowPing.Value) { EnableUIElement("MasterOBJ/MasterCanvas/Ping", "Ping"); } if (BetterSMT.ShowFPS.Value)