Some mods target the Mono version of the game, which is available by opting into the Steam beta branch "alternate"
Decompiled source of ExtendedEmployees v1.0.1
ExtendedEmployees.dll
Decompiled 16 hours agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using ExtendedEmployees; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppScheduleOne.DevUtilities; using Il2CppScheduleOne.Employees; using Il2CppScheduleOne.Messaging; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.NPCs; using Il2CppScheduleOne.Property; using Il2CppScheduleOne.UI; using Il2CppScheduleOne.UI.Phone.ContactsApp; using Il2CppScheduleOne.UI.Phone.Messages; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using MelonLoader; using MelonLoader.Utils; using Newtonsoft.Json; using UnityEngine; using UnityEngine.AI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Core), "Extended Employees", "1.0.1", "Anton Leigue", null)] [assembly: MelonGame(null, "Schedule I")] [assembly: AssemblyTitle("ExtendedEmployees")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ExtendedEmployees")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8c7c2273-d0b4-4ecd-af5b-2c29f40f2450")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace ExtendedEmployees; public class Core : MelonMod { [CompilerGenerated] private sealed class <CreatePhoneContact>d__10 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Core <>4__this; private NPC <templateNPC>5__1; private GameObject <clone>5__2; private Message <welcomeMessage>5__3; private Enumerator<NPC> <>s__4; private NPC <npc>5__5; private Exception <ex>5__6; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CreatePhoneContact>d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <templateNPC>5__1 = null; <clone>5__2 = null; <welcomeMessage>5__3 = null; <>s__4 = null; <npc>5__5 = null; <ex>5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; goto IL_0046; case 1: <>1__state = -1; goto IL_0046; case 2: { <>1__state = -1; if (<>4__this.contactCreated) { return false; } <>4__this.contactCreated = true; try { <templateNPC>5__1 = null; <>s__4 = NPCManager.NPCRegistry.GetEnumerator(); while (<>s__4.MoveNext()) { <npc>5__5 = <>s__4.Current; if ((Object)(object)<npc>5__5 != (Object)null) { <templateNPC>5__1 = <npc>5__5; break; } <npc>5__5 = null; } <>s__4 = null; if ((Object)(object)<templateNPC>5__1 == (Object)null) { MelonLogger.Error("Failed finding template NPC"); return false; } <clone>5__2 = Object.Instantiate<GameObject>(((Component)<templateNPC>5__1).gameObject); <>4__this.employeeContactNPC = <clone>5__2.GetComponent<NPC>(); <>4__this.employeeContactNPC.FirstName = "Extended"; <>4__this.employeeContactNPC.LastName = "Employees"; <>4__this.employeeContactNPC.BakedGUID = Guid.NewGuid().ToString(); <>4__this.employeeContactNPC.IsImportant = true; <>4__this.employeeContactNPC.ConversationCanBeHidden = false; <>4__this.employeeContactNPC.ShowRelationshipInfo = false; <>4__this.employeeContactNPC.MugshotSprite = ((App<ContactsApp>)(object)PlayerSingleton<ContactsApp>.Instance).AppIcon; <>4__this.employeeConversation = new MSGConversation(<>4__this.employeeContactNPC, "Extended Employees"); <>4__this.employeeConversation.messageHistory = new List<Message>(); <>4__this.employeeConversation.messageChainHistory = new List<MessageChain>(); <>4__this.employeeConversation.bubbles = new List<MessageBubble>(); <>4__this.employeeConversation.EntryVisible = true; <>4__this.employeeContactNPC.MSGConversation = <>4__this.employeeConversation; NPCManager.NPCRegistry.Add(<>4__this.employeeContactNPC); <welcomeMessage>5__3 = new Message("Welcome to Extended Employees.", (ESenderType)1, true, -1); <>4__this.employeeConversation.SendMessage(<welcomeMessage>5__3, true, false); <>4__this.OpenMainDialogue(); MelonLogger.Msg("Extended Employees contact created!"); <templateNPC>5__1 = null; <clone>5__2 = null; <welcomeMessage>5__3 = null; } catch (Exception ex) { <ex>5__6 = ex; MelonLogger.Error($"Phone contact failed: {<ex>5__6}"); } return false; } IL_0046: if (NPCManager.NPCRegistry == null || NPCManager.NPCRegistry.Count == 0) { <>2__current = null; <>1__state = 1; return true; } <>2__current = (object)new WaitForSeconds(2f); <>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(); } } private NPC employeeContactNPC; private MSGConversation employeeConversation; private bool contactCreated = false; private Employee[] cachedEmployees = (Employee[])(object)new Employee[0]; private float refreshTimer = 0f; private static string SavePath = Path.Combine(MelonEnvironment.UserDataDirectory, "ExtendedEmployees.json"); public static bool AutoPayrollEnabled = false; public static Dictionary<string, EmployeeUpgradeData> EmployeeData = new Dictionary<string, EmployeeUpgradeData>(); public override void OnInitializeMelon() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Harmony val = new Harmony("extendedemployees"); val.PatchAll(); LoadData(); MelonLogger.Msg("Extended Employees Loaded!"); MelonCoroutines.Start(CreatePhoneContact()); } public override void OnUpdate() { refreshTimer += Time.deltaTime; if (refreshTimer >= 2f) { refreshTimer = 0f; cachedEmployees = Il2CppArrayBase<Employee>.op_Implicit(Object.FindObjectsOfType<Employee>()); } Employee[] array = cachedEmployees; foreach (Employee val in array) { if (!((Object)(object)val == (Object)null)) { EmployeeUpgradeData data = GetData(val); NavMeshAgent component = ((Component)val).GetComponent<NavMeshAgent>(); if ((Object)(object)component != (Object)null) { component.speed = 3.5f * data.WalkSpeedMultiplier; } if (AutoPayrollEnabled && !val.PaidForToday) { PayEmployee(val); } } } } [IteratorStateMachine(typeof(<CreatePhoneContact>d__10))] private IEnumerator CreatePhoneContact() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CreatePhoneContact>d__10(0) { <>4__this = this }; } private void OpenMainDialogue() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown employeeConversation.ClearResponses(false); List<Response> val = new List<Response>(); val.Add(new Response("Manage Employees", "", Action.op_Implicit((Action)delegate { OpenEmployeesMenu(); }), true)); val.Add(new Response("Payroll", "", Action.op_Implicit((Action)delegate { OpenPayrollMenu(); }), true)); val.Add(new Response("Hire Employees", "", Action.op_Implicit((Action)delegate { OpenHirePropertiesMenu(); }), true)); val.Add(new Response("Statistics", "", Action.op_Implicit((Action)delegate { OpenStatsMenu(); }), true)); employeeConversation.ShowResponses(val, 0f, false); } private List<Property> GetPlayerOwnedProperties() { List<Property> list = new List<Property>(); Property[] array = Il2CppArrayBase<Property>.op_Implicit(Object.FindObjectsOfType<Property>()); Property[] array2 = array; foreach (Property val in array2) { if (!((Object)(object)val == (Object)null) && val.IsOwned && ((Component)val).gameObject.activeInHierarchy && !list.Contains(val)) { list.Add(val); } } return list; } private void OpenEmployeesMenu() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown employeeConversation.ClearResponses(false); Message val = new Message("Select Property", (ESenderType)1, true, -1); employeeConversation.SendMessage(val, true, false); List<Response> val2 = new List<Response>(); List<Property> playerOwnedProperties = GetPlayerOwnedProperties(); foreach (Property item in playerOwnedProperties) { string propertyName = ((Object)item).name; val2.Add(new Response(propertyName, "", Action.op_Implicit((Action)delegate { OpenPropertyEmployees(propertyName); }), true)); } val2.Add(new Response("Back", "", Action.op_Implicit((Action)delegate { OpenMainDialogue(); }), true)); employeeConversation.ShowResponses(val2, 0f, false); } private void OpenHirePropertiesMenu() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown employeeConversation.ClearResponses(false); Message val = new Message("Select Property To Hire For", (ESenderType)1, true, -1); employeeConversation.SendMessage(val, true, false); List<Response> val2 = new List<Response>(); List<Property> playerOwnedProperties = GetPlayerOwnedProperties(); foreach (Property item in playerOwnedProperties) { string propertyName = ((Object)item).name; val2.Add(new Response(propertyName, "", Action.op_Implicit((Action)delegate { OpenHireMenu(propertyName); }), true)); } val2.Add(new Response("Back", "", Action.op_Implicit((Action)delegate { OpenMainDialogue(); }), true)); employeeConversation.ShowResponses(val2, 0f, false); } private void OpenHireMenu(string propertyName) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown employeeConversation.ClearResponses(false); Message val = new Message("Hire Employees For " + propertyName, (ESenderType)1, true, -1); employeeConversation.SendMessage(val, true, false); List<Response> val2 = new List<Response>(); AddHireButton(val2, propertyName, "Botanist", 1200f); AddHireButton(val2, propertyName, "Cleaner", 1000f); AddHireButton(val2, propertyName, "Packager", 1500f); AddHireButton(val2, propertyName, "Chemist", 2000f); val2.Add(new Response("Back", "", Action.op_Implicit((Action)delegate { OpenHirePropertiesMenu(); }), true)); employeeConversation.ShowResponses(val2, 0f, false); } private void AddHireButton(List<Response> responses, string propertyName, string employeeType, float price) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown responses.Add(new Response($"Hire {employeeType} [${price}]", "", Action.op_Implicit((Action)delegate { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) Property val = null; Property[] array = Il2CppArrayBase<Property>.op_Implicit(Object.FindObjectsOfType<Property>()); Property[] array2 = array; foreach (Property val2 in array2) { if (!((Object)(object)val2 == (Object)null) && val2.IsOwned && ((Object)val2).name == propertyName) { val = val2; break; } } if ((Object)(object)val == (Object)null) { Message val3 = new Message("Failed finding property.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val3, true, false); OpenHireMenu(propertyName); } else { int count = val.Employees.Count; int employeeCapacity = val.EmployeeCapacity; if (count >= employeeCapacity) { Message val4 = new Message($"{propertyName} employee capacity reached.\nEmployees: {count}/{employeeCapacity}", (ESenderType)1, true, -1); employeeConversation.SendMessage(val4, true, false); OpenHireMenu(propertyName); } else if (NetworkSingleton<MoneyManager>.Instance.onlineBalance < price) { Message val5 = new Message("Not enough money.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val5, true, false); OpenHireMenu(propertyName); } else { NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("Hire " + employeeType, 0f - price, 1f, "Extended Employees"); refreshTimer = 999f; Message val6 = new Message($"{employeeType} hired for {propertyName}\nEmployees: {count + 1}/{employeeCapacity}", (ESenderType)1, true, -1); employeeConversation.SendMessage(val6, true, false); EEmployeeType val7 = (EEmployeeType)0; switch (employeeType) { case "Botanist": val7 = (EEmployeeType)0; break; case "Cleaner": val7 = (EEmployeeType)3; break; case "Packager": val7 = (EEmployeeType)1; break; case "Chemist": val7 = (EEmployeeType)2; break; } NetworkSingleton<EmployeeManager>.Instance.CreateNewEmployee(val, val7); refreshTimer = 999f; OpenHireMenu(propertyName); } } }), true)); } private void OpenPropertyEmployees(string propertyName) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown employeeConversation.ClearResponses(false); Message val = new Message(propertyName, (ESenderType)1, true, -1); employeeConversation.SendMessage(val, true, false); List<Response> val2 = new List<Response>(); Employee[] array = cachedEmployees; foreach (Employee val3 in array) { if ((Object)(object)val3 == (Object)null) { continue; } string text = "Unknown"; if ((Object)(object)val3.AssignedProperty != (Object)null) { text = ((Object)val3.AssignedProperty).name; } if (!(text != propertyName)) { Employee capturedEmployee = val3; EmployeeUpgradeData data = GetData(val3); val2.Add(new Response($"{((Object)val3).name} | Work {data.WorkSpeedMultiplier:F1}x | Walk {data.WalkSpeedMultiplier:F1}x", "", Action.op_Implicit((Action)delegate { OpenEmployeeSubmenu(capturedEmployee); }), true)); } } val2.Add(new Response("back", "Back", Action.op_Implicit((Action)delegate { OpenEmployeesMenu(); }), true)); employeeConversation.ShowResponses(val2, 0f, false); } private void OpenEmployeeSubmenu(Employee employee) { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown employeeConversation.ClearResponses(false); EmployeeUpgradeData data = GetData(employee); Message val = new Message($"{((Object)employee).name}\nWork Speed: {data.WorkSpeedMultiplier:F1}x\nWalk Speed: {data.WalkSpeedMultiplier:F1}x\nDaily Wage: ${employee.DailyWage}", (ESenderType)1, true, -1); employeeConversation.SendMessage(val, true, false); List<Response> val2 = new List<Response>(); val2.Add(new Response($"Work Upgrade [${GetUpgradePrice(data.WorkSpeedMultiplier)}]", "", Action.op_Implicit((Action)delegate { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown float upgradePrice2 = GetUpgradePrice(data.WorkSpeedMultiplier); if (data.WorkSpeedMultiplier >= 5f) { Message val9 = new Message("Work speed already maxed.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val9, true, false); OpenEmployeeSubmenu(employee); } else if (NetworkSingleton<MoneyManager>.Instance.onlineBalance < upgradePrice2) { Message val10 = new Message("Not enough money.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val10, true, false); OpenEmployeeSubmenu(employee); } else { NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("Work Speed Upgrade", 0f - upgradePrice2, 1f, "Extended Employees"); data.WorkSpeedMultiplier += 0.5f; SaveData(); Message val11 = new Message($"{((Object)employee).name} work speed upgraded to {data.WorkSpeedMultiplier:F1}x", (ESenderType)1, true, -1); employeeConversation.SendMessage(val11, true, false); OpenEmployeeSubmenu(employee); } }), true)); val2.Add(new Response($"Speed Upgrade [${GetUpgradePrice(data.WalkSpeedMultiplier)}]", "", Action.op_Implicit((Action)delegate { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown float upgradePrice = GetUpgradePrice(data.WalkSpeedMultiplier); if (data.WalkSpeedMultiplier >= 5f) { Message val6 = new Message("Walk speed already maxed.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val6, true, false); OpenEmployeeSubmenu(employee); } else if (NetworkSingleton<MoneyManager>.Instance.onlineBalance < upgradePrice) { Message val7 = new Message("Not enough money.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val7, true, false); OpenEmployeeSubmenu(employee); } else { NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("Walk Speed Upgrade", 0f - upgradePrice, 1f, "Extended Employees"); data.WalkSpeedMultiplier += 0.5f; SaveData(); Message val8 = new Message($"{((Object)employee).name} walk speed upgraded to {data.WalkSpeedMultiplier:F1}x", (ESenderType)1, true, -1); employeeConversation.SendMessage(val8, true, false); OpenEmployeeSubmenu(employee); } }), true)); val2.Add(new Response($"Pay [${employee.DailyWage}]", "", Action.op_Implicit((Action)delegate { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown if (employee.PaidForToday) { Message val3 = new Message(((Object)employee).name + " has already been paid today.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val3, true, false); OpenEmployeeSubmenu(employee); } else { if (PayEmployee(employee)) { Message val4 = new Message($"You paid {((Object)employee).name} ${employee.DailyWage}", (ESenderType)1, true, -1); employeeConversation.SendMessage(val4, true, false); } else { Message val5 = new Message("Not enough money.", (ESenderType)1, true, -1); employeeConversation.SendMessage(val5, true, false); } OpenEmployeeSubmenu(employee); } }), true)); val2.Add(new Response("Back", "", Action.op_Implicit((Action)delegate { OpenEmployeesMenu(); }), true)); employeeConversation.ShowResponses(val2, 0f, false); } private void OpenPayrollMenu() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown employeeConversation.ClearResponses(false); float num = 0f; Employee[] array = cachedEmployees; foreach (Employee val in array) { if (!((Object)(object)val == (Object)null) && !val.PaidForToday) { num += val.DailyWage; } } Message val2 = new Message($"Outstanding Payroll: ${num}", (ESenderType)1, true, -1); employeeConversation.SendMessage(val2, true, false); List<Response> val3 = new List<Response>(); val3.Add(new Response($"Pay All Employees (${num})", "", Action.op_Implicit((Action)delegate { PayAllEmployees(cachedEmployees); OpenPayrollMenu(); }), true)); val3.Add(new Response(AutoPayrollEnabled ? "Auto Payroll [ON]" : "Auto Payroll [OFF]", "", Action.op_Implicit((Action)delegate { AutoPayrollEnabled = !AutoPayrollEnabled; OpenPayrollMenu(); }), true)); val3.Add(new Response("Back", "", Action.op_Implicit((Action)delegate { OpenMainDialogue(); }), true)); employeeConversation.ShowResponses(val3, 0f, false); } private void OpenStatsMenu() { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown employeeConversation.ClearResponses(false); int num = 0; float num2 = 0f; Employee[] array = cachedEmployees; foreach (Employee val in array) { if (!((Object)(object)val == (Object)null)) { num++; num2 += val.DailyWage; } } Message val2 = new Message($"Employees: {num}\nPayroll: ${num2}\nAuto Payroll: {AutoPayrollEnabled}", (ESenderType)1, true, -1); employeeConversation.SendMessage(val2, true, false); List<Response> val3 = new List<Response>(); val3.Add(new Response("Back", "", Action.op_Implicit((Action)delegate { OpenMainDialogue(); }), true)); employeeConversation.ShowResponses(val3, 0f, false); } private float GetUpgradePrice(float currentMultiplier) { return 500f * currentMultiplier; } public static void SaveData() { try { string contents = JsonConvert.SerializeObject((object)EmployeeData, (Formatting)1); File.WriteAllText(SavePath, contents); } catch { } } public static void LoadData() { try { if (!File.Exists(SavePath)) { EmployeeData = new Dictionary<string, EmployeeUpgradeData>(); return; } string text = File.ReadAllText(SavePath); EmployeeData = JsonConvert.DeserializeObject<Dictionary<string, EmployeeUpgradeData>>(text); if (EmployeeData == null) { EmployeeData = new Dictionary<string, EmployeeUpgradeData>(); } } catch { EmployeeData = new Dictionary<string, EmployeeUpgradeData>(); } } public static EmployeeUpgradeData GetData(Employee employee) { if ((Object)(object)employee == (Object)null) { return new EmployeeUpgradeData(); } string text = ((Object)employee).name; if (string.IsNullOrEmpty(text)) { text = ((Object)employee).GetInstanceID().ToString(); } if (!EmployeeData.ContainsKey(text)) { EmployeeData[text] = new EmployeeUpgradeData(); } return EmployeeData[text]; } public static bool PayEmployee(Employee employee) { try { if ((Object)(object)employee == (Object)null) { return false; } if (employee.PaidForToday) { return false; } float dailyWage = employee.DailyWage; if (NetworkSingleton<MoneyManager>.Instance.onlineBalance < dailyWage) { return false; } NetworkSingleton<MoneyManager>.Instance.CreateOnlineTransaction("Employee Payment", 0f - dailyWage, 1f, "Extended Employees"); typeof(Employee).GetProperty("PaidForToday")?.SetValue(employee, true); return true; } catch { return false; } } public static void PayAllEmployees(Employee[] employees) { foreach (Employee val in employees) { if (!((Object)(object)val == (Object)null)) { PayEmployee(val); } } } } public class EmployeeUpgradeData { public float WorkSpeedMultiplier = 1f; public float WalkSpeedMultiplier = 1f; } [HarmonyPatch(typeof(Employee), "get_CurrentWorkSpeed")] public class EmployeeSpeedPatch { private static void Postfix(Employee __instance, ref float __result) { EmployeeUpgradeData data = Core.GetData(__instance); __result *= data.WorkSpeedMultiplier; } }