Some mods target the Mono version of the game, which is available by opting into the Steam beta branch "alternate"
Decompiled source of MoreRealisticLaundering v1.2.7
MoreRealisticLaundering.dll
Decompiled 3 days 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.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using HarmonyLib; using Il2CppFluffyUnderware.DevTools.Extensions; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppScheduleOne.Dialogue; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.Property; using Il2CppScheduleOne.Tools; using Il2CppScheduleOne.UI; using Il2CppScheduleOne.Vehicles; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Il2CppTMPro; using MelonLoader; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using MoreRealisticLaundering; using MoreRealisticLaundering.Config; using MoreRealisticLaundering.PhoneApp; using MoreRealisticLaundering.Util; using Newtonsoft.Json; 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: MelonInfo(typeof(MRLCore), "MoreRealisticLaundering (Forked by HazDS)", "1.2.7", "KampfBallerina", null)] [assembly: MelonGame("TVGS", "Schedule I")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("MoreRealisticLaundering")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+374fe457c9a5584c4d42707b6ea5e433fb0aa193")] [assembly: AssemblyProduct("MoreRealisticLaundering")] [assembly: AssemblyTitle("MoreRealisticLaundering")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.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 MoreRealisticLaundering { public class MRLCore : MelonMod { [CompilerGenerated] private sealed class <ApplyPropertyConfig>d__13 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public MRLCore <>4__this; private int <waitAttempts>5__1; private int <unownedCount>5__2; private int <ownedCount>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ApplyPropertyConfig>d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; MelonLogger.Msg("Found unowned businesses. Processing..."); if (!<>4__this.isLegitVersion) { goto IL_0073; } goto IL_0136; case 1: <>1__state = -1; goto IL_0073; case 2: { <>1__state = -1; <waitAttempts>5__1++; <unownedCount>5__2 = Business.UnownedBusinesses?.Count ?? 0; <ownedCount>5__3 = Business.OwnedBusinesses?.Count ?? 0; break; } IL_0073: if (!launderingApp._isLaunderingAppLoaded) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } launderingApp.AddEntryFromTemplate("Shred Shack", "Shred Shack", "We're all about the grind, bro — street and money.", null, launderingApp.DansHardwareTemplate, Color32.op_Implicit(ColorUtil.GetColor("Redpurple")), "Jeff.png", null, isFirstEntry: true); launderingApp.AddEntryFromTemplate("Hyland Auto", "Hyland Auto", "We make you drive crazy.", null, launderingApp.DansHardwareTemplate, Color32.op_Implicit(ColorUtil.GetColor("Dark Green")), "HylandAuto.png", null, isFirstEntry: true); launderingApp.AddEntryFromTemplate("Rays Real Estate", "Ray's Real Estate", "No credit check. No judgment. Just opportunity.", null, launderingApp.DansHardwareTemplate, Color32.op_Implicit(ColorUtil.GetColor("Light Purple")), "RaysRealEstate.png", null, isFirstEntry: true); goto IL_0136; IL_0136: <waitAttempts>5__1 = 0; <unownedCount>5__2 = Business.UnownedBusinesses?.Count ?? 0; <ownedCount>5__3 = Business.OwnedBusinesses?.Count ?? 0; break; } if (<unownedCount>5__2 + <ownedCount>5__3 == 0 && <waitAttempts>5__1 < 30) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; } <>4__this.ApplyPricesToProperties(); <>4__this.ApplyPricesToPropertyListings(); <>4__this.ApplyPricesToVehicles(); <>4__this.ApplyPricesToSkateboards(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <StartCoroutinesAfterDelay>d__9 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public MRLCore <>4__this; private bool <delayedInit>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <StartCoroutinesAfterDelay>d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <delayedInit>5__1 = false; break; case 1: <>1__state = -1; break; } if (!<delayedInit>5__1 && !<>4__this.isLegitVersion) { <delayedInit>5__1 = true; <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; } MelonCoroutines.Start(Instance.WaitAndApplyCaps()); if (!<>4__this.isLegitVersion) { MelonCoroutines.Start(launderingApp.InitializeLaunderApp()); } MelonCoroutines.Start(Instance.ApplyPropertyConfig()); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <WaitAndApplyCaps>d__17 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public MRLCore <>4__this; private Enumerator<Business> <>s__1; private Business <business>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitAndApplyCaps>d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; <business>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (Business.OwnedBusinesses != null) { <>s__1 = Business.OwnedBusinesses.GetEnumerator(); while (<>s__1.MoveNext()) { <business>5__2 = <>s__1.Current; if (Business.OwnedBusinesses.Count > 0) { if ((Object)(object)<business>5__2 == (Object)null) { MelonLogger.Warning("Encountered a null business in OwnedBusinesses. Skipping..."); continue; } if (!<>4__this.processedBusinesses.Contains(((Object)<business>5__2).name)) { if (Instance.config != null) { Instance.ApplyCap(<business>5__2); <>4__this.processedBusinesses.Add(((Object)<business>5__2).name); if (!<>4__this.createdBusinessesEntries.Contains(((Object)<business>5__2).name)) { <>4__this.createdBusinessesEntries.Add(((Object)<business>5__2).name); Instance.CreateAppEntryForBusiness(<business>5__2); } } else { MelonLogger.Warning("Config is not loaded yet. Skipping ApplyCap for business: " + ((Object)<business>5__2).name); } } if (<>4__this.processedBusinesses.Count >= 4) { <>4__this.isWaitAndApplyCapsRunning = false; return false; } } else { MelonLogger.Warning("Didn't found OwnedBusinesses yet. Retrying..."); } <business>5__2 = null; } <>s__1 = null; } else { MelonLogger.Warning("OwnedBusinesses is null. Retrying..."); } <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; 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(); } } [CompilerGenerated] private sealed class <WaitForLaunderingAppAndCreateEntry>d__20 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Business business; public MRLCore <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitForLaunderingAppAndCreateEntry>d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (!launderingApp._isLaunderingAppLoaded) { <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; } <>4__this.CreateAppEntryForBusiness(business); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private bool isFirstStart = true; private bool isLegitVersion = false; public readonly HashSet<string> processedBusinesses = new HashSet<string>(); public readonly HashSet<string> createdBusinessesEntries = new HashSet<string>(); public Sprite CreditCardIcon; public ConfigState config; public static LaunderingApp launderingApp = new LaunderingApp(); public Dictionary<string, float> maxiumumLaunderValues; public Dictionary<string, string> aliasMap; public Dictionary<string, string> vehicleAliasMap; public Dictionary<string, string> skateboardAliasMap; private readonly HashSet<string> createdAppEntries = new HashSet<string>(); public bool isWaitAndApplyCapsRunning = false; private readonly HashSet<LaunderingOperation> boostedOperations = new HashSet<LaunderingOperation>(); public DialogueController_SkateboardSeller shackShopDialogueController; public MoneyManager moneyManager; public NotificationsManager notificationsManager; public VehicleManager vehicleManager; public static MRLCore Instance { get; private set; } public override void OnInitializeMelon() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown ((MelonBase)this).LoggerInstance.Msg("Initialized."); Harmony val = new Harmony("com.mrlcore.morerealisticlaundering"); val.PatchAll(Assembly.GetExecutingAssembly()); ((MelonBase)this).LoggerInstance.Msg("Harmony patches applied."); try { Type typeFromHandle = typeof(DialogueHandler_EstateAgent); BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; MethodInfo method = typeFromHandle.GetMethod("ModifyChoiceText", bindingAttr); MethodInfo method2 = typeof(MRLCore).GetMethod("ModifyChoiceText_Prefix", BindingFlags.Static | BindingFlags.Public); if (method != null && method2 != null) { val.Patch((MethodBase)method, new HarmonyMethod(method2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } MethodInfo method3 = typeFromHandle.GetMethod("CheckChoice", bindingAttr); MethodInfo method4 = typeof(MRLCore).GetMethod("CheckChoice_Prefix", BindingFlags.Static | BindingFlags.Public); if (method3 != null && method4 != null) { val.Patch((MethodBase)method3, new HarmonyMethod(method4), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } ((MelonBase)this).LoggerInstance.Msg("DialogueHandler_EstateAgent patches applied."); } catch (Exception ex) { ((MelonBase)this).LoggerInstance.Error("Failed to patch DialogueHandler_EstateAgent: " + ex.Message); } Instance = this; Instance.maxiumumLaunderValues = new Dictionary<string, float>(); Instance.aliasMap = new Dictionary<string, string> { { "Laundromat", "Laundromat" }, { "Taco Ticklers", "Taco Ticklers" }, { "TacoTicklers", "Taco Ticklers" }, { "Car Wash", "Car Wash" }, { "CarWash", "Car Wash" }, { "Post Office", "Post Office" }, { "PostOffice", "Post Office" }, { "Motel", "Motel" }, { "MotelRoom", "Motel" }, { "Motel Room", "Motel" }, { "Sweatshop", "Sweatshop" }, { "Bungalow", "Bungalow" }, { "Barn", "Barn" }, { "Docks Warehouse", "Docks Warehouse" }, { "DocksWarehouse", "Docks Warehouse" }, { "Manor", "Manor" }, { "StorageUnit", "Storage Unit" }, { "Storage Unit", "Storage Unit" } }; Instance.vehicleAliasMap = new Dictionary<string, string> { { "Shitbox", "Shitbox" }, { "Shitbox_Police", "Shitbox" }, { "Veeper", "Veeper" }, { "Van", "Veeper" }, { "SUV", "Bruiser" }, { "SUV_Police", "Bruiser" }, { "Bruiser", "Bruiser" }, { "Pickup", "Dinkler" }, { "Pickup_Police", "Dinkler" }, { "Dinkler", "Dinkler" }, { "Hounddog", "Hounddog" }, { "Sedan", "Hounddog" }, { "Cheetah", "Cheetah" }, { "Coupe", "Cheetah" }, { "BoxSUV", "Hotbox" }, { "Hotbox", "Hotbox" } }; Instance.skateboardAliasMap = new Dictionary<string, string> { { "Cheap Skateboard", "Cheap Skateboard" }, { "CheapSkateboard", "Cheap Skateboard" }, { "Skateboard", "Skateboard" }, { "SkateBoard", "Skateboard" }, { "Cruiser", "Cruiser" }, { "Cruiser_Skateboard", "Cruiser" }, { "Lightweight Board", "Lightweight Board" }, { "LightweightBoard", "Lightweight Board" }, { "Lightweight Skateboard", "Lightweight Board" }, { "LightweightSkateboard", "Lightweight Board" }, { "Golden Skateboard", "Golden Skateboard" }, { "GoldenSkateboard", "Golden Skateboard" }, { "Offroad Skateboard", "Offroad Skateboard" }, { "OffroadSkateboard", "Offroad Skateboard" } }; } public override void OnSceneWasInitialized(int buildIndex, string sceneName) { if (sceneName == "Main") { Instance.config = ConfigManager.Load(); if (Instance.config.Use_Legit_Version) { ((MelonBase)this).LoggerInstance.Msg("Use_Legit_Version is enabled. Adjusting behavior accordingly."); isLegitVersion = true; } else { ((MelonBase)this).LoggerInstance.Msg("Use_Legit_Version is disabled. Proceeding with default behavior."); } Instance.FillCapDictionary(); Instance.InitializeListeners(); Instance.moneyManager = Object.FindObjectOfType<MoneyManager>(); Instance.notificationsManager = Object.FindObjectOfType<NotificationsManager>(); Instance.vehicleManager = Object.FindObjectOfType<VehicleManager>(); if ((Object)(object)Instance.moneyManager == (Object)null) { ((MelonBase)this).LoggerInstance.Warning("MoneyManager not found in scene"); } if ((Object)(object)Instance.notificationsManager == (Object)null) { ((MelonBase)this).LoggerInstance.Warning("NotificationsManager not found in scene"); } if ((Object)(object)Instance.vehicleManager == (Object)null) { ((MelonBase)this).LoggerInstance.Warning("VehicleManager not found in scene"); } MelonCoroutines.Start(StartCoroutinesAfterDelay()); isFirstStart = false; } else if (sceneName.Equals("Menu", StringComparison.OrdinalIgnoreCase) && !isFirstStart) { ResetAllVariables(); isFirstStart = false; } } private void InitializeListeners() { try { Business.onOperationStarted += Action<LaunderingOperation>.op_Implicit((Action<LaunderingOperation>)OnLaunderingStarted); Business.onOperationFinished += Action<LaunderingOperation>.op_Implicit((Action<LaunderingOperation>)OnLaunderingFinished); } catch (Exception ex) { MelonLogger.Error("Failed to register laundering listeners: " + ex.Message); } } [IteratorStateMachine(typeof(<StartCoroutinesAfterDelay>d__9))] public IEnumerator StartCoroutinesAfterDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <StartCoroutinesAfterDelay>d__9(0) { <>4__this = this }; } private void ResetAllVariables() { ((MelonBase)this).LoggerInstance.Msg("Resetting all variables to default values.."); Instance.config = null; isLegitVersion = false; Instance.maxiumumLaunderValues.Clear(); Instance.createdAppEntries.Clear(); Instance.processedBusinesses.Clear(); Instance.createdBusinessesEntries.Clear(); Instance.boostedOperations.Clear(); Instance.moneyManager = null; Instance.notificationsManager = null; if (launderingApp != null) { launderingApp._isLaunderingAppLoaded = false; launderingApp.launderingAppViewportContentTransform = null; launderingApp.DansHardwareTemplate = null; launderingApp.GasMartWestTemplate = null; launderingApp.viewPortContentSpaceTemplate = null; } Instance.CreditCardIcon = null; Business.onOperationStarted -= Action<LaunderingOperation>.op_Implicit((Action<LaunderingOperation>)OnLaunderingStarted); Business.onOperationFinished -= Action<LaunderingOperation>.op_Implicit((Action<LaunderingOperation>)OnLaunderingFinished); } public void ChangeAppIconImage(GameObject appIcon, string resourceName) { if (resourceName == null) { MelonLogger.Msg("Resource name is null, skipping image change."); return; } Transform val = appIcon.transform.Find("Mask/Image"); GameObject val2 = (((Object)(object)val != (Object)null) ? ((Component)val).gameObject : null); if ((Object)(object)val2 == (Object)null) { return; } Image component = val2.GetComponent<Image>(); if (!((Object)(object)component == (Object)null)) { Sprite val3 = Utils.LoadEmbeddedSprite(resourceName); if ((Object)(object)val3 != (Object)null) { component.sprite = val3; } else { ((MelonBase)this).LoggerInstance.Msg("Failed to load embedded resource: " + resourceName); } } } public void RegisterApp(GameObject App, string Title = "Unknown App") { GameObject val = GameObject.Find("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/HomeScreen/AppIcons"); App.transform.SetParent(val.transform, false); ((MelonBase)this).LoggerInstance.Msg("Added " + Title + " to Homescreen."); } [IteratorStateMachine(typeof(<ApplyPropertyConfig>d__13))] public IEnumerator ApplyPropertyConfig() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ApplyPropertyConfig>d__13(0) { <>4__this = this }; } public void FillCapDictionary() { Instance.maxiumumLaunderValues.Clear(); Instance.maxiumumLaunderValues["Laundromat"] = Instance.config.Businesses.Laundromat.Laundromat_Cap; Instance.maxiumumLaunderValues["Taco Ticklers"] = Instance.config.Businesses.TacoTicklers.Taco_Ticklers_Cap; Instance.maxiumumLaunderValues["Car Wash"] = Instance.config.Businesses.CarWash.Car_Wash_Cap; Instance.maxiumumLaunderValues["PostOffice"] = Instance.config.Businesses.PostOffice.Post_Office_Cap; Instance.maxiumumLaunderValues["Post Office"] = Instance.config.Businesses.PostOffice.Post_Office_Cap; } [IteratorStateMachine(typeof(<WaitAndApplyCaps>d__17))] public IEnumerator WaitAndApplyCaps() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitAndApplyCaps>d__17(0) { <>4__this = this }; } public void ApplyCap(Business business) { if (Instance.aliasMap.TryGetValue(((Object)business).name, out var value) && Instance.maxiumumLaunderValues.TryGetValue(value, out var value2)) { business.LaunderCapacity = value2; } } public void CreateAppEntryForBusiness(Business business) { //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_0234: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) if (isLegitVersion) { return; } if (createdAppEntries.Contains(((Object)business).name)) { MelonLogger.Warning("App entry for business '" + ((Object)business).name + "' already exists. Skipping creation."); } else if (!launderingApp._isLaunderingAppLoaded) { MelonCoroutines.Start(WaitForLaunderingAppAndCreateEntry(business)); } else if ((Object)(object)launderingApp.DansHardwareTemplate != (Object)null) { string name = ((Object)business).name; if (1 == 0) { } GameObject val = (GameObject)(name switch { "Laundromat" => launderingApp.DansHardwareTemplate, "Taco Ticklers" => launderingApp.DansHardwareTemplate, "Car Wash" => launderingApp.DansHardwareTemplate, "PostOffice" => launderingApp.DansHardwareTemplate, _ => null, }); if (1 == 0) { } GameObject val2 = val; if ((Object)(object)val2 != (Object)null) { string text = ((((Object)business).name == "PostOffice") ? "Post Office" : ((Object)business).name); Color newBackgroundColor; string imagePath; string newSubtitle; switch (((Object)business).name) { case "Laundromat": newBackgroundColor = Color32.op_Implicit(ColorUtil.GetColor("Yellow")); imagePath = "Laundromat.png"; newSubtitle = "Efficient, subtle, and always turning dirty into clean."; break; case "Taco Ticklers": newBackgroundColor = Color32.op_Implicit(ColorUtil.GetColor("Orange")); imagePath = "TacoTickler.png"; newSubtitle = "We wrap more than burritos."; break; case "Car Wash": newBackgroundColor = Color32.op_Implicit(ColorUtil.GetColor("Dark Blue")); imagePath = "CarWash.png"; newSubtitle = "From powder to polish – all clean."; break; case "PostOffice": newBackgroundColor = Color32.op_Implicit(ColorUtil.GetColor("Light Blue")); imagePath = "PostOffice.png"; newSubtitle = "Dead drops, fake names but real profits."; break; default: newBackgroundColor = default(Color); imagePath = ""; newSubtitle = "Just a regular business. Nothing to see here."; break; } launderingApp.AddEntryFromTemplate(text, text, newSubtitle, business, val2, newBackgroundColor, imagePath); MelonLogger.Msg("Created app entry for business: " + ((Object)business).name); createdAppEntries.Add(((Object)business).name); } else { MelonLogger.Warning("No template found for business: " + ((Object)business).name); } } else { MelonLogger.Error("Templates are not initialized. Cannot create app entries."); } } [IteratorStateMachine(typeof(<WaitForLaunderingAppAndCreateEntry>d__20))] private IEnumerator WaitForLaunderingAppAndCreateEntry(Business business) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitForLaunderingAppAndCreateEntry>d__20(0) { <>4__this = this, business = business }; } public void AdjustLaunderingTime(LaunderingOperation operation) { if (operation != null && !Instance.boostedOperations.Contains(operation) && Instance.aliasMap.TryGetValue(((Object)operation.business).name, out var value)) { if (1 == 0) { } int num = value switch { "Laundromat" => Instance.config.Businesses.Laundromat.Laundromat_Laundering_time_hours, "Taco Ticklers" => Instance.config.Businesses.TacoTicklers.Taco_Ticklers_Laundering_time_hours, "Car Wash" => Instance.config.Businesses.CarWash.Car_Wash_Laundering_time_hours, "PostOffice" => Instance.config.Businesses.PostOffice.Post_Office_Laundering_time_hours, "Post Office" => Instance.config.Businesses.PostOffice.Post_Office_Laundering_time_hours, _ => 24, }; if (1 == 0) { } int num2 = num; operation.completionTime_Minutes = num2 * 60; string text = ((((Object)operation.business).name == "PostOffice") ? "Post Office" : ((Object)operation.business).name); Instance.boostedOperations.Add(operation); } } private void OnLaunderingStarted(LaunderingOperation operation) { try { if (operation != null && (Object)(object)operation.business != (Object)null) { string text = ((((Object)operation.business).name == "PostOffice") ? "Post Office" : ((Object)operation.business).name); } } catch (Exception ex) { MelonLogger.Error("Error in OnLaunderingStarted: " + ex.Message); } } private void OnLaunderingFinished(LaunderingOperation operation) { try { if (operation != null && (Object)(object)operation.business != (Object)null) { string text = ((((Object)operation.business).name == "PostOffice") ? "Post Office" : ((Object)operation.business).name); float num = CalculateTaxes(operation); if (num > 0f) { RemoveTaxesFromBankBalance(num, ((Object)operation.business).name); } } } catch (Exception ex) { ((MelonBase)this).LoggerInstance.Error("Error in OnLaunderingFinished: " + ex.Message); } } private void RemoveTaxesFromBankBalance(float amount, string businessName) { try { if ((Object)(object)moneyManager != (Object)null) { string text = "Tax for " + businessName; moneyManager.CreateOnlineTransaction(text, 0f - amount, 1f, text); if ((Object)(object)notificationsManager != (Object)null) { string text2 = $"<color=#E60000>${amount:N0}</color> Lost in Taxes"; string text3 = businessName ?? ""; Sprite creditCardIcon = GetCreditCardIcon(); notificationsManager.SendNotification(text3, text2, creditCardIcon, 5f, true); } } } catch (Exception ex) { ((MelonBase)this).LoggerInstance.Error("An error occurred while deducting bank money: " + ex.Message); } } public float CalculateTaxes(LaunderingOperation operation) { if (Instance.aliasMap.TryGetValue(((Object)operation.business).name, out var value)) { if (1 == 0) { } float num = value switch { "Laundromat" => Instance.config.Businesses.Laundromat.Laundromat_Tax_Percentage / 100f, "Taco Ticklers" => Instance.config.Businesses.TacoTicklers.Taco_Ticklers_Tax_Percentage / 100f, "Car Wash" => Instance.config.Businesses.CarWash.Car_Wash_Tax_Percentage / 100f, "PostOffice" => Instance.config.Businesses.PostOffice.Post_Office_Tax_Percentage / 100f, "Post Office" => Instance.config.Businesses.PostOffice.Post_Office_Tax_Percentage / 100f, _ => 0.19f, }; if (1 == 0) { } float num2 = num; float amount = operation.amount; float num3 = Mathf.RoundToInt(amount * num2); float amount2 = amount - num3; string text = ((((Object)operation.business).name == "PostOffice") ? "Post Office" : ((Object)operation.business).name); operation.amount = amount2; return num3; } return 0f; } private Sprite GetCreditCardIcon() { if ((Object)(object)Instance.CreditCardIcon != (Object)null) { return Instance.CreditCardIcon; } GameObject val = GameObject.Find("UI/HUD/HotbarContainer/Slots/CashSlotContainer/OnlineSlot/ItemUI_Cash/Icon"); if ((Object)(object)val != (Object)null) { Image component = val.GetComponent<Image>(); if ((Object)(object)component != (Object)null && (Object)(object)component.sprite != (Object)null && ((Object)component.sprite).name == "CreditCard") { Instance.CreditCardIcon = component.sprite; return component.sprite; } } ((MelonBase)this).LoggerInstance.Error("Failed to find the CreditCard icon."); return null; } public void ApplyPricesToProperties() { if (Business.UnownedBusinesses != null && Business.UnownedBusinesses.Count > 0) { Enumerator<Business> enumerator = Business.UnownedBusinesses.GetEnumerator(); while (enumerator.MoveNext()) { Business current = enumerator.Current; ApplyPriceToBusiness(current); } } if (Business.OwnedBusinesses != null && Business.OwnedBusinesses.Count > 0) { Enumerator<Business> enumerator2 = Business.OwnedBusinesses.GetEnumerator(); while (enumerator2.MoveNext()) { Business current2 = enumerator2.Current; ApplyPriceToBusiness(current2); } } ApplyPricesForHomeProperties(); } private void ApplyPriceToBusiness(Business business) { string value; if ((Object)(object)business == (Object)null) { MelonLogger.Warning("Encountered a null business. Skipping..."); } else if (Instance.aliasMap.TryGetValue(((Object)business).name, out value)) { if (1 == 0) { } float num = value switch { "Laundromat" => Instance.config.Properties.BusinessProperties.Laundromat_Price, "Taco Ticklers" => Instance.config.Properties.BusinessProperties.Taco_Ticklers_Price, "Car Wash" => Instance.config.Properties.BusinessProperties.Car_Wash_Price, "Post Office" => Instance.config.Properties.BusinessProperties.Post_Office_Price, _ => 1000f, }; if (1 == 0) { } float price = num; ((Property)business).Price = price; } else { MelonLogger.Warning("Business '" + ((Object)business).name + "' not found in aliasMap. Skipping price assignment."); } } public void ApplyPricesForHomeProperties() { if (Property.UnownedProperties != null) { Enumerator<Property> enumerator = Property.UnownedProperties.GetEnumerator(); while (enumerator.MoveNext()) { Property current = enumerator.Current; string value; if ((Object)(object)current == (Object)null) { MelonLogger.Warning("Encountered a null property in UnownedProperties. Skipping..."); } else if (Instance.aliasMap.TryGetValue(((Object)current).name, out value)) { if (1 == 0) { } float num = value switch { "Motel Room" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Motel" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "MotelRoom" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Sweatshop" => Instance.config.Properties.PrivateProperties.Sweatshop_Price, "Bungalow" => Instance.config.Properties.PrivateProperties.Bungalow_Price, "Barn" => Instance.config.Properties.PrivateProperties.Barn_Price, "Docks Warehouse" => Instance.config.Properties.PrivateProperties.Docks_Warehouse_Price, "Manor" => Instance.config.Properties.PrivateProperties.Manor_Price, "Storage Unit" => Instance.config.Properties.PrivateProperties.Storage_Unit_Price, _ => 1000f, }; if (1 == 0) { } float price = num; current.Price = price; } else if (((Object)current).name != "RV" && ((Object)current).name != "Sewer office") { MelonLogger.Warning("Property '" + ((Object)current).name + "' / '" + current.propertyName + "' not found in aliasMap. Skipping price assignment."); } } if (Property.OwnedProperties != null) { Enumerator<Property> enumerator2 = Property.OwnedProperties.GetEnumerator(); while (enumerator2.MoveNext()) { Property current2 = enumerator2.Current; string value2; if ((Object)(object)current2 == (Object)null) { MelonLogger.Warning("Encountered a null property in OwnedProperties. Skipping..."); } else if (Instance.aliasMap.TryGetValue(((Object)current2).name, out value2)) { if (1 == 0) { } float num = value2 switch { "Motel Room" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Motel" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "MotelRoom" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Sweatshop" => Instance.config.Properties.PrivateProperties.Sweatshop_Price, "Bungalow" => Instance.config.Properties.PrivateProperties.Bungalow_Price, "Barn" => Instance.config.Properties.PrivateProperties.Barn_Price, "Docks Warehouse" => Instance.config.Properties.PrivateProperties.Docks_Warehouse_Price, "Manor" => Instance.config.Properties.PrivateProperties.Manor_Price, "Storage Unit" => Instance.config.Properties.PrivateProperties.Storage_Unit_Price, _ => 1000f, }; if (1 == 0) { } float price2 = num; current2.Price = price2; } else if (((Object)current2).name != "RV" && ((Object)current2).name != "Sewer office") { MelonLogger.Warning("Property '" + ((Object)current2).name + "' not found in aliasMap. Skipping price assignment."); } } } DialogueController_Ming[] array = Il2CppArrayBase<DialogueController_Ming>.op_Implicit(Object.FindObjectsOfType<DialogueController_Ming>()); DialogueController_Ming[] array2 = array; foreach (DialogueController_Ming val in array2) { Transform parent = ((Component)val).gameObject.transform.parent; string text = ((parent != null) ? ((Object)parent).name : null); if (text != null) { val.Price = ConfigManager.GetPropertyPrice(Instance.config, text); } } } else { MelonLogger.Warning("UnownedProperties is null. Cannot apply prices."); } } public void ApplyPricesToPropertyListings() { GameObject val = GameObject.Find("Map/Container/RE Office/Interior/Whiteboard (1)"); if ((Object)(object)val == (Object)null) { val = GameObject.Find("RE Office/Interior/Whiteboard (1)"); } if ((Object)(object)val == (Object)null) { GameObject val2 = GameObject.Find("RE Office"); if ((Object)(object)val2 == (Object)null) { Il2CppArrayBase<Transform> val3 = Object.FindObjectsOfType<Transform>(); foreach (Transform item in val3) { if (((Object)item).name == "RE Office") { val2 = ((Component)item).gameObject; break; } } } if ((Object)(object)val2 != (Object)null) { Transform val4 = val2.transform.Find("Interior"); if ((Object)(object)val4 != (Object)null) { Transform val5 = val4.Find("Whiteboard (1)"); if ((Object)(object)val5 != (Object)null) { val = ((Component)val5).gameObject; } } } } if ((Object)(object)val == (Object)null) { MelonLogger.Warning("RE Office Whiteboard (1) not found. Cannot apply prices to business PropertyListings."); } if ((Object)(object)val != (Object)null) { Transform[] array = (Transform[])(object)new Transform[4] { val.transform.Find("PropertyListing Laundromat"), val.transform.Find("PropertyListing Taco Ticklers"), val.transform.Find("PropertyListing Car Wash"), val.transform.Find("PropertyListing Post Office") }; Transform[] array2 = array; foreach (Transform val6 in array2) { if ((Object)(object)val6 == (Object)null) { MelonLogger.Warning("A PropertyListing was not found. Skipping..."); continue; } string text = ((Object)val6).name.Replace("PropertyListing ", "").Trim(); if (Instance.aliasMap.TryGetValue(text, out var value)) { if (1 == 0) { } float num = value switch { "Laundromat" => Instance.config.Properties.BusinessProperties.Laundromat_Price, "Taco Ticklers" => Instance.config.Properties.BusinessProperties.Taco_Ticklers_Price, "Car Wash" => Instance.config.Properties.BusinessProperties.Car_Wash_Price, "Post Office" => Instance.config.Properties.BusinessProperties.Post_Office_Price, "PostOffice" => Instance.config.Properties.BusinessProperties.Post_Office_Price, _ => 1000f, }; if (1 == 0) { } float num2 = num; Transform val7 = val6.Find("Price"); if ((Object)(object)val7 != (Object)null) { TextMeshPro component = ((Component)val7).GetComponent<TextMeshPro>(); if ((Object)(object)component != (Object)null) { ((TMP_Text)component).text = $"${num2}"; } else { MelonLogger.Warning("Price TextMeshPro component not found for " + text + "."); } } else { MelonLogger.Warning("Price object not found for " + text + "."); } } else { MelonLogger.Warning("Business '" + text + "' not found in aliasMap. Skipping price assignment."); } } } GameObject val8 = GameObject.Find("Map/Container/RE Office/Interior/Whiteboard"); if ((Object)(object)val8 == (Object)null) { val8 = GameObject.Find("RE Office/Interior/Whiteboard"); } if ((Object)(object)val8 == (Object)null) { GameObject val9 = GameObject.Find("RE Office"); if ((Object)(object)val9 == (Object)null) { Il2CppArrayBase<Transform> val10 = Object.FindObjectsOfType<Transform>(); foreach (Transform item2 in val10) { if (((Object)item2).name == "RE Office") { val9 = ((Component)item2).gameObject; break; } } } if ((Object)(object)val9 != (Object)null) { Transform val11 = val9.transform.Find("Interior"); if ((Object)(object)val11 != (Object)null) { Transform val12 = val11.Find("Whiteboard"); if ((Object)(object)val12 != (Object)null) { val8 = ((Component)val12).gameObject; } } } } if ((Object)(object)val8 == (Object)null) { MelonLogger.Warning("RE Office Whiteboard not found. Cannot apply prices to home PropertyListings."); } if ((Object)(object)val8 != (Object)null) { Transform[] array3 = (Transform[])(object)new Transform[7] { val8.transform.Find("PropertyListing Motel Room"), val8.transform.Find("PropertyListing Sweatshop"), val8.transform.Find("PropertyListing Bungalow"), val8.transform.Find("PropertyListing Barn"), val8.transform.Find("PropertyListing Docks Warehouse"), val8.transform.Find("PropertyListing Manor"), val8.transform.Find("PropertyListing Storage Unit") }; Transform[] array4 = array3; foreach (Transform val13 in array4) { if ((Object)(object)val13 == (Object)null) { continue; } string text2 = ((Object)val13).name.Replace("PropertyListing ", "").Trim(); if (Instance.aliasMap.TryGetValue(text2, out var value2)) { if (1 == 0) { } float num = value2 switch { "Motel Room" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Sweatshop" => Instance.config.Properties.PrivateProperties.Sweatshop_Price, "Bungalow" => Instance.config.Properties.PrivateProperties.Bungalow_Price, "Barn" => Instance.config.Properties.PrivateProperties.Barn_Price, "Docks Warehouse" => Instance.config.Properties.PrivateProperties.Docks_Warehouse_Price, "Manor" => Instance.config.Properties.PrivateProperties.Manor_Price, "Storage Unit" => Instance.config.Properties.PrivateProperties.Storage_Unit_Price, _ => 1000f, }; if (1 == 0) { } float num3 = num; Transform val14 = val13.Find("Price"); if ((Object)(object)val14 != (Object)null) { TextMeshPro component2 = ((Component)val14).GetComponent<TextMeshPro>(); if ((Object)(object)component2 != (Object)null) { ((TMP_Text)component2).text = $"${num3}"; } else { MelonLogger.Warning("Price TextMeshPro component not found for " + text2 + "."); } } else { MelonLogger.Warning("Price object not found for " + text2 + "."); } } else { MelonLogger.Warning("Property '" + text2 + "' not found in aliasMap. Skipping price assignment."); } } } UpdateSellSignPrices(); } private void UpdateSellSignPrices() { if (Business.UnownedBusinesses != null) { Enumerator<Business> enumerator = Business.UnownedBusinesses.GetEnumerator(); while (enumerator.MoveNext()) { Business current = enumerator.Current; if (!((Object)(object)current == (Object)null) && !((Object)(object)((Property)current).ForSaleSign == (Object)null) && Instance.aliasMap.TryGetValue(((Object)current).name, out var value)) { UpdateSignPrice(((Property)current).ForSaleSign, value); } } } if (Property.UnownedProperties == null) { return; } Enumerator<Property> enumerator2 = Property.UnownedProperties.GetEnumerator(); while (enumerator2.MoveNext()) { Property current2 = enumerator2.Current; if (!((Object)(object)current2 == (Object)null) && !((Object)(object)current2.ForSaleSign == (Object)null) && !(current2 is Business) && Instance.aliasMap.TryGetValue(((Object)current2).name, out var value2)) { UpdateSignPrice(current2.ForSaleSign, value2); } } } public void ApplyPricesToVehicles() { if ((Object)(object)vehicleManager == (Object)null) { MelonLogger.Warning("VehicleManager not found. Attempting to find it again..."); Instance.vehicleManager = Object.FindObjectOfType<VehicleManager>(); if ((Object)(object)vehicleManager == (Object)null) { MelonLogger.Warning("VehicleManager still not found. Cannot apply prices to vehicles (most likely because of Multiplayer)."); } } if ((Object)(object)vehicleManager != (Object)null) { Enumerator<LandVehicle> enumerator = vehicleManager.VehiclePrefabs.GetEnumerator(); while (enumerator.MoveNext()) { LandVehicle current = enumerator.Current; string value; if ((Object)(object)current == (Object)null) { MelonLogger.Warning("Encountered a null vehicle. Skipping..."); } else if (Instance.vehicleAliasMap.TryGetValue(((Object)current).name, out value)) { if (1 == 0) { } float num = value switch { "Shitbox" => Instance.config.Vehicles.Shitbox_Price, "Veeper" => Instance.config.Vehicles.Veeper_Price, "Bruiser" => Instance.config.Vehicles.Bruiser_Price, "Dinkler" => Instance.config.Vehicles.Dinkler_Price, "Hounddog" => Instance.config.Vehicles.Hounddog_Price, "Cheetah" => Instance.config.Vehicles.Cheetah_Price, "Hotbox" => Instance.config.Vehicles.Hotbox_Price, _ => 1000f, }; if (1 == 0) { } float vehiclePrice = num; current.vehiclePrice = vehiclePrice; } else { MelonLogger.Warning("Vehicle '" + ((Object)current).name + "' not found in vehicleAliasMap. Skipping price assignment."); } } } UpdateVehicleSignPrices(); } private void UpdateVehicleSignPrices() { VehicleSaleSign val = Object.FindObjectOfType<VehicleSaleSign>(); if ((Object)(object)val != (Object)null) { VehicleSaleSign[] array = Il2CppArrayBase<VehicleSaleSign>.op_Implicit(Object.FindObjectsOfType<VehicleSaleSign>()); VehicleSaleSign[] array2 = array; foreach (VehicleSaleSign val2 in array2) { TextMeshPro nameLabel = val2.NameLabel; TextMeshPro priceLabel = val2.PriceLabel; if ((Object)(object)nameLabel != (Object)null && (Object)(object)priceLabel != (Object)null) { if (Instance.vehicleAliasMap.TryGetValue(((TMP_Text)nameLabel).text, out var value)) { if (1 == 0) { } float num = value switch { "Shitbox" => Instance.config.Vehicles.Shitbox_Price, "Veeper" => Instance.config.Vehicles.Veeper_Price, "Bruiser" => Instance.config.Vehicles.Bruiser_Price, "Dinkler" => Instance.config.Vehicles.Dinkler_Price, "Hounddog" => Instance.config.Vehicles.Hounddog_Price, "Cheetah" => Instance.config.Vehicles.Cheetah_Price, "Hotbox" => Instance.config.Vehicles.Hotbox_Price, _ => 1000f, }; if (1 == 0) { } float num2 = num; ((TMP_Text)priceLabel).text = $"${num2}"; } else { MelonLogger.Warning("Vehicle '" + ((TMP_Text)nameLabel).text + "' not found in vehicleAliasMap. Skipping price update."); } } else { MelonLogger.Warning("NameLabel or PriceLabel not found for a VehicleSaleSign."); } } } else { MelonLogger.Warning("No VehicleSaleSign objects found in the scene."); } } public void ApplyPricesToSkateboards() { DialogueController_SkateboardSeller[] array = Il2CppArrayBase<DialogueController_SkateboardSeller>.op_Implicit(Object.FindObjectsOfType<DialogueController_SkateboardSeller>()); DialogueController_SkateboardSeller[] array2 = array; foreach (DialogueController_SkateboardSeller val in array2) { Transform parent = ((Component)val).gameObject.transform.parent; string text = ((parent != null) ? ((Object)parent).name : null); if (text == null || !text.Contains("Jeff")) { continue; } shackShopDialogueController = val; Enumerator<Option> enumerator = val.Options.GetEnumerator(); while (enumerator.MoveNext()) { Option current = enumerator.Current; if (Instance.skateboardAliasMap.TryGetValue(current.Name, out var value)) { if (1 == 0) { } float num = value switch { "Cheap Skateboard" => Instance.config.Skateboards.Cheap_Skateboard_Price, "Skateboard" => Instance.config.Skateboards.Skateboard_Price, "Cruiser" => Instance.config.Skateboards.Cruiser_Price, "Lightweight Board" => Instance.config.Skateboards.Lightweight_Board_Price, "Golden Skateboard" => Instance.config.Skateboards.Golden_Skateboard_Price, "Offroad Skateboard" => Instance.config.Skateboards.Offroad_Skateboard_Price, _ => 1000f, }; if (1 == 0) { } float price = num; current.Price = price; } else { MelonLogger.Warning("Skateboard '" + current.Name + "' not found in skateBoardAliasMap. Skipping price assignment."); } } UpdateSkateboardSign(); } } private void UpdateSkateboardSign() { GameObject val = GameObject.Find("Map/Container/North town/Jeff's Shred Shack/Shred Shack/Catalog"); if ((Object)(object)val == (Object)null) { val = GameObject.Find("Jeff's Shred Shack/Shred Shack/Catalog"); } if ((Object)(object)val == (Object)null) { Il2CppArrayBase<Transform> val2 = Object.FindObjectsOfType<Transform>(); foreach (Transform item in val2) { if (((Object)item).name == "Shred Shack") { Transform val3 = item.Find("Catalog"); if ((Object)(object)val3 != (Object)null) { val = ((Component)val3).gameObject; break; } } } } if ((Object)(object)val == (Object)null) { MelonLogger.Warning("Shred Shack Catalog not found. Cannot update skateboard sign prices."); return; } Transform val4 = val.transform.Find("Paper (1)"); Transform val5 = val.transform.Find("Paper (2)"); Transform val6 = val.transform.Find("Paper (3)"); Transform val7 = val.transform.Find("Paper (4)"); Transform val8 = val.transform.Find("Paper (5)"); Transform val9 = val.transform.Find("Paper (6)"); object obj; if (val4 == null) { obj = null; } else { Transform obj2 = val4.Find("Text (TMP)"); obj = ((obj2 != null) ? ((Component)obj2).gameObject : null); } GameObject sellSign = (GameObject)obj; object obj3; if (val5 == null) { obj3 = null; } else { Transform obj4 = val5.Find("Text (TMP)"); obj3 = ((obj4 != null) ? ((Component)obj4).gameObject : null); } GameObject sellSign2 = (GameObject)obj3; object obj5; if (val6 == null) { obj5 = null; } else { Transform obj6 = val6.Find("Text (TMP)"); obj5 = ((obj6 != null) ? ((Component)obj6).gameObject : null); } GameObject sellSign3 = (GameObject)obj5; object obj7; if (val7 == null) { obj7 = null; } else { Transform obj8 = val7.Find("Text (TMP)"); obj7 = ((obj8 != null) ? ((Component)obj8).gameObject : null); } GameObject sellSign4 = (GameObject)obj7; object obj9; if (val8 == null) { obj9 = null; } else { Transform obj10 = val8.Find("Text (TMP)"); obj9 = ((obj10 != null) ? ((Component)obj10).gameObject : null); } GameObject sellSign5 = (GameObject)obj9; object obj11; if (val9 == null) { obj11 = null; } else { Transform obj12 = val9.Find("Text (TMP)"); obj11 = ((obj12 != null) ? ((Component)obj12).gameObject : null); } GameObject sellSign6 = (GameObject)obj11; UpdateSignPrice(sellSign, "Cheap Skateboard"); UpdateSignPrice(sellSign2, "Skateboard"); UpdateSignPrice(sellSign3, "Cruiser_Skateboard"); UpdateSignPrice(sellSign4, "Lightweight Board"); UpdateSignPrice(sellSign5, "Golden Skateboard"); UpdateSignPrice(sellSign6, "Offroad Skateboard"); } private void UpdateSignPrice(GameObject sellSign, string objectName) { if ((Object)(object)sellSign == (Object)null) { MelonLogger.Warning("Sell sign for " + objectName + " not found. Skipping..."); return; } float num2; string value2; if (Instance.aliasMap.TryGetValue(objectName, out var value)) { if (1 == 0) { } float num = value switch { "Laundromat" => Instance.config.Properties.BusinessProperties.Laundromat_Price, "Taco Ticklers" => Instance.config.Properties.BusinessProperties.Taco_Ticklers_Price, "Car Wash" => Instance.config.Properties.BusinessProperties.Car_Wash_Price, "Post Office" => Instance.config.Properties.BusinessProperties.Post_Office_Price, "PostOffice" => Instance.config.Properties.BusinessProperties.Post_Office_Price, "Motel" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "MotelRoom" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Motel Room" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "Sweatshop" => Instance.config.Properties.PrivateProperties.Sweatshop_Price, "Bungalow" => Instance.config.Properties.PrivateProperties.Bungalow_Price, "Barn" => Instance.config.Properties.PrivateProperties.Barn_Price, "Docks Warehouse" => Instance.config.Properties.PrivateProperties.Docks_Warehouse_Price, "Manor" => Instance.config.Properties.PrivateProperties.Manor_Price, "Storage Unit" => Instance.config.Properties.PrivateProperties.Storage_Unit_Price, _ => 1000f, }; if (1 == 0) { } num2 = num; } else if (Instance.vehicleAliasMap.TryGetValue(objectName, out value2)) { if (1 == 0) { } float num = value2 switch { "Shitbox" => Instance.config.Vehicles.Shitbox_Price, "Veeper" => Instance.config.Vehicles.Veeper_Price, "Bruiser" => Instance.config.Vehicles.Bruiser_Price, "Dinkler" => Instance.config.Vehicles.Dinkler_Price, "Hounddog" => Instance.config.Vehicles.Hounddog_Price, "Cheetah" => Instance.config.Vehicles.Cheetah_Price, "Hotbox" => Instance.config.Vehicles.Hotbox_Price, _ => 1000f, }; if (1 == 0) { } num2 = num; } else { if (!Instance.skateboardAliasMap.TryGetValue(objectName, out var value3)) { MelonLogger.Warning("Property/Vehicle '" + objectName + "' not found in aliasMap, vehicleAliasMap or skateboardAliasMap. Skipping sell sign price assignment."); return; } if (1 == 0) { } float num = value3 switch { "Cheap Skateboard" => Instance.config.Skateboards.Cheap_Skateboard_Price, "Skateboard" => Instance.config.Skateboards.Skateboard_Price, "Cruiser" => Instance.config.Skateboards.Cruiser_Price, "Lightweight Board" => Instance.config.Skateboards.Lightweight_Board_Price, "Golden Skateboard" => Instance.config.Skateboards.Golden_Skateboard_Price, "Offroad Skateboard" => Instance.config.Skateboards.Offroad_Skateboard_Price, _ => 1000f, }; if (1 == 0) { } num2 = num; } if (objectName.ToLower().Contains("board")) { TextMeshPro component = sellSign.GetComponent<TextMeshPro>(); if ((Object)(object)component != (Object)null) { string[] array = ((TMP_Text)component).text.Split(new char[1] { '\n' }); ((TMP_Text)component).text = array[0]; ((TMP_Text)component).text = ((TMP_Text)component).text + $"\n<color=#55C61E>${num2}</color>"; } else { MelonLogger.Warning("Price TextMeshPro component not found for sell sign of " + objectName + "."); } return; } Transform val = sellSign.transform.Find("Price"); if ((Object)(object)val != (Object)null) { TextMeshPro component2 = ((Component)val).GetComponent<TextMeshPro>(); if ((Object)(object)component2 != (Object)null) { ((TMP_Text)component2).text = $"${num2}"; } else { MelonLogger.Warning("Price TextMeshPro component not found for sell sign of " + objectName + "."); } } else { MelonLogger.Warning("Price object not found for sell sign of " + objectName + "."); } } public static void ModifyChoiceText_Prefix(string choiceLabel, string choiceText) { UpdateEstateAgentPrices(choiceLabel); } public static void CheckChoice_Prefix(string choiceLabel) { UpdateEstateAgentPrices(choiceLabel); } private static void UpdateEstateAgentPrices(string choiceLabel) { if (string.IsNullOrEmpty(choiceLabel) || Instance?.config == null) { return; } if (Business.UnownedBusinesses != null) { Enumerator<Business> enumerator = Business.UnownedBusinesses.GetEnumerator(); while (enumerator.MoveNext()) { Business current = enumerator.Current; if ((Object)(object)current == (Object)null || !(((Property)current).PropertyCode.ToLower() == choiceLabel.ToLower())) { continue; } string text = ((Object)current).name.ToLower().Replace(" ", "").Replace("_", ""); if (1 == 0) { } float num = text switch { "laundromat" => Instance.config.Properties.BusinessProperties.Laundromat_Price, "tacoticklers" => Instance.config.Properties.BusinessProperties.Taco_Ticklers_Price, "carwash" => Instance.config.Properties.BusinessProperties.Car_Wash_Price, "postoffice" => Instance.config.Properties.BusinessProperties.Post_Office_Price, _ => 1000f, }; if (1 == 0) { } float price = num; ((Property)current).Price = price; return; } } if (Property.UnownedProperties == null) { return; } Enumerator<Property> enumerator2 = Property.UnownedProperties.GetEnumerator(); while (enumerator2.MoveNext()) { Property current2 = enumerator2.Current; if ((Object)(object)current2 == (Object)null || current2 is Business || !(current2.PropertyCode.ToLower() == choiceLabel.ToLower())) { continue; } string text2 = ((Object)current2).name.ToLower().Replace(" ", "").Replace("_", ""); if (1 == 0) { } float num = text2 switch { "motelroom" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "motel" => Instance.config.Properties.PrivateProperties.Motel_Room_Price, "sweatshop" => Instance.config.Properties.PrivateProperties.Sweatshop_Price, "bungalow" => Instance.config.Properties.PrivateProperties.Bungalow_Price, "barn" => Instance.config.Properties.PrivateProperties.Barn_Price, "dockswarehouse" => Instance.config.Properties.PrivateProperties.Docks_Warehouse_Price, "manor" => Instance.config.Properties.PrivateProperties.Manor_Price, "storageunit" => Instance.config.Properties.PrivateProperties.Storage_Unit_Price, _ => 1000f, }; if (1 == 0) { } float price2 = num; current2.Price = price2; break; } } } } namespace MoreRealisticLaundering.Util { public static class FontLoader { [CompilerGenerated] private sealed class <InitializeFonts>d__0 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <InitializeFonts>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; openSansBold = FindFontFromOtherApp("openSansBold"); openSansSemiBold = FindFontFromOtherApp("openSansSemiBold"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static Font openSansBold; public static bool openSansBoldIsInitialized; public static Font openSansSemiBold; public static bool openSansSemiBoldIsInitialized; [IteratorStateMachine(typeof(<InitializeFonts>d__0))] public static IEnumerator InitializeFonts() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <InitializeFonts>d__0(0); } public static Font FindFontFromOtherApp(string fontName) { Font result = Resources.GetBuiltinResource<Font>("Arial.ttf"); if (fontName == "openSansBold") { GameObject appCanvasByName = Utils.GetAppCanvasByName("ProductManagerApp/Container/Topbar"); Text componentInChildren = appCanvasByName.GetComponentInChildren<Text>(); if ((Object)(object)componentInChildren != (Object)null) { result = componentInChildren.font; openSansBoldIsInitialized = true; } else { MelonLogger.Msg("openSansBold Font not found"); } return result; } if (fontName == "openSansSemiBold") { GameObject appCanvasByName2 = Utils.GetAppCanvasByName("DeliveryApp/Container/Scroll View/Viewport/Content/Albert Hoover/Header"); Text componentInChildren2 = appCanvasByName2.GetComponentInChildren<Text>(); if ((Object)(object)componentInChildren2 != (Object)null) { result = componentInChildren2.font; openSansSemiBoldIsInitialized = true; } else { MelonLogger.Msg("openSansSemiBold Font not found"); } return result; } return Resources.GetBuiltinResource<Font>("Arial.ttf"); } } public static class Utils { [CompilerGenerated] private sealed class <WaitForObject>d__4 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string path; public Action<GameObject> callback; public float timeout; private GameObject <obj>5__1; private float <timer>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitForObject>d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <obj>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <obj>5__1 = null; <timer>5__2 = 0f; break; case 1: <>1__state = -1; <timer>5__2 += 0.1f; break; } if ((Object)(object)<obj>5__1 == (Object)null && <timer>5__2 < timeout) { <obj>5__1 = GameObject.Find(path); if (!((Object)(object)<obj>5__1 != (Object)null)) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } } callback?.Invoke(<obj>5__1); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <WaitForObjectByFrame>d__3 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string path; public Action<GameObject> callback; private GameObject <obj>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitForObjectByFrame>d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <obj>5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <obj>5__1 = null; break; case 1: <>1__state = -1; break; } if ((Object)(object)<obj>5__1 == (Object)null) { <obj>5__1 = GameObject.Find(path); <>2__current = null; <>1__state = 1; return true; } callback?.Invoke(<obj>5__1); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static GameObject GetAppIconByName(string Name, int? Index, string newObjectName = null) { int valueOrDefault = Index.GetValueOrDefault(); GameObject[] array = (from t in (IEnumerable<Transform>)GameObject.Find("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/HomeScreen/AppIcons/").GetComponentsInChildren<Transform>(true) let labelTransform = ((Component)t).gameObject.transform.Find("Label") let textComponent = ((Object)(object)labelTransform != (Object)null) ? ((Component)labelTransform).GetComponent<Text>() : null where (Object)(object)textComponent != (Object)null && textComponent.text != null && textComponent.text.StartsWith(Name) select ((Component)t).gameObject).ToArray(); if (valueOrDefault >= array.Length) { MelonLogger.Error($"Index {valueOrDefault} is out of range. Returning null."); return null; } GameObject val = array[valueOrDefault]; if (newObjectName != null) { ((Object)val).name = newObjectName; } return val; } public static GameObject ChangeLabelFromAppIcon(string appIconName, string newLabel) { if (string.IsNullOrEmpty(appIconName) || string.IsNullOrEmpty(newLabel)) { MelonLogger.Error("AppIcon name or new label is null or empty."); return null; } GameObject appIconByName = GetAppIconByName(appIconName, 1, newLabel); Transform val = appIconByName.transform.Find("Label"); GameObject val2 = (((Object)(object)appIconByName != (Object)null) ? ((Component)val).gameObject : null); if ((Object)(object)val2 != (Object)null) { Text component = val2.GetComponent<Text>(); if ((Object)(object)component != (Object)null) { component.text = newLabel; } } return appIconByName; } public static GameObject GetAppCanvasByName(string Name) { return ((Component)GameObject.Find("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/AppsCanvas/").transform.Find(Name)).gameObject; } [IteratorStateMachine(typeof(<WaitForObjectByFrame>d__3))] public static IEnumerator WaitForObjectByFrame(string path, Action<GameObject> callback) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitForObjectByFrame>d__3(0) { path = path, callback = callback }; } [IteratorStateMachine(typeof(<WaitForObject>d__4))] public static IEnumerator WaitForObject(string path, Action<GameObject> callback, float timeout = 30f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitForObject>d__4(0) { path = path, callback = callback, timeout = timeout }; } public static void ClearChildren(Transform parent, Func<GameObject, bool> keepFilter = null) { GameObject[] array = (from t in (IEnumerable<Transform>)((Component)parent).GetComponentsInChildren<Transform>(true) select ((Component)t).gameObject into obj where (Object)(object)obj.transform != (Object)(object)parent select obj).ToArray(); GameObject[] array2 = array; foreach (GameObject val in array2) { if (keepFilter == null || !keepFilter(val)) { val.transform.parent = null; Object.Destroy((Object)(object)val); } } } public static Texture2D LoadCustomImage(string path) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown string path2 = Path.Combine(MelonEnvironment.UserDataDirectory, path); Texture2D result; if (!File.Exists(path2)) { result = null; Debug.LogError(Object.op_Implicit("Specified path does not exist.")); } else { byte[] array = File.ReadAllBytes(path2); Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, Il2CppStructArray<byte>.op_Implicit(array)); result = val; } return result; } public static byte[] LoadEmbeddedResource(string resourceName) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string text = "MoreRealisticLaundering.Assets." + resourceName; using Stream stream = executingAssembly.GetManifestResourceStream(text); if (stream == null) { MelonLogger.Warning("Embedded resource not found: " + text); return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); return array; } public static Texture2D LoadEmbeddedTexture(string resourceName) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown byte[] array = LoadEmbeddedResource(resourceName); if (array == null) { return null; } Texture2D val = new Texture2D(2, 2); if (ImageConversion.LoadImage(val, Il2CppStructArray<byte>.op_Implicit(array))) { return val; } MelonLogger.Error("Failed to load texture from embedded resource: " + resourceName); return null; } public static Sprite LoadEmbeddedSprite(string resourceName) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Texture2D val = LoadEmbeddedTexture(resourceName); if ((Object)(object)val == (Object)null) { return null; } return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); } } public static class ColorUtil { public static Dictionary<string, Color32> GetColors() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) return new Dictionary<string, Color32> { { "Dark Blue", new Color32((byte)33, (byte)64, (byte)115, byte.MaxValue) }, { "Light Blue", new Color32((byte)83, (byte)126, (byte)158, byte.MaxValue) }, { "Light Purple", new Color32((byte)87, (byte)82, (byte)153, (byte)127) }, { "Purple", new Color32((byte)108, (byte)35, (byte)114, byte.MaxValue) }, { "Bright Green", new Color32((byte)85, (byte)198, (byte)30, byte.MaxValue) }, { "Olive Green", new Color32((byte)67, (byte)99, (byte)33, byte.MaxValue) }, { "Dark Green", new Color32((byte)91, (byte)127, (byte)9, byte.MaxValue) }, { "Cyan", new Color32((byte)9, (byte)115, (byte)119, byte.MaxValue) }, { "Dark Red", new Color32((byte)99, (byte)33, (byte)37, byte.MaxValue) }, { "Yellow", new Color32((byte)208, (byte)174, (byte)54, byte.MaxValue) }, { "Orange", new Color32((byte)178, (byte)78, (byte)44, byte.MaxValue) }, { "Grey", new Color32((byte)49, (byte)49, (byte)49, byte.MaxValue) }, { "Light Grey", new Color32((byte)90, (byte)90, (byte)90, byte.MaxValue) }, { "Ultra Light Grey", new Color32((byte)150, (byte)150, (byte)150, byte.MaxValue) }, { "Dark Grey", new Color32((byte)30, (byte)30, (byte)30, byte.MaxValue) }, { "Redpurple", new Color32((byte)112, (byte)21, (byte)37, byte.MaxValue) }, { "White", new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue) }, { "Black", new Color32((byte)0, (byte)0, (byte)0, byte.MaxValue) } }; } public static Color32 GetColor(string colorName) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) Dictionary<string, Color32> colors = GetColors(); if (colors.TryGetValue(colorName, out var value)) { return value; } throw new KeyNotFoundException("Color '" + colorName + "' not found."); } } } namespace MoreRealisticLaundering.PhoneApp { public class LaunderingApp { [CompilerGenerated] private sealed class <>c__DisplayClass1_0 { public GameObject icons; public GameObject cloningCandidateDeliveries; public string cloningNameDeliveries; public GameObject cloningCandidateProductsCopy; public string cloningNameProductsCopy; public GameObject cloningCandidateProducts; public string cloningNameProducts; internal void <CreateApp>b__0(GameObject obj) { icons = obj; } internal void <CreateApp>b__1(GameObject objD) { cloningCandidateDeliveries = objD; cloningNameDeliveries = "Deliveries"; } internal void <CreateApp>b__2(GameObject objP) { cloningCandidateProductsCopy = objP; cloningNameProductsCopy = "Products"; } internal void <CreateApp>b__3(GameObject obj) { cloningCandidateProducts = obj; cloningNameProducts = "Products"; } } [CompilerGenerated] private sealed class <CreateApp>d__1 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string IDName; public string Title; public bool IsRotated; public string IconPath; public LaunderingApp <>4__this; private <>c__DisplayClass1_0 <>8__1; private GameObject <parentCanvas>5__2; private GameObject <deliveriesApp>5__3; private GameObject <productsApp>5__4; private GameObject <mrlApp>5__5; private GameObject <appIconByNameDeliveries>5__6; private GameObject <appIconByNameProducts>5__7; private Transform <container>5__8; private Transform <filtersPanel>5__9; private Transform <topbarTransform>5__10; private Transform <scrollViewProductsApp>5__11; private Transform <containerTransformClonedDeliveriesApp>5__12; private Transform <settingsTransform>5__13; private GameObject <appIconByName>5__14; private Image <topbarImage>5__15; private Transform <topbarTitleTransform>5__16; private Transform <topbarSubtitleTransform>5__17; private Transform <scrollViewTransformDeliveriesClone>5__18; private Transform <scrollViewViewport>5__19; private Transform <orderSubmitted>5__20; private Transform <scrollViewContent>5__21; private Transform <detailsTitleTransform>5__22; private Transform <detailsSubtitleTransform>5__23; private string[] <objectsToDelete>5__24; private Transform <instructionTransform>5__25; private Transform <settingsSpaceTransform>5__26; private Text <detailsTitleText>5__27; private string[] <>s__28; private int <>s__29; private string <objName>5__30; private Transform <toDeleteTransform>5__31; private Text <instructionsText>5__32; private RectTransform <settingsSpaceRect>5__33; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreateApp>d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <parentCanvas>5__2 = null; <deliveriesApp>5__3 = null; <productsApp>5__4 = null; <mrlApp>5__5 = null; <appIconByNameDeliveries>5__6 = null; <appIconByNameProducts>5__7 = null; <container>5__8 = null; <filtersPanel>5__9 = null; <topbarTransform>5__10 = null; <scrollViewProductsApp>5__11 = null; <containerTransformClonedDeliveriesApp>5__12 = null; <settingsTransform>5__13 = null; <appIconByName>5__14 = null; <topbarImage>5__15 = null; <topbarTitleTransform>5__16 = null; <topbarSubtitleTransform>5__17 = null; <scrollViewTransformDeliveriesClone>5__18 = null; <scrollViewViewport>5__19 = null; <orderSubmitted>5__20 = null; <scrollViewContent>5__21 = null; <detailsTitleTransform>5__22 = null; <detailsSubtitleTransform>5__23 = null; <objectsToDelete>5__24 = null; <instructionTransform>5__25 = null; <settingsSpaceTransform>5__26 = null; <detailsTitleText>5__27 = null; <>s__28 = null; <objName>5__30 = null; <toDeleteTransform>5__31 = null; <instructionsText>5__32 = null; <settingsSpaceRect>5__33 = null; <>1__state = -2; } private bool MoveNext() { //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass1_0(); <>8__1.cloningCandidateProducts = null; <>8__1.cloningNameProducts = null; <>8__1.cloningCandidateDeliveries = null; <>8__1.cloningNameDeliveries = null; <>8__1.cloningCandidateProductsCopy = null; <>8__1.cloningNameProductsCopy = null; <>8__1.icons = null; <>2__current = MelonCoroutines.Start(Utils.WaitForObject("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/HomeScreen/AppIcons/", delegate(GameObject obj) { <>8__1.icons = obj; })); <>1__state = 1; return true; case 1: <>1__state = -1; if (IsRotated) { <>2__current = MelonCoroutines.Start(Utils.WaitForObject("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/AppsCanvas/DeliveryApp", delegate(GameObject objD) { <>8__1.cloningCandidateDeliveries = objD; <>8__1.cloningNameDeliveries = "Deliveries"; })); <>1__state = 2; return true; } break; case 2: <>1__state = -1; <>2__current = MelonCoroutines.Start(Utils.WaitForObject("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/AppsCanvas/ProductManagerApp", delegate(GameObject objP) { <>8__1.cloningCandidateProductsCopy = objP; <>8__1.cloningNameProductsCopy = "Products"; })); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = MelonCoroutines.Start(Utils.WaitForObject("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/AppsCanvas/ProductManagerApp", delegate(GameObject obj) { <>8__1.cloningCandidateProducts = obj; <>8__1.cloningNameProducts = "Products"; })); <>1__state = 4; return true; case 4: <>1__state = -1; break; } <parentCanvas>5__2 = GameObject.Find("Player_Local/CameraContainer/Camera/OverlayCamera/GameplayMenu/Phone/phone/AppsCanvas/"); <deliveriesApp>5__3 = Object.Instantiate<GameObject>(<>8__1.cloningCandidateDeliveries, <parentCanvas>5__2.transform); ((Object)<deliveriesApp>5__3).name = "DeliveriesTemp"; <productsApp>5__4 = Object.Instantiate<GameObject>(<>8__1.cloningCandidateProductsCopy, <parentCanvas>5__2.transform); ((Object)<deliveriesApp>5__3).name = "ProductsTemp"; <mrlApp>5__5 = Object.Instantiate<GameObject>(<>8__1.cloningCandidateProducts, <parentCanvas>5__2.transform); ((Object)<mrlApp>5__5).name = IDName; <appIconByNameDeliveries>5__6 = Utils.ChangeLabelFromAppIcon(<>8__1.cloningNameDeliveries, "DeliveriesCopy"); <appIconByNameProducts>5__7 = Utils.ChangeLabelFromAppIcon(<>8__1.cloningNameProductsCopy, "ProductsCopy"); <container>5__8 = <mrlApp>5__5.transform.Find("Container"); Transform obj2 = <container>5__8; <filtersPanel>5__9 = ((obj2 != null) ? obj2.Find("FiltersPanel") : null); if ((Object)(object)<filtersPanel>5__9 != (Object)null) { MelonLogger.Msg("Removing FiltersPanel from cloned app (Product Manager Filter compatibility)"); Object.DestroyImmediate((Object)(object)((Component)<filtersPanel>5__9).gameObject); } <topbarTransform>5__10 = <container>5__8.Find("Topbar"); if ((Object)(object)<topbarTransform>5__10 != (Object)null) { <topbarImage>5__15 = ((Component)<topbarTransform>5__10).GetComponent<Image>(); ((Graphic)<topbarImage>5__15).color = Color32.op_Implicit(ColorUtil.GetColor("Cyan")); <topbarTitleTransform>5__16 = <topbarTransform>5__10.Find("Title"); if ((Object)(object)<topbarTitleTransform>5__16 != (Object)null) { ((Component)<topbarTitleTransform>5__16).GetComponent<Text>().text = Title; } <topbarSubtitleTransform>5__17 = <topbarTransform>5__10.Find("Subtitle"); if ((Object)(object)<topbarSubtitleTransform>5__17 != (Object)null) { ((Component)<topbarSubtitleTransform>5__17).GetComponent<Text>().text = "by KampfBallerina"; ((Component)<topbarSubtitleTransform>5__17).GetComponent<Text>().alignment = (TextAnchor)5; ((Graphic)((Component)<topbarSubtitleTransform>5__17).GetComponent<Text>()).color = Color32.op_Implicit(ColorUtil.GetColor("White")); ((Component)<topbarSubtitleTransform>5__17).GetComponent<RectTransform>().anchorMax = new Vector2(0.98f, 1f); } <topbarImage>5__15 = null; <topbarTitleTransform>5__16 = null; <topbarSubtitleTransform>5__17 = null; } <scrollViewProductsApp>5__11 = <container>5__8.Find("Scroll View"); if ((Object)(object)<scrollViewProductsApp>5__11 != (Object)null) { ((Component)<scrollViewProductsApp>5__11).gameObject.SetActive(false); ((Object)((Component)<scrollViewProductsApp>5__11).gameObject).name = "DeactivatedScrollView"; } <containerTransformClonedDeliveriesApp>5__12 = <deliveriesApp>5__3.transform.Find("Container"); if ((Object)(object)<containerTransformClonedDeliveriesApp>5__12 != (Object)null) { <scrollViewTransformDeliveriesClone>5__18 = <containerTransformClonedDeliveriesApp>5__12.Find("Scroll View"); if ((Object)(object)<scrollViewTransformDeliveriesClone>5__18 != (Object)null) { <scrollViewViewport>5__19 = ((Component)<scrollViewTransformDeliveriesClone>5__18).transform.Find("Viewport"); if ((Object)(object)<scrollViewViewport>5__19 != (Object)null) { <scrollViewContent>5__21 = ((Component)<scrollViewViewport>5__19).transform.Find("Content"); <scrollViewContent>5__21 = null; } <orderSubmitted>5__20 = ((Component)<scrollViewTransformDeliveriesClone>5__18).transform.Find("OrderSubmitted"); if ((Object)(object)<orderSubmitted>5__20 != (Object)null) { Object.DestroyImmediate((Object)(object)((Component)<orderSubmitted>5__20).gameObject); } ((Component)((Component)<scrollViewTransformDeliveriesClone>5__18).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(-100f, -60f); ((Component)((Component)<scrollViewTransformDeliveriesClone>5__18).transform).GetComponent<RectTransform>().anchoredPosition = new Vector2(-50f, -30f); <scrollViewTransformDeliveriesClone>5__18.SetParent(<container>5__8, false); <scrollViewViewport>5__19 = null; <orderSubmitted>5__20 = null; } <scrollViewTransformDeliveriesClone>5__18 = null; } <settingsTransform>5__13 = <container>5__8.Find("Details"); if ((Object)(object)<settingsTransform>5__13 != (Object)null) { ((Object)<settingsTransform>5__13).name = "Details"; ((Component)<settingsTransform>5__13).GetComponent<RectTransform>().sizeDelta = new Vector2(95f, -60f); ((Component)<settingsTransform>5__13).GetComponent<RectTransform>().anchoredPosition = new Vector2(-47.5f, -30f); <detailsTitleTransform>5__22 = <settingsTransform>5__13.Find("Scroll View/Viewport/Content/Title"); if ((Object)(object)<detailsTitleTransform>5__22 != (Object)null) { <>4__this.detailsTitleObject = ((Component)<detailsTitleTransform>5__22).gameObject; <>4__this.detailsTitleObject.SetActive(false); <detailsTitleText>5__27 = ((Component)<detailsTitleTransform>5__22).GetComponent<Text>(); <detailsTitleText>5__27.text = "DetailsTitleText"; <detailsTitleText>5__27 = null; } <detailsSubtitleTransform>5__23 = <settingsTransform>5__13.Find("Scroll View/Viewport/Content/Description"); if ((Object)(object)<detailsSubtitleTransform>5__23 != (Object)null) { ((Component)<detailsSubtitleTransform>5__23).GetComponent<Text>().text = "This is going to be the description of the app."; ((Component)<detailsSubtitleTransform>5__23).GetComponent<RectTransform>().anchoredPosition = new Vector2(0f, 0f); ((Component)<detailsSubtitleTransform>5__23).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 50f); ((Component)<detailsSubtitleTransform>5__23).GetComponent<Text>().fontSize = 18; ((Component)<detailsSubtitleTransform>5__23).gameObject.SetActive(false); <>4__this.detailsSubtitleObject = ((Component)<detailsSubtitleTransform>5__23).gameObject; } <>4__this.settingsContentTransform = <settingsTransform>5__13.Find("Scroll View/Viewport/Content"); <objectsToDelete>5__24 = new string[9] { "Value", "Effects", "Addiction", "Recipes", "RecipesContainer", "Listed", "Delisted", "NotDiscovered", "Properties" }; <>s__28 = <objectsToDelete>5__24; for (<>s__29 = 0; <>s__29 < <>s__28.Length; <>s__29++) { <objName>5__30 = <>s__28[<>s__29]; Transform settingsContentTransform = <>4__this.settingsContentTransform; <toDeleteTransform>5__31 = ((settingsContentTransform != null) ? settingsContentTransform.Find(<objName>5__30) : null); if ((Object)(object)<toDeleteTransform>5__31 != (Object)null) { ObjectExt.Destroy((Object)(object)((Component)<toDeleteTransform>5__31).gameObject); } <toDeleteTransform>5__31 = null; <objName>5__30 = null; } <>s__28 = null; <instructionTransform>5__25 = <settingsTransform>5__13.Find("Instruction"); if ((Object)(object)<instructionTransform>5__25 != (Object)null) { <>4__this.InstructionsTextObject = ((Component)<instructionTransform>5__25).gameObject; <instructionsText>5__32 = ((Component)<instructionTransform>5__25).GetComponent<Text>(); <instructionsText>5__32.text = "Select a section to adjust settings"; <instructionsText>5__32.fontSize = 20; <instructionsText>5__32 = null; } <settingsSpaceTransform>5__26 = <>4__this.settingsContentTransform.Find("Space"); if ((Object)(object)<settingsSpaceTransform>5__26 != (Object)null) { ((Component)<settingsSpaceTransform>5__26).gameObject.SetActive(true); <settingsSpaceRect>5__33 = ((Component)<settingsSpaceTransform>5__26).GetComponent<RectTransform>(); <settingsSpaceRect>5__33.sizeDelta = new Vector2(<settingsSpaceRect>5__33.sizeDelta.x, 200f); <settingsSpaceRect>5__33 = null; } <detailsTitleTransform>5__22 = null; <detailsSubtitleTransform>5__23 = null; <objectsToDelete>5__24 = null; <instructionTransform>5__25 = null; <settingsSpaceTransform>5__26 = null; } <>4__this.CreateTemplates(<container>5__8, <>4__this.settingsContentTransform); Object.DestroyImmediate((Object)(object)<appIconByNameDeliveries>5__6.gameObject); ObjectExt.Destroy((Object)(object)<deliveriesApp>5__3); Object.DestroyImmediate((Object)(object)<appIconByNameProducts>5__7.gameObject); ObjectExt.Destroy((Object)(object)<productsApp>5__4); <appIconByName>5__14 = Utils.ChangeLabelFromAppIcon(<>8__1.cloningNameProducts, Title); MRLCore.Instance.ChangeAppIconImage(<appIconByName>5__14, IconPath); MRLCore.Instance.RegisterApp(<appIconByName>5__14, Title); ((Component)<>4__this.settingsContentTransform).gameObject.SetActive(true); <>4__this.AddOptionsForBusiness(<>4__this.settingsContentTransform); <>4__this.AddPriceOptionsWithToggleButton(<>4__this.settingsContentTransform); <>4__this.AddVehicleOptions(<>4__this.settingsContentTransform); <>4__this.AddSkateboardOptions(<>4__this.settingsContentTransform); <>4__this.LoadConfigValuesIntoUI(); <>4__this._isLaunderingAppLoaded = true; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <InitializeLaunderApp>d__0 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public LaunderingApp <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <InitializeLaunderApp>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; goto IL_0063; case 1: <>1__state = -1; goto IL_0063; case 2: <>1__state = -1; goto IL_00a9; case 3: { <>1__state = -1; return false; } IL_0063: if (MRLCore.Instance == null) { MelonLogger.Msg("Waiting for Instance to be initialized..."); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } MelonCoroutines.Start(FontLoader.InitializeFonts()); goto IL_00a9; IL_00a9: if (!FontLoader.openSansBoldIsInitialized || !FontLoader.openSansSemiBoldIsInitialized) { MelonLogger.Msg("Waiting for Fonts to be loaded..."); <>2__current = (object)new WaitForSeconds(2f); <>1__state = 2; return true; } <>2__current = MelonCoroutines.Start(<>4__this.CreateApp("TaxNWash", "Tax & Wash", IsRotated: true, "LaunderingIcon.png")); <>1__state = 3; 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(); } } public GameObject DansHardwareTemplate; public GameObject GasMartWestTemplate; public GameObject viewPortContentSpaceTemplate; public Transform launderingAppViewportContentTransform; public static string _appName; public bool _isLaunderingAppLoaded = false; private GameObject detailsTitleObject; private GameObject InstructionsTextObject; private GameObject detailsSubtitleObject; private Transform settingsContentTransform; public Transform optionsTransform = null; public Transform priceOptionsTransform = null; public Transform vehicleOptionsTransform = null; public Transform skateboardOptionsTransform = null; public GameObject checkboxTemplate = null; private Sprite inputBackgroundSprite = null; private Sprite saveButtonSprite = null; private Sprite toggleButtonSprite = null; private Sprite toggleButtonPressedSprite = null; private Sprite appIconSprite = null; private Sprite raysRealEstateSprite = null; private Sprite shredShackSprite = null; private Sprite hylandAutoSprite = null; private Sprite laundromatSprite = null; private Sprite postOfficeSprite = null; private Sprite carWashSprite = null; private Sprite tacoTicklersSprite = null; private Business _selectedBusiness = null; public bool isSaveStillRunning = false; [IteratorStateMachine(typeof(<InitializeLaunderApp>d__0))] public IEnumerator InitializeLaunderApp() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <InitializeLaunderApp>d__0(0) { <>4__this = this }; } [IteratorStateMachine(typeof(<CreateApp>d__1))] public IEnumerator CreateApp(string IDName, string Title, bool IsRotated = true, string IconPath = null) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CreateApp>d__1(0) { <>4__this = this, IDName = IDName, Title = Title, IsRotated = IsRotated, IconPath = IconPath }; } private void CreateTemplates(Transform deliveriesContainer, Transform productsContainer = null) { //IL_014e: 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_0181: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)deliveriesContainer == (Object)null) { MelonLogger.Error("Container not found!"); return; } if ((Object)(object)productsContainer != (Object)null) { Transform val = productsContainer.Find("Toggle"); if ((Object)(object)val != (Object)null) { RectTransform component = ((Component)val).GetComponent<RectTransform>(); if ((Object)(object)component != (Object)null) { } HorizontalLayoutGroup component2 = ((Component)val).GetComponent<HorizontalLayoutGroup>(); if ((Object)(object)component2 == (Object)null) { component2 = ((Component)val).gameObject.AddComponent<HorizontalLayoutGroup>(); ((HorizontalOrVerticalLayoutGroup)component2).spacing = 100f; ((HorizontalOrVerticalLayoutGroup)component2).childForceExpandWidth = false; ((HorizontalOrVerticalLayoutGroup)component2).childForceExpandHeight = false; ((HorizontalOrVerticalLayoutGroup)component2).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)component2).childControlHeight = true; ((LayoutGroup)component2).childAlignment = (TextAnchor)3; } ContentSizeFitter component3 = ((Component)val).GetComponent<ContentSizeFitter>(); if ((Object)(object)component3 == (Object)null) { component3 = ((Component)val).gameObject.AddComponent<ContentSizeFitter>(); component3.horizontalFit = (FitMode)2; component3.verticalFit = (FitMode)0; } Transform val2 = val.Find("Text"); if ((Object)(object)val2 != (Object)null) { Text component4 = ((Component)val2).GetComponent<Text>(); component4.font = FontLoader.openSansSemiBold ?? Resources.GetBuiltinResource<Font>("Arial.ttf"); component4.text = "toggleTransformText"; ((Graphic)component4).color = Color32.op_Implicit(ColorUtil.GetColor("White")); component4.fontSize = 18; val2.SetAsFirstSibling(); ((Component)val2).GetComponent<RectTransform>().sizeDelta = new Vector2(325f, 30f); LayoutElement component5 = ((Component)val2).GetComponent<LayoutElement>(); if ((Object)(object)component5 == (Object)null) { component5 = ((Component)val2).gameObject.AddComponent<LayoutElement>(); component5.minWidth = 325f; } } Toggle component6 = ((Component)val).GetComponent<Toggle>(); if ((Object)(object)component6 != (Object)null) { component6.isOn = false; ((UnityEventBase)component6.onValueChanged).RemoveAllListeners(); } Transform val3 = val.Find("Background"); if ((Object)(object)val3 != (Object)null) { ((Object)val3).name = "CheckboxBackground"; LayoutElement component7 = ((Component)val3).GetComponent<LayoutElement>(); if ((Object)(object)component7 == (Object)null) { component7 = ((Component)val3).gameObject.AddComponent<LayoutElement>(); component7.minWidth = 30f; component7.preferredWidth = 30f; component7.minHeight = 30f; component7.preferredHeight = 30f; } } Transform val4 = val3.Find("Checkmark"); if ((Object)(object)val4 != (Object)null) { ((Graphic)((Component)val4).GetComponent<Image>()).color = Color32.op_Implicit(ColorUtil.GetColor("Cyan")); } RectTransform component8 = ((Component)val).gameObject.GetComponent<RectTransform>(); if ((Object)(object)component8 != (Object)null) { component8.sizeDelta = new Vector2(30f, 30f); } checkboxTemplate = Object.Instantiate<GameObject>(((Component)val).gameObject); ((Object)checkboxTemplate).name = "Checkbox Template"; checkboxTemplate.SetActive(true); ObjectExt.Destroy((Object)(object)((Componen