Some mods target the Mono version of the game, which is available by opting into the Steam beta branch "alternate"
Decompiled source of 4Hire v1.0.0
4Hire.IL2CPP.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using System.Text.Json; using System.Text.RegularExpressions; using System.Threading; using FourHire.Core; using FourHire.Runtime; using FourHire.UI; using HarmonyLib; using Il2Cpp; using Il2CppFishNet; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppScheduleOne; using Il2CppScheduleOne.DevUtilities; using Il2CppScheduleOne.Employees; using Il2CppScheduleOne.GameTime; using Il2CppScheduleOne.Management; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.NPCs; using Il2CppScheduleOne.NPCs.CharacterClasses; using Il2CppScheduleOne.Persistence; using Il2CppScheduleOne.PlayerScripts; using Il2CppScheduleOne.Property; using Il2CppScheduleOne.Tools; using Il2CppScheduleOne.UI; using Il2CppScheduleOne.UI.Phone; using Il2CppScheduleOne.Variables; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using MelonLoader; using MelonLoader.Preferences; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using Tomlet; using Tomlet.Models; using UnityEngine; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: MelonInfo(typeof(Main), "4Hire", "1.0", "Gamefadder", null)] [assembly: MelonGame("TVGS", "Schedule I")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("4Hire.IL2CPP")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0")] [assembly: AssemblyProduct("4Hire.IL2CPP")] [assembly: AssemblyTitle("4Hire.IL2CPP")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [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 FourHire.UI { internal static class PhoneArt { private sealed record HoverGroup(GameObject Fallback, IReadOnlyList<(Button Button, GameObject Panel)> Entries); private sealed class RoundButton(Button button, RectTransform rect) { internal Image? Portrait; internal readonly Button Button = button; internal readonly RectTransform Rect = rect; internal float Scale = 1f; internal bool Hovered; } internal static readonly Color Ink = new Color(0.018f, 0.055f, 0.05f, 1f); internal static readonly Color Panel = new Color(0.045f, 0.12f, 0.105f, 1f); internal static readonly Color White = new Color(0.94f, 0.98f, 0.91f, 1f); internal static readonly Color Mint = new Color(0.706f, 0.91f, 0.77f, 1f); internal static readonly Color Lime = new Color(0.792f, 1f, 0.392f, 1f); internal static readonly Color Peach = new Color(1f, 0.745f, 0.49f, 1f); internal static readonly Color Muted = new Color(0.52f, 0.66f, 0.62f, 1f); private static readonly Dictionary<string, Sprite> Sprites = new Dictionary<string, Sprite>(); private static readonly Dictionary<string, Color32[]> LinePixels = new Dictionary<string, Color32[]>(); private static readonly Dictionary<string, (Texture2D Texture, Sprite Sprite, string Geometry)> MaskedLines = new Dictionary<string, (Texture2D, Sprite, string)>(); private static readonly List<DecorationObstacle> Obstacles = new List<DecorationObstacle>(); private static readonly List<(Image Image, string Kind)> LineImages = new List<(Image, string)>(); private static readonly List<RoundButton> RoundButtons = new List<RoundButton>(); private static readonly List<HoverGroup> HoverGroups = new List<HoverGroup>(); private static Transform? decorationRoot; internal static Font Font = null; internal static void TickHover(float unscaledDeltaTime) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) for (int num = RoundButtons.Count - 1; num >= 0; num--) { RoundButton roundButton = RoundButtons[num]; if (!Object.op_Implicit((Object)(object)roundButton.button) || !Object.op_Implicit((Object)(object)roundButton.rect)) { RoundButtons.RemoveAt(num); continue; } int num2; int num3; if (((Component)roundButton.button).gameObject.activeInHierarchy) { num2 = (((Selectable)roundButton.button).IsInteractable() ? 1 : 0); if (num2 != 0) { num3 = (((Selectable)roundButton.button).isPointerInside ? 1 : 0); goto IL_0079; } } else { num2 = 0; } num3 = 0; goto IL_0079; IL_0079: bool flag = (byte)num3 != 0; if (flag != roundButton.Hovered) { ColorBlock colors = ((Selectable)roundButton.button).colors; ((ColorBlock)(ref colors)).selectedColor = (flag ? ((ColorBlock)(ref colors)).highlightedColor : ((ColorBlock)(ref colors)).normalColor); ((Selectable)roundButton.button).colors = colors; Image portrait = roundButton.Portrait; if (portrait != null && Object.op_Implicit((Object)(object)portrait)) { ((Graphic)portrait).CrossFadeColor(flag ? ((ColorBlock)(ref colors)).highlightedColor : Color.white, ((ColorBlock)(ref colors)).fadeDuration, true, true); } roundButton.Hovered = flag; } float num4 = ((num2 != 0) ? RoundHoverPolicy.Next(roundButton.Scale, flag, unscaledDeltaTime) : 1f); if (num4 != roundButton.Scale) { roundButton.Scale = num4; ((Transform)roundButton.rect).localScale = Vector3.one * num4; } } foreach (HoverGroup hoverGroup in HoverGroups) { if (!Object.op_Implicit((Object)(object)hoverGroup.Fallback)) { continue; } GameObject val = null; foreach (var entry in hoverGroup.Entries) { if (Object.op_Implicit((Object)(object)entry.Button) && ((Component)entry.Button).gameObject.activeInHierarchy && ((Selectable)entry.Button).IsInteractable() && ((Selectable)entry.Button).isPointerInside) { val = entry.Panel; break; } } foreach (var entry2 in hoverGroup.Entries) { if (Object.op_Implicit((Object)(object)entry2.Panel) && entry2.Panel.activeSelf != ((Object)(object)entry2.Panel == (Object)(object)val)) { entry2.Panel.SetActive((Object)(object)entry2.Panel == (Object)(object)val); } } if (hoverGroup.Fallback.activeSelf != ((Object)(object)val == (Object)null)) { hoverGroup.Fallback.SetActive((Object)(object)val == (Object)null); } } } internal static void InspectOnHover(GameObject fallback, IReadOnlyList<(Button Button, GameObject Panel)> entries) { foreach (var entry in entries) { entry.Panel.SetActive(false); } HoverGroups.Add(new HoverGroup(fallback, entries)); } internal static void ResetHover() { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) foreach (HoverGroup hoverGroup in HoverGroups) { foreach (var entry in hoverGroup.Entries) { if (Object.op_Implicit((Object)(object)entry.Panel)) { entry.Panel.SetActive(false); } } if (Object.op_Implicit((Object)(object)hoverGroup.Fallback)) { hoverGroup.Fallback.SetActive(true); } } HoverGroups.Clear(); foreach (RoundButton roundButton in RoundButtons) { if (Object.op_Implicit((Object)(object)roundButton.rect)) { ((Transform)roundButton.rect).localScale = Vector3.one; } Image portrait = roundButton.Portrait; if (portrait != null && Object.op_Implicit((Object)(object)portrait)) { ((Graphic)portrait).CrossFadeColor(Color.white, 0f, true, true); } if (Object.op_Implicit((Object)(object)roundButton.button) && roundButton.Hovered) { ColorBlock colors = ((Selectable)roundButton.button).colors; ((ColorBlock)(ref colors)).selectedColor = ((ColorBlock)(ref colors)).normalColor; ((Selectable)roundButton.button).colors = colors; } } RoundButtons.Clear(); } internal static RectTransform Group(Transform parent, string name, float x, float y, float w, float h) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.SetActive(false); RectTransform obj = val.AddComponent<RectTransform>(); ((Transform)obj).SetParent(parent, false); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0f, 1f); obj.anchorMax = val2; obj.anchorMin = val2; obj.pivot = new Vector2(0f, 1f); obj.anchoredPosition = new Vector2(x, 0f - y); obj.sizeDelta = new Vector2(w, h); val.SetActive(true); return obj; } internal static Image Image(Transform parent, string shape, float x, float y, float w, float h, Color color) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) RectTransform val = Group(parent, shape, x, y, w, h); Image val2 = ((Component)val).gameObject.AddComponent<Image>(); val2.sprite = Sprite(shape); ((Graphic)val2).color = color; ((Graphic)val2).raycastTarget = false; bool flag; switch (shape) { case "pill": case "pill-active": case "action": flag = true; break; default: flag = false; break; } if (flag) { val2.type = (Type)1; Rect rect = val2.sprite.rect; val2.pixelsPerUnitMultiplier = PhoneImagePolicy.CapsuleDensity(((Rect)(ref rect)).height, h, val2.pixelsPerUnit); } else { flag = !shape.StartsWith("nav"); if (flag) { bool flag2; switch (shape) { case "backdrop": case "night-arc": case "transfer-arrow": flag2 = true; break; default: flag2 = false; break; } flag = !flag2; } if (flag) { val2.preserveAspect = true; PhoneImagePolicy.Placement placement = PhoneImagePolicy.Centered(x, y, w, h); val.pivot = new Vector2(placement.PivotX, placement.PivotY); val.anchoredPosition = new Vector2(placement.X, placement.Y); } } if ((Object)(object)decorationRoot != (Object)null && Object.op_Implicit((Object)(object)decorationRoot)) { flag = shape.StartsWith("orb-"); if (!flag) { bool flag2; switch (shape) { case "pill": case "pill-active": case "action": case "donut": flag2 = true; break; default: flag2 = false; break; } flag = flag2; } if (flag) { DecorationObstacle decorationObstacle = DecorationBounds(((Graphic)val2).rectTransform); if (shape.StartsWith("orb-")) { float num = 0.95399994f; decorationObstacle = decorationObstacle with { X = decorationObstacle.X + decorationObstacle.Width * (1f - num) / 2f, Y = decorationObstacle.Y + decorationObstacle.Height * (1f - num) / 2f, Width = decorationObstacle.Width * num, Height = decorationObstacle.Height * num }; } Obstacles.Add(decorationObstacle with { Radius = Math.Min(decorationObstacle.Width, decorationObstacle.Height) / 2f }); } switch (shape) { case "hire-ring": case "night-arc": case "transfer-arrow": flag = true; break; default: flag = false; break; } if (flag) { LineImages.Add((val2, shape)); } } return val2; } internal static void WorkerFace(Transform parent, Sprite? portrait, string initials, float x, float y, float diameter, Button? owner = null) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)portrait)) { Text(parent, initials, x, y, diameter, diameter, (int)(diameter * 0.38f), Mint, bold: true, (TextAnchor)4); return; } Image obj = Image(parent, "disc", x, y, diameter, diameter, Color.white); ((Component)obj).gameObject.AddComponent<Mask>().showMaskGraphic = false; RectTransform obj2 = Group(((Component)obj).transform, "Worker face", 0f, 0f, diameter, diameter); PhoneImagePolicy.Placement placement = PhoneImagePolicy.Centered(0f, 0f, diameter, diameter); obj2.pivot = new Vector2(placement.PivotX, placement.PivotY); obj2.anchoredPosition = new Vector2(placement.X, placement.Y); Image val = ((Component)obj2).gameObject.AddComponent<Image>(); val.sprite = portrait; ((Graphic)val).color = Color.white; val.preserveAspect = true; ((Graphic)val).raycastTarget = false; if ((Object)(object)owner != (Object)null) { RoundButton roundButton = RoundButtons.FirstOrDefault((RoundButton r) => (Object)(object)r.button == (Object)(object)owner); if (roundButton != null) { roundButton.Portrait = val; } } } internal static void BeginDecoration(Transform parent) { ResetHover(); decorationRoot = parent; Obstacles.Clear(); LineImages.Clear(); Obstacles.Add(new DecorationObstacle(0f, 990f, 720f, 220f, 0f)); } private static DecorationObstacle DecorationBounds(RectTransform rect) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) Rect rect2 = rect.rect; Vector2 center = ((Rect)(ref rect2)).center; Vector3 val = decorationRoot.InverseTransformPoint(((Transform)rect).TransformPoint(new Vector3(center.x, center.y, 0f))); float x = val.x; rect2 = rect.rect; float x2 = x - ((Rect)(ref rect2)).width / 2f; float num = 0f - val.y; rect2 = rect.rect; float y = num - ((Rect)(ref rect2)).height / 2f; rect2 = rect.rect; float width = ((Rect)(ref rect2)).width; rect2 = rect.rect; return new DecorationObstacle(x2, y, width, ((Rect)(ref rect2)).height, 0f); } internal static void FinishDecoration(Image background) { //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Expected O, but got Unknown //IL_0339: Expected O, but got Unknown LineImages.Insert(0, (background, "backdrop-lines")); try { foreach (var lineImage in LineImages) { Image item = lineImage.Image; string item2 = lineImage.Kind; Texture2D texture = Sprite(item2).texture; int width = ((Texture)texture).width; int height = ((Texture)texture).height; DecorationObstacle decorationObstacle = DecorationBounds(((Graphic)item).rectTransform); string text = decorationObstacle.ToString() + "|" + string.Join("|", Obstacles); if (MaskedLines.TryGetValue(item2, out (Texture2D, Sprite, string) value) && value.Item3 == text) { item.sprite = value.Item2; continue; } if (!LinePixels.TryGetValue(item2, out Color32[] value2)) { value2 = (LinePixels[item2] = ((IEnumerable<Color32>)texture.GetPixels32(0)).ToArray()); } Color32[] array2 = (Color32[])value2.Clone(); foreach (DecorationObstacle obstacle in Obstacles) { int num = Math.Clamp((int)Math.Floor((obstacle.X - 10f - decorationObstacle.X) / decorationObstacle.Width * (float)width), 0, width); int num2 = Math.Clamp((int)Math.Ceiling((obstacle.X + obstacle.Width + 10f - decorationObstacle.X) / decorationObstacle.Width * (float)width), 0, width); int num3 = Math.Clamp((int)Math.Floor((1f - (obstacle.Y + obstacle.Height + 10f - decorationObstacle.Y) / decorationObstacle.Height) * (float)height), 0, height); int num4 = Math.Clamp((int)Math.Ceiling((1f - (obstacle.Y - 10f - decorationObstacle.Y) / decorationObstacle.Height) * (float)height), 0, height); for (int i = num3; i < num4; i++) { for (int j = num; j < num2; j++) { int num5 = i * width + j; if (array2[num5].a != 0) { float x = decorationObstacle.X + ((float)j + 0.5f) / (float)width * decorationObstacle.Width; float y = decorationObstacle.Y + (1f - ((float)i + 0.5f) / (float)height) * decorationObstacle.Height; array2[num5].a = (byte)((float)(int)array2[num5].a * obstacle.Visibility(x, y)); } } } } if (!MaskedLines.TryGetValue(item2, out (Texture2D, Sprite, string) value3)) { Texture2D val = new Texture2D(width, height, (TextureFormat)4, true) { name = "4Hire spaced decoration " + item2, wrapMode = (TextureWrapMode)1, filterMode = (FilterMode)2 }; Sprite item3 = Sprite.Create(val, new Rect(0f, 0f, (float)width, (float)height), new Vector2(0.5f, 0.5f)); value3 = (val, item3, text); } value3.Item1.SetPixels32(new Il2CppStructArray<Color32>(array2)); value3.Item1.Apply(true, false); MaskedLines[item2] = (value3.Item1, value3.Item2, text); item.sprite = value3.Item2; } } finally { decorationRoot = null; } } internal static void ReleaseDecoration() { ResetHover(); foreach (var value in MaskedLines.Values) { Object.Destroy((Object)(object)value.Sprite); Object.Destroy((Object)(object)value.Texture); } MaskedLines.Clear(); LinePixels.Clear(); Obstacles.Clear(); LineImages.Clear(); decorationRoot = null; } internal static Text Text(Transform parent, string value, float x, float y, float w, float h, int size = 24, Color? color = null, bool bold = false, TextAnchor align = (TextAnchor)4) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) RectTransform val = Group(parent, "Text", x, y, w, h); Text obj = ((Component)val).gameObject.AddComponent<Text>(); obj.font = Font; obj.text = value; obj.fontSize = size; ((Graphic)obj).color = (Color)(((??)color) ?? White); obj.fontStyle = (FontStyle)(bold ? 1 : 0); obj.alignment = align; obj.horizontalOverflow = (HorizontalWrapMode)0; obj.verticalOverflow = (VerticalWrapMode)0; obj.resizeTextForBestFit = true; obj.resizeTextMinSize = Math.Max(13, size - 6); obj.resizeTextMaxSize = size; ((Graphic)obj).raycastTarget = false; obj.supportRichText = true; if ((Object)(object)decorationRoot != (Object)null && Object.op_Implicit((Object)(object)decorationRoot) && (Object)(object)parent == (Object)(object)decorationRoot && !string.IsNullOrWhiteSpace(value)) { DecorationObstacle decorationObstacle = DecorationBounds(val); Obstacles.Add(decorationObstacle with { Radius = Math.Min(12f, h / 2f) }); } return obj; } internal static Button Button(Transform parent, string label, float x, float y, float w, float h, Action action, Color? color = null, int font = 24, bool enabled = true, string shape = "pill") { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) if (shape == "pill") { Color? val = color; Color lime = Lime; if (val.HasValue && val.GetValueOrDefault() == lime) { shape = "action"; } } bool flag; switch (shape) { case "pill": case "pill-active": case "action": flag = true; break; default: flag = false; break; } Color color2 = (Color)(flag ? Color.white : (((??)color) ?? Panel)); Image val2 = Image(parent, shape, x, y, w, h, color2); ((Graphic)val2).raycastTarget = true; Button val3 = ((Component)val2).gameObject.AddComponent<Button>(); ((Selectable)val3).targetGraphic = (Graphic)(object)val2; ((Selectable)val3).interactable = enabled; ((UnityEvent)val3.onClick).AddListener(UnityAction.op_Implicit(action)); ColorBlock colors = ((Selectable)val3).colors; ((ColorBlock)(ref colors)).normalColor = Color.white; ((ColorBlock)(ref colors)).highlightedColor = new Color(0.58f, 0.65f, 0.58f, 1f); ((ColorBlock)(ref colors)).pressedColor = new Color(0.35f, 0.45f, 0.35f, 1f); ((ColorBlock)(ref colors)).selectedColor = Color.white; ((ColorBlock)(ref colors)).disabledColor = new Color(0.55f, 0.6f, 0.58f, 0.65f); ((ColorBlock)(ref colors)).fadeDuration = 0.08f; ((Selectable)val3).colors = colors; if (RoundHoverPolicy.AppliesTo(shape)) { RoundButtons.Add(new RoundButton(val3, ((Graphic)val2).rectTransform)); } if (shape.StartsWith("nav")) { val2.alphaHitTestMinimumThreshold = 0.2f; } if (!string.IsNullOrEmpty(label)) { Color value = ((shape == "action") ? Ink : ((shape == "pill-active") ? Lime : White)); if (!enabled) { value.a *= 0.35f; } Text(((Component)val2).transform, label, 5f, 1f, w - 10f, h - 2f, font, value, bold: true, (TextAnchor)4); } return val3; } internal static void Ring(Transform parent, float cx, float cy, float diameter, Color color, bool glow = false) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (glow) { Image(parent, "glow", cx - diameter * 0.6f, cy - diameter * 0.6f, diameter * 1.2f, diameter * 1.2f, new Color(color.r, color.g, color.b, 0.27f)); } Image(parent, "ring", cx - diameter / 2f, cy - diameter / 2f, diameter, diameter, color); } internal static Button Node(Transform parent, float cx, float cy, float diameter, string icon, string name, string count, string detail, bool selected, Action action) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) Color color = (selected ? Peach : Mint); Button val = Button(parent, "", cx - diameter / 2f, cy - diameter / 2f, diameter, diameter, action, Color.white, 24, enabled: true, selected ? "orb-peach" : "orb-mint"); Image(((Component)val).transform, icon, diameter * 0.34f, diameter * 0.15f, diameter * 0.32f, diameter * 0.25f, color); Text(((Component)val).transform, name, diameter * 0.08f, diameter * 0.42f, diameter * 0.84f, diameter * 0.16f, (int)(diameter * 0.1f), White, bold: true, (TextAnchor)4); Text(((Component)val).transform, count, diameter * 0.08f, diameter * 0.57f, diameter * 0.84f, diameter * 0.2f, (int)(diameter * 0.15f), Lime, bold: true, (TextAnchor)4); if (!string.IsNullOrWhiteSpace(detail)) { Text(((Component)val).transform, detail, diameter * 0.08f, diameter * 0.77f, diameter * 0.84f, diameter * 0.12f, (int)(diameter * 0.075f), Mint, bold: true, (TextAnchor)4); } return val; } internal static void Toggle(Transform parent, string label, float x, float y, float w, bool on, Action change, bool enabled = true) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) Text(parent, label, x, y, w, 38f, 23, White, bold: true, (TextAnchor)4); Image(((Component)Button(parent, "", x + w / 2f - 49f, y + 48f, 98f, 50f, change, (Color)(on ? Lime : new Color(0.16f, 0.2f, 0.19f)), 24, enabled)).transform, "disc", on ? 52 : 7, 7f, 36f, 36f, on ? White : Muted); Text(parent, on ? "ON" : "OFF", x, y + 103f, w, 25f, 15, on ? Lime : Muted, bold: true, (TextAnchor)4); } internal static void Line(Transform parent, Vector2 from, Vector2 to, Color color, float thickness = 2f) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) Vector2 val = to - from; RectTransform obj = Group(parent, "Route", from.x, from.y, ((Vector2)(ref val)).magnitude, thickness); obj.pivot = new Vector2(0f, 0.5f); ((Transform)obj).localRotation = Quaternion.Euler(0f, 0f, (0f - Mathf.Atan2(val.y, val.x)) * 57.29578f); Image obj2 = ((Component)obj).gameObject.AddComponent<Image>(); ((Graphic)obj2).color = color; ((Graphic)obj2).raycastTarget = false; } internal static Sprite Sprite(string kind) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) if (Sprites.TryGetValue(kind, out Sprite value) && Object.op_Implicit((Object)(object)value)) { return value; } using Stream stream = typeof(PhoneArt).Assembly.GetManifestResourceStream("FourHire.PhoneArt." + kind + ".png"); bool flag; if (stream != null) { using (MemoryStream memoryStream = new MemoryStream()) { stream.CopyTo(memoryStream); Texture2D val = new Texture2D(2, 2, (TextureFormat)4, true); if (!ImageConversion.LoadImage(val, new Il2CppStructArray<byte>(memoryStream.ToArray()), false)) { throw new InvalidOperationException("Could not decode embedded 4Hire artwork: " + kind); } ((Object)val).name = "4Hire SVG " + kind; ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)2; Texture2D val2 = val; flag = kind.StartsWith("nav"); if (!flag) { bool flag2; switch (kind) { case "backdrop-lines": case "hire-ring": case "night-arc": case "transfer-arrow": flag2 = true; break; default: flag2 = false; break; } flag = flag2; } val2.Apply(true, !flag); switch (kind) { case "pill": case "pill-active": case "action": flag = true; break; default: flag = false; break; } Vector4 val3 = (Vector4)(flag ? new Vector4((float)((Texture)val).height / 2f, (float)((Texture)val).height / 2f, (float)((Texture)val).height / 2f, (float)((Texture)val).height / 2f) : Vector4.zero); Sprite val4 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f, 0u, (SpriteMeshType)0, val3); Sprites[kind] = val4; return val4; } } Color32[] array = (Color32[])(object)new Color32[147456]; for (int i = 0; i < 384; i++) { for (int j = 0; j < 384; j++) { float x = ((float)j + 0.5f) / 384f * 2f - 1f; float y = ((float)i + 0.5f) / 384f * 2f - 1f; PhoneRaster.Pixel pixel = PhoneRaster.Sample(kind, x, y); array[i * 384 + j] = new Color32((byte)(pixel.R * 255f), (byte)(pixel.G * 255f), (byte)(pixel.B * 255f), (byte)(pixel.A * 255f)); } } Texture2D val5 = new Texture2D(384, 384, (TextureFormat)4, true); ((Object)val5).name = "4Hire " + kind; ((Object)val5).hideFlags = (HideFlags)32; ((Texture)val5).wrapMode = (TextureWrapMode)1; ((Texture)val5).filterMode = (FilterMode)2; val5.SetPixels32(new Il2CppStructArray<Color32>(array)); val5.Apply(true, !kind.StartsWith("nav")); flag = ((kind == "pill" || kind == "action") ? true : false); Vector4 val6 = (Vector4)(flag ? new Vector4(96f, 96f, 96f, 96f) : Vector4.zero); Sprite val7 = Sprite.Create(val5, new Rect(0f, 0f, 384f, 384f), new Vector2(0.5f, 0.5f), 100f, 0u, (SpriteMeshType)0, val6); ((Object)val7).name = "4Hire " + kind; ((Object)val7).hideFlags = (HideFlags)32; Sprites[kind] = val7; return val7; } } internal enum Page { Network, Hire, Move, Wages, Rules, ChooseSource, ChooseDestination, ChooseEmployees, ChooseWageProperty } internal sealed class PhoneView : IDisposable { private sealed record NativeStatusLabel(Text Source, Text Copy, Vector2 Min, Vector2 Max, float FontRatio); internal static PhoneView? Instance; private readonly HomeScreen home; private readonly AppsCanvas apps; private readonly Phone phone; private readonly GameObject root; private readonly GameObject icon; private readonly RectTransform surface; private readonly RectTransform portrait; private readonly RectTransform statusBand; private readonly Image decorativeBackground; private readonly List<NativeStatusLabel> statusLabels = new List<NativeStatusLabel>(); private float statusRatio = 0.035f; private RectTransform? content; private readonly Button iconButton; private readonly Action closeAction; private readonly Action openedAction; private readonly ExitDelegate exitAction; private bool open; private bool dirty = true; private readonly KeyPressLatch shortcutPress = new KeyPressLatch(); private readonly KeyPressLatch escapePress = new KeyPressLatch(); private float nextPoll; private float noticeUntil; private Page page; private Page returnPage; private List<Site> sites = new List<Site>(); private string selected = ""; private string destination = ""; private string digest = ""; private string notice = ""; private readonly HashSet<string> movers = new HashSet<string>(); private readonly HashSet<string> wageWorkers = new HashSet<string>(); private string wageProperty = ""; private readonly Dictionary<string, Sprite> workerPortraits = new Dictionary<string, Sprite>(); private int propertyPage; private int workerPage; private int wageWorkerPage; private int wageChartPage; private int role; private int quantity = 1; private float lastWidth; private float lastHeight; private Text? bankLabel; private Site? Source => sites.FirstOrDefault((Site x) => x.Id == selected); private Site? Destination => sites.FirstOrDefault((Site x) => x.Id == destination && x.Id != selected); private static bool Sleeping { get { if (NetworkSingleton<SleepController>.InstanceExists) { return NetworkSingleton<SleepController>.Instance.IsSleepInProgress; } return false; } } private PhoneView(HomeScreen home, AppsCanvas apps, Phone phone) { //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) this.home = home; this.apps = apps; this.phone = phone; PhoneArt.Font = (Object.op_Implicit((Object)(object)home.timeText) ? home.timeText.font : null); if (!Object.op_Implicit((Object)(object)PhoneArt.Font) && Object.op_Implicit((Object)(object)home.appIconPrefab)) { Text componentInChildren = home.appIconPrefab.GetComponentInChildren<Text>(true); if (Object.op_Implicit((Object)(object)componentInChildren)) { PhoneArt.Font = componentInChildren.font; } } if (!Object.op_Implicit((Object)(object)PhoneArt.Font)) { PhoneArt.Font = Font.GetDefault(); } if (!Object.op_Implicit((Object)(object)PhoneArt.Font)) { throw new InvalidOperationException("The phone's native font is not available yet."); } RectTransform val = PhoneArt.Group(((Component)apps.canvas).transform, "4Hire.Phone", 0f, 0f, 720f, 1200f); val.anchorMin = Vector2.zero; val.anchorMax = Vector2.one; Vector2 val2 = (val.offsetMin = (val.offsetMax = Vector2.zero)); val.pivot = new Vector2(0.5f, 0.5f); ((Component)val).gameObject.AddComponent<RectMask2D>(); root = ((Component)val).gameObject; Image val4 = PhoneArt.Image((Transform)(object)val, "backdrop-base", 0f, 0f, 720f, 1200f, Color.white); val4.preserveAspect = false; ((Graphic)val4).rectTransform.anchorMin = Vector2.zero; ((Graphic)val4).rectTransform.anchorMax = Vector2.one; val2 = (((Graphic)val4).rectTransform.offsetMin = (((Graphic)val4).rectTransform.offsetMax = Vector2.zero)); ((Graphic)val4).raycastTarget = true; portrait = PhoneArt.Group((Transform)(object)val, "4Hire portrait viewport", 0f, 0f, 720f, 1200f); RectTransform obj = portrait; RectTransform obj2 = portrait; ((Vector2)(ref val2))..ctor(0.5f, 0.5f); obj2.anchorMax = val2; obj.anchorMin = val2; portrait.pivot = new Vector2(0.5f, 0.5f); portrait.anchoredPosition = Vector2.zero; statusBand = PhoneArt.Group((Transform)(object)portrait, "Native phone status", 0f, 0f, 720f, 42f); ((Graphic)((Component)statusBand).gameObject.AddComponent<Image>()).color = new Color(0.12f, 0.13f, 0.13f, 1f); CopyNativeStatus(home.timeText); foreach (Text componentsInChild in ((Component)home).GetComponentsInChildren<Text>(true)) { if ((Object)(object)componentsInChild != (Object)(object)home.timeText && componentsInChild.text?.Trim() == "5G") { CopyNativeStatus(componentsInChild); break; } } surface = PhoneArt.Group((Transform)(object)portrait, "4Hire content surface", 0f, 0f, 720f, 1200f); RectTransform obj3 = surface; RectTransform obj4 = surface; ((Vector2)(ref val2))..ctor(0.5f, 0.5f); obj4.anchorMax = val2; obj3.anchorMin = val2; surface.pivot = new Vector2(0.5f, 0.5f); surface.anchoredPosition = Vector2.zero; decorativeBackground = PhoneArt.Image((Transform)(object)surface, "backdrop-lines", 0f, 0f, 720f, 1200f, Color.white); decorativeBackground.preserveAspect = false; root.SetActive(false); Transform val6 = ((Component)home).transform.Find("AppIconsScrollView/Viewport/AppIcons"); if (!Object.op_Implicit((Object)(object)val6)) { val6 = (Transform)(object)home.appIconContainer; } icon = Object.Instantiate<GameObject>(home.appIconPrefab, val6); ((Object)icon).name = "4Hire app icon"; Transform val7 = icon.transform.Find("Label"); if (Object.op_Implicit((Object)(object)val7)) { ((Component)val7).GetComponent<Text>().text = "4Hire"; } Transform val8 = icon.transform.Find("Mask/Image"); if (Object.op_Implicit((Object)(object)val8)) { Image component = ((Component)val8).GetComponent<Image>(); component.sprite = PhoneArt.Sprite("app-icon"); ((Graphic)component).color = Color.white; component.preserveAspect = true; } Transform val9 = icon.transform.Find("Notifications"); if (Object.op_Implicit((Object)(object)val9)) { ((Component)val9).gameObject.SetActive(false); } iconButton = icon.GetComponent<Button>(); ((UnityEventBase)iconButton.onClick).RemoveAllListeners(); ((UnityEvent)iconButton.onClick).AddListener(UnityAction.op_Implicit((Action)Open)); home.appIcons.Add(iconButton); closeAction = Action.op_Implicit((Action)Close); openedAction = Action.op_Implicit((Action)RestorePhoneHome); phone.closeApps += closeAction; phone.onPhoneClosed += closeAction; phone.onPhoneOpened += openedAction; exitAction = ExitDelegate.op_Implicit((Action<ExitAction>)HandleExit); GameInput.RegisterExitListener(exitAction, 1); } private void CopyNativeStatus(Text source) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)source)) { return; } RectTransform component = ((Component)home.canvas).GetComponent<RectTransform>(); Rect rect = component.rect; if (!(((Rect)(ref rect)).width <= 0f) && !(((Rect)(ref rect)).height <= 0f)) { Il2CppStructArray<Vector3> val = new Il2CppStructArray<Vector3>(4L); ((Graphic)source).rectTransform.GetWorldCorners(val); Vector3 val2 = ((Transform)component).InverseTransformPoint(((Il2CppArrayBase<Vector3>)(object)val)[0]); Vector3 val3 = ((Transform)component).InverseTransformPoint(((Il2CppArrayBase<Vector3>)(object)val)[2]); Vector2 val4 = default(Vector2); ((Vector2)(ref val4))..ctor((val2.x - ((Rect)(ref rect)).xMin) / ((Rect)(ref rect)).width, (val2.y - ((Rect)(ref rect)).yMin) / ((Rect)(ref rect)).height); Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor((val3.x - ((Rect)(ref rect)).xMin) / ((Rect)(ref rect)).width, (val3.y - ((Rect)(ref rect)).yMin) / ((Rect)(ref rect)).height); if (!(val4.y < 0.85f) && !(val5.y <= val4.y) && !(val5.x <= val4.x)) { Text component2 = Object.Instantiate<GameObject>(((Component)source).gameObject, (Transform)(object)portrait).GetComponent<Text>(); ((Object)((Component)component2).gameObject).name = "4Hire native status text"; ((Component)component2).gameObject.SetActive(true); ((Graphic)component2).raycastTarget = false; component2.resizeTextForBestFit = false; float num = Mathf.Abs(((Transform)((Graphic)source).rectTransform).lossyScale.y / ((Transform)component).lossyScale.y); statusLabels.Add(new NativeStatusLabel(source, component2, val4, val5, (float)source.fontSize * num / ((Rect)(ref rect)).height)); statusRatio = Math.Clamp(Math.Max(statusRatio, 1f - val4.y), 0.02f, 0.08f); } } } internal static bool TryCreate() { if (Instance != null) { return true; } if (!PlayerSingleton<HomeScreen>.InstanceExists || !PlayerSingleton<AppsCanvas>.InstanceExists || !PlayerSingleton<Phone>.InstanceExists) { return false; } Instance = new PhoneView(PlayerSingleton<HomeScreen>.Instance, PlayerSingleton<AppsCanvas>.Instance, PlayerSingleton<Phone>.Instance); return true; } private void Open() { if (GameService.Ready && (phone.IsOpen || phone.isOpenable) && (!NetworkSingleton<SleepController>.InstanceExists || !NetworkSingleton<SleepController>.Instance.IsSleepInProgress)) { if (Object.op_Implicit((Object)(object)Phone.ActiveApp) && (Object)(object)Phone.ActiveApp != (Object)(object)root) { phone.RequestCloseApp(); } if (!phone.IsOpen) { phone.SetIsOpen(true); } phone.SetIsHorizontal(false); phone.SetLookOffsetMultiplier(1f); apps.SetIsOpen(true); home.SetIsOpen(false); if (Singleton<GameplayMenuInterface>.InstanceExists) { Singleton<GameplayMenuInterface>.Instance.Close(); } Phone.ActiveApp = root; root.SetActive(true); root.transform.SetAsLastSibling(); open = true; dirty = true; nextPoll = 0f; Poll(); Fit(); Render(); } } private void Close() { if (!open) { return; } open = false; PhoneArt.ResetHover(); bool num = (Object)(object)Phone.ActiveApp == (Object)(object)root; if (Object.op_Implicit((Object)(object)root)) { root.SetActive(false); } if (num) { Phone.ActiveApp = null; } if ((num || !Object.op_Implicit((Object)(object)Phone.ActiveApp)) && Object.op_Implicit((Object)(object)phone) && Object.op_Implicit((Object)(object)apps) && Object.op_Implicit((Object)(object)home)) { phone.SetIsHorizontal(false); phone.SetLookOffsetMultiplier(1f); apps.SetIsOpen(false); home.SetIsOpen(true); if (phone.IsOpen && Singleton<GameplayMenuInterface>.InstanceExists) { Singleton<GameplayMenuInterface>.Instance.Open(); } } } private void RestorePhoneHome() { if (!open && !Object.op_Implicit((Object)(object)Phone.ActiveApp) && Object.op_Implicit((Object)(object)phone) && Object.op_Implicit((Object)(object)apps) && Object.op_Implicit((Object)(object)home)) { apps.SetIsOpen(false); home.SetIsOpen(true); phone.SetIsHorizontal(false); phone.SetLookOffsetMultiplier(1f); if (Singleton<GameplayMenuInterface>.InstanceExists) { Singleton<GameplayMenuInterface>.Instance.Open(); } } } internal void Tick() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) if (Pressed(Settings.OpenKey.Value, shortcutPress)) { if (open) { Close(); } else { Open(); } } else { if (!open) { return; } if ((Object)(object)Phone.ActiveApp != (Object)(object)root) { Close(); return; } if (!phone.IsOpen) { Close(); return; } if (Pressed((KeyCode)27, escapePress)) { if (page == Page.Network) { Close(); } else { Navigate(Page.Network); } return; } if (Time.realtimeSinceStartup >= nextPoll) { Poll(); } Fit(); if (noticeUntil > 0f && Time.realtimeSinceStartup >= noticeUntil) { noticeUntil = 0f; notice = ""; dirty = true; } if (dirty) { Render(); } PhoneArt.TickHover(Time.unscaledDeltaTime); } } internal void Refresh() { dirty = true; nextPoll = 0f; } internal void LanguageChanged() { notice = ""; noticeUntil = 0f; digest = ""; Refresh(); } internal void Notice(string message) { notice = message; noticeUntil = Time.realtimeSinceStartup + 7f; Refresh(); } private void Poll() { nextPoll = Time.realtimeSinceStartup + 1f; sites = GameService.Sites(); RefreshPortraits(); if (sites.All((Site x) => x.Id != selected)) { selected = sites.FirstOrDefault()?.Id ?? ""; } HashSet<string> unpaid = (from w in sites.SelectMany((Site s) => s.Workers) where !w.Paid select w.Id).ToHashSet(); wageWorkers.RemoveWhere((string id) => !unpaid.Contains(id)); if (wageProperty != "" && sites.All((Site s) => s.Id != wageProperty)) { wageProperty = ""; wageWorkerPage = 0; } string text = string.Join("|", sites.Select((Site s) => s.Id + s.Name + s.Capacity + string.Join(",", s.Workers.Select(delegate(Worker w) { string[] obj = new string[7] { w.Id, w.Name, w.Role, w.Paid.ToString(), w.Wage.ToString(), ":", null }; Sprite? obj2 = WorkerPortrait(w); obj[6] = ((obj2 != null) ? ((Object)obj2).GetInstanceID() : 0).ToString(); return string.Concat(obj); })))) + L.Language + Settings.AutoPay.Value + Settings.WagePaymentSource.Value + Settings.HirePaymentSource.Value + Settings.Housing.Value + Settings.Overnight.Value + GameService.WorkersBusy; for (int num = 0; num < GameService.Roles.Length; num++) { HiringQuote hiringQuote = GameService.HiringPrice(num, 1); text = text + "|" + hiringQuote.FirstFee + ":" + hiringQuote.DailyWage; } if (text != digest) { digest = text; dirty = true; } if ((Object)(object)bankLabel != (Object)null && Object.op_Implicit((Object)(object)bankLabel)) { bankLabel.text = GameService.Cash(GameService.Money.onlineBalance); } foreach (NativeStatusLabel statusLabel in statusLabels) { if (Object.op_Implicit((Object)(object)statusLabel.Source) && Object.op_Implicit((Object)(object)statusLabel.Copy)) { statusLabel.Copy.text = L.PhoneStatus(statusLabel.Source.text); } } } private void Fit() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) RectTransform component = root.GetComponent<RectTransform>(); Rect rect = component.rect; float num = Mathf.Abs(((Rect)(ref rect)).width); rect = component.rect; float num2 = Mathf.Abs(((Rect)(ref rect)).height); if (Math.Abs(num - lastWidth) < 0.5f && Math.Abs(num2 - lastHeight) < 0.5f) { return; } lastWidth = num; lastHeight = num2; bool flag = num > num2; float num3 = (flag ? num2 : num); float num4 = (flag ? num : num2); ((Transform)portrait).localRotation = Quaternion.Euler(0f, 0f, (float)(flag ? 90 : 0)); portrait.sizeDelta = new Vector2(num3, num4); float num5 = num4 * statusRatio; statusBand.sizeDelta = new Vector2(num3, num5); foreach (NativeStatusLabel statusLabel in statusLabels) { RectTransform rectTransform = ((Graphic)statusLabel.Copy).rectTransform; Vector2 anchorMin = (rectTransform.anchorMax = Vector2.zero); rectTransform.anchorMin = anchorMin; rectTransform.pivot = Vector2.zero; ((Transform)rectTransform).localScale = Vector3.one; ((Transform)rectTransform).localRotation = Quaternion.identity; rectTransform.anchoredPosition = new Vector2(statusLabel.Min.x * num3, statusLabel.Min.y * num4); rectTransform.sizeDelta = new Vector2((statusLabel.Max.x - statusLabel.Min.x) * num3, (statusLabel.Max.y - statusLabel.Min.y) * num4); statusLabel.Copy.fontSize = Math.Max(1, (int)Math.Round(statusLabel.FontRatio * num4)); } surface.anchoredPosition = new Vector2(0f, (0f - num5) / 2f); ((Transform)surface).localScale = Vector3.one * Math.Min(num3 / 720f, (num4 - num5) / 1200f); } private void Navigate(Page target) { page = target; dirty = true; propertyPage = ((target == Page.Network) ? (Math.Max(0, sites.FindIndex((Site s) => s.Id == selected)) / 3) : 0); } private void PropertyPage(int value, int size) { propertyPage = value; if (page == Page.Network) { Site site = sites.Skip(value * size).FirstOrDefault(); if ((object)site != null) { selected = site.Id; movers.Clear(); workerPage = 0; } } dirty = true; } private void Pick(Page picker) { returnPage = page; page = picker; propertyPage = 0; dirty = true; } private void Do(Func<string> action) { try { Notice(action()); } catch (Exception ex) { Notice(ex.Message); } } private void Render() { //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) dirty = false; if ((Object)(object)content != (Object)null && Object.op_Implicit((Object)(object)content)) { ((Component)content).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)content).gameObject); } content = PhoneArt.Group((Transform)(object)surface, "4Hire window", 0f, 0f, 720f, 1200f); PhoneArt.BeginDecoration((Transform)(object)content); Header(); if (sites.Count == 0 && page != Page.Rules) { PhoneArt.Text((Transform)(object)content, L.T("network"), 70f, 160f, 580f, 70f, 38, null, bold: true, (TextAnchor)4); PhoneArt.Ring((Transform)(object)content, 360f, 475f, 280f, PhoneArt.Mint, glow: true); PhoneArt.Image((Transform)(object)content, "house", 295f, 360f, 130f, 110f, PhoneArt.Mint); PhoneArt.Text((Transform)(object)content, L.T("network.empty"), 170f, 485f, 380f, 80f, 26, null, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)content, L.T("network.empty.detail"), 110f, 690f, 500f, 90f, 24, PhoneArt.Muted, bold: false, (TextAnchor)4); } else { switch (page) { case Page.Network: Network(); break; case Page.Hire: Hire(); break; case Page.Move: Move(); break; case Page.Wages: Wages(); break; case Page.ChooseEmployees: WageEmployees(); break; case Page.Rules: Rules(); break; default: Picker(); break; } } Navigation(); PhoneArt.FinishDecoration(decorativeBackground); } private void Header() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) Button obj = PhoneArt.Button((Transform)(object)content, "", 20f, 37f, 180f, 58f, delegate { if (page == Page.Network) { Close(); } else { Navigate(Page.Network); } }, Color.white); PhoneArt.Image(((Component)obj).transform, "orb-mint", -13f, -12f, 84f, 84f, Color.white); PhoneArt.Image(((Component)obj).transform, "home", 10f, 9f, 40f, 40f, PhoneArt.Mint); PhoneArt.Text(((Component)obj).transform, L.T("home"), 57f, 0f, 110f, 58f, 30, PhoneArt.White, bold: true, (TextAnchor)4); if (!string.IsNullOrEmpty(notice)) { PhoneArt.Image((Transform)(object)content, "pill", 213f, 17f, 487f, 82f, Color.white); PhoneArt.Text((Transform)(object)content, notice, 230f, 21f, 453f, 74f, 22, PhoneArt.Peach, bold: true, (TextAnchor)4); bankLabel = null; } else { PhoneArt.Text((Transform)(object)content, "<color=#CAFF64>4</color>Hire", 240f, 17f, 240f, 82f, 64, PhoneArt.White, bold: true, (TextAnchor)4); PhoneArt.Image((Transform)(object)content, "pill", 525f, 40f, 175f, 58f, Color.white); bankLabel = PhoneArt.Text((Transform)(object)content, GameService.Cash(GameService.Money.onlineBalance), 531f, 42f, 163f, 54f, 32, PhoneArt.Lime, bold: true, (TextAnchor)4); } } private static string SiteIcon(Site site) { return PropertyIconPolicy.For(site.Id, site.Name); } private void Network() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) PhoneArt.Text((Transform)(object)content, L.T("network"), 60f, 120f, 600f, 70f, 46, null, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)content, L.T("network.summary", L.Properties(sites.Count), L.Workers(sites.Sum((Site site) => site.Workers.Count))), 60f, 188f, 600f, 36f, 25, PhoneArt.Muted, bold: true, (TextAnchor)4); List<Site> list = sites.Skip(propertyPage * 3).Take(3).ToList(); Site focus = list.FirstOrDefault((Site site) => site.Id == selected) ?? list.FirstOrDefault(); if (focus != null) { list = new Site[1] { focus }.Concat(list.Where((Site site) => site.Id != focus.Id)).ToList(); } PhoneLayout.Node[] array = PhoneLayout.Network(list.Count); for (int num = list.Count - 1; num >= 0; num--) { Site s = list[num]; PhoneLayout.Node property = array[num]; PhoneArt.Node((Transform)(object)content, property.X, property.Y, property.Diameter, SiteIcon(s), s.Name, $"{s.Workers.Count} / {s.Capacity}", (s.Id == selected) ? L.Free(s.Free) : "", s.Id == selected, delegate { selected = s.Id; movers.Clear(); workerPage = 0; dirty = true; }); if (num == 0) { List<Worker> list2 = s.Workers.Take(4).ToList(); PhoneLayout.Node[] array2 = PhoneLayout.WorkerBadges(property, list2.Count); for (int num2 = 0; num2 < list2.Count; num2++) { float x = array2[num2].X; float y = array2[num2].Y; PhoneArt.Image((Transform)(object)content, "orb-mint", x - 34f, y - 34f, 68f, 68f, Color.white); PhoneArt.WorkerFace((Transform)(object)content, WorkerPortrait(list2[num2]), Initials(list2[num2].Name), x - 25f, y - 25f, 50f); } } } Site source = Source; if ((object)source != null) { PhoneArt.Text(((Component)PhoneArt.Button((Transform)(object)content, "", 160f, 866f, 400f, 66f, delegate { Pick(Page.ChooseSource); }, Color.white)).transform, L.T("wages.daily", GameService.Cash(source.Daily)), 10f, 4f, 380f, 58f, 27, PhoneArt.Peach, bold: true, (TextAnchor)4); } Paging(sites.Count, 3, ref propertyPage, 787f); } private void Hire() { //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) Site source = Source; PhoneArt.Text((Transform)(object)content, L.T("hire.title"), 90f, 115f, 540f, 70f, 46, null, bold: true, (TextAnchor)4); PhoneLayout.Area hireProperty = PhoneLayout.HireProperty; Button obj = PhoneArt.Button((Transform)(object)content, "", hireProperty.X, hireProperty.Y, hireProperty.Width, hireProperty.Height, delegate { Pick(Page.ChooseSource); }, null, 24, enabled: true, "pill-active"); PhoneArt.Image(((Component)obj).transform, SiteIcon(source), 26f, 21f, 58f, 46f, PhoneArt.Mint); PhoneArt.Text(((Component)obj).transform, source.Name, 100f, 7f, 270f, 42f, 32, null, bold: true, (TextAnchor)3); PhoneArt.Text(((Component)obj).transform, L.Free(source.Free), 100f, 49f, 270f, 30f, 22, PhoneArt.Mint, bold: false, (TextAnchor)3); Image val = PhoneArt.Image(((Component)obj).transform, "action", 390f, 19f, 170f, 50f, Color.white); PhoneArt.Text(((Component)val).transform, L.T("change"), 10f, 0f, 118f, 50f, 26, PhoneArt.Ink, bold: true, (TextAnchor)4); PhoneArt.Text(((Component)val).transform, "›", 127f, 0f, 30f, 50f, 35, PhoneArt.Ink, bold: true, (TextAnchor)4); ((Selectable)obj).targetGraphic = (Graphic)(object)val; PhoneArt.Image((Transform)(object)content, "hire-ring", 110f, 272f, 500f, 500f, Color.white); string[] array = new string[4] { "leaf", "box", "flask", "broom" }; PhoneLayout.Node[] hireRoles = PhoneLayout.HireRoles; for (int num = 0; num < 4; num++) { int choice = num; PhoneLayout.Node node = hireRoles[num]; Button obj2 = PhoneArt.Button((Transform)(object)content, "", node.X - node.Diameter / 2f, node.Y - node.Diameter / 2f, node.Diameter, node.Diameter, delegate { role = choice; quantity = 1; dirty = true; }, Color.white, 24, enabled: true, (num == role) ? "orb-lime" : "orb-mint"); PhoneArt.Image(((Component)obj2).transform, array[num], 52f, 30f, 72f, 66f, (num == role) ? PhoneArt.Lime : PhoneArt.Mint); PhoneArt.Text(((Component)obj2).transform, L.Role(GameService.Roles[num]), 10f, 103f, 156f, 43f, 28, null, bold: true, (TextAnchor)4); } Employee obj3 = GameService.Prefab(role); quantity = HireQuantity.Clamp(quantity, source.Free); PhoneArt.Button((Transform)(object)content, "−", 253f, 478f, 64f, 64f, delegate { quantity = HireQuantity.Step(quantity, -1, Source?.Free ?? 0); dirty = true; }, Color.white, 38, HireQuantity.CanDecrease(quantity), "orb-mint"); PhoneArt.Text((Transform)(object)content, quantity.ToString(), 317f, 462f, 86f, 95f, 68, PhoneArt.Lime, bold: true, (TextAnchor)4); PhoneArt.Button((Transform)(object)content, "+", 403f, 478f, 64f, 64f, delegate { quantity = HireQuantity.Step(quantity, 1, Source?.Free ?? 0); dirty = true; }, Color.white, 38, HireQuantity.CanIncrease(quantity, source.Free), "orb-mint"); PhoneArt.Text((Transform)(object)content, HireQuantity.Hint(source.Free), 200f, 613f, 320f, 25f, 17, PhoneArt.Muted, bold: false, (TextAnchor)4); if (!Object.op_Implicit((Object)(object)obj3)) { return; } HiringQuote quote = GameService.HiringPrice(role, quantity); PhoneArt.Text((Transform)(object)content, L.T(quote.Varies ? "hire.price.from" : "hire.price.each", GameService.Cash(quote.FirstFee)) + "\n" + L.T("daily", GameService.Cash(quote.DailyWage)), 240f, 558f, 240f, 49f, 20, PhoneArt.Mint, bold: true, (TextAnchor)4); PhoneArt.Image((Transform)(object)content, "pill", 120f, 814f, 480f, 72f, Color.white); PhoneArt.Text((Transform)(object)content, L.T("hire.summary", L.Workers(quantity), GameService.Cash(quote.DailyWage * (float)quantity)), 130f, 824f, 460f, 50f, 27, PhoneArt.Peach, bold: true, (TextAnchor)4); string text = L.Source(Settings.HirePaymentSource.Value); PhoneArt.Button((Transform)(object)content, L.T("hire.action", quantity, GameService.Cash(quote.Total), text), 90f, 906f, 540f, 76f, delegate { Do(() => GameService.Hire(source.Id, role, quantity, quote.Total)); }, Color.white, 32, GameService.Host && !GameService.WorkersBusy && source.Free > 0, "action"); } private void Move() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) Site source = Source; if (Destination == null) { destination = sites.FirstOrDefault((Site x) => x.Id != selected)?.Id ?? ""; } Site site = Destination; PhoneArt.Text((Transform)(object)content, L.T("move.title"), 90f, 115f, 540f, 70f, 46, null, bold: true, (TextAnchor)4); PhoneArt.Image((Transform)(object)content, "transfer-arrow", 270f, 245f, 250f, 180f, Color.white); PhoneArt.Node((Transform)(object)content, 170f, 315f, 255f, SiteIcon(source), source.Name, $"{source.Workers.Count}/{source.Capacity}", L.T("move.from"), selected: true, delegate { Pick(Page.ChooseSource); }); if (site != null) { PhoneArt.Node((Transform)(object)content, 555f, 450f, 250f, SiteIcon(site), site.Name, $"{site.Workers.Count}/{site.Capacity}", L.Free(site.Free), selected: false, delegate { Pick(Page.ChooseDestination); }); PhoneArt.Button((Transform)(object)content, L.T("change"), 458f, 553f, 145f, 43f, delegate { Pick(Page.ChooseDestination); }, null, 21); } else { PhoneArt.Button((Transform)(object)content, L.T("destination.choose"), 365f, 387f, 300f, 80f, delegate { Pick(Page.ChooseDestination); }); } List<Worker> list = source.Workers.Skip(workerPage * 4).Take(4).ToList(); for (int num = 0; num < list.Count; num++) { Worker worker = list[num]; bool flag = movers.Contains(worker.Id); float num2 = 100 + num * 174; float num3 = ((num % 2 == 0) ? 650 : 680); Button val = PhoneArt.Button((Transform)(object)content, "", num2 - 58f, num3 - 58f, 116f, 116f, delegate { if (!movers.Add(worker.Id)) { movers.Remove(worker.Id); } dirty = true; }, Color.white, 24, enabled: true, flag ? "orb-lime" : "orb-mint"); PhoneArt.WorkerFace(((Component)val).transform, WorkerPortrait(worker), Initials(worker.Name), 16f, 16f, 84f, val); if (flag) { PhoneArt.Text(((Component)val).transform, "✓", 80f, 0f, 35f, 35f, 25, PhoneArt.Lime, bold: true, (TextAnchor)4); } PhoneArt.Text((Transform)(object)content, worker.Name, num2 - 80f, num3 + 63f, 160f, 39f, 24, null, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)content, L.Role(worker.Role), num2 - 80f, num3 + 101f, 160f, 31f, 20, PhoneArt.Mint, bold: false, (TextAnchor)4); } Paging(source.Workers.Count, 4, ref workerPage, 833f, workers: true); int count = source.Workers.Count((Worker w) => movers.Contains(w.Id)); PhoneArt.Button((Transform)(object)content, L.T("move.action", L.Workers(count)), 90f, 906f, 540f, 76f, delegate { Do(delegate { string result = GameService.Transfer(source.Id, destination, movers); movers.Clear(); return result; }); }, PhoneArt.Lime, 29, GameService.Host && !GameService.WorkersBusy && site != null && CapacityPolicy.TransferAllowed(source.Id, destination, count, site.Capacity, site.Workers.Count)); } private void Wages() { //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Unknown result type (might be due to invalid IL or missing references) //IL_0757: Unknown result type (might be due to invalid IL or missing references) //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0ac9: Unknown result type (might be due to invalid IL or missing references) PhoneArt.Text((Transform)(object)content, L.T("wages"), 90f, 115f, 540f, 70f, 46, null, bold: true, (TextAnchor)4); bool automatic = Settings.AutoPay.Value; List<Worker> selectedWorkers = (from w in sites.SelectMany((Site s) => s.Workers) where !w.Paid && wageWorkers.Contains(w.Id) select w).ToList(); float selectedDue = selectedWorkers.Sum((Worker w) => w.Wage); List<Site> list = (automatic ? sites : (from s in sites select s with { Workers = s.Workers.Where((Worker w) => !w.Paid && wageWorkers.Contains(w.Id)).ToList() } into s where s.Workers.Count > 0 select s).ToList()); WageChart wageChart = WageChart.Create(list.Select((Site s) => new WageChartEntry(s.Id, s.Name, s.Daily))); float amount = (float)wageChart.Total; float num = list.Sum((Site s) => s.Due); PhoneArt.Ring((Transform)(object)content, 360f, 435f, 480f, PhoneArt.Muted); Color[] array = (Color[])(object)new Color[9] { PhoneArt.Mint, PhoneArt.Peach, new Color(0.35f, 0.8f, 0.78f), new Color(0.74f, 0.66f, 0.93f), new Color(0.8f, 0.94f, 0.39f), new Color(0.46f, 0.72f, 0.96f), new Color(0.97f, 0.62f, 0.72f), new Color(0.92f, 0.86f, 0.54f), new Color(0.72f, 0.83f, 0.84f) }; for (int num2 = 0; num2 < wageChart.Slices.Count; num2++) { WageChartSlice wageChartSlice = wageChart.Slices[num2]; if (!(wageChartSlice.Fraction <= 0.0)) { Image obj = PhoneArt.Image((Transform)(object)content, "donut", 120f, 195f, 480f, 480f, array[num2 % array.Length]); ((Graphic)obj).rectTransform.pivot = new Vector2(0.5f, 0.5f); ((Graphic)obj).rectTransform.anchoredPosition = new Vector2(360f, -435f); obj.type = (Type)3; obj.fillMethod = (FillMethod)4; obj.fillOrigin = 2; obj.fillClockwise = true; obj.fillAmount = (float)wageChartSlice.Fraction; ((Transform)((Graphic)obj).rectTransform).localRotation = Quaternion.Euler(0f, 0f, (float)((0.0 - wageChartSlice.Start) * 360.0)); } } PhoneArt.Image((Transform)(object)content, "disc", 205f, 280f, 310f, 310f, PhoneArt.Ink); RectTransform val = PhoneArt.Group((Transform)(object)content, "Wage summary", 0f, 0f, 720f, 1200f); PhoneArt.Image((Transform)(object)val, "bank", 328f, 315f, 64f, 58f, PhoneArt.Lime); PhoneArt.Text((Transform)(object)val, GameService.Cash(amount), 220f, 386f, 280f, 83f, 59, PhoneArt.Lime, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)val, L.T(automatic ? "wages.caption" : "wages.caption.selected"), 235f, 473f, 250f, 37f, 25, PhoneArt.Mint, bold: false, (TextAnchor)4); PhoneArt.Text((Transform)(object)val, automatic ? L.T("wages.unpaid", GameService.Cash(num)) : L.Workers(selectedWorkers.Count), 200f, 521f, 320f, 40f, 23, PhoneArt.Peach, bold: true, (TextAnchor)4); List<(Button, GameObject)> list2 = new List<(Button, GameObject)>(); int pageCount = Math.Max(1, (wageChart.Slices.Count + 3) / 4); wageChartPage = Math.Clamp(wageChartPage, 0, pageCount - 1); for (int num3 = 0; num3 < Math.Min(4, wageChart.Slices.Count - wageChartPage * 4); num3++) { int num4 = wageChartPage * 4 + num3; WageChartSlice wageChartSlice2 = wageChart.Slices[num4]; PhoneLayout.Node node = PhoneLayout.WageProperties[num3]; Site site = list[num4]; Color val2 = array[num4 % array.Length]; string text = ((wageChartSlice2.Daily > 0.0 && wageChartSlice2.PercentTenths == 0) ? L.T("wages.chart.small") : (((double)wageChartSlice2.PercentTenths / 10.0).ToString("0.#", L.Culture) + "%")); Button val3 = PhoneArt.Button((Transform)(object)content, "", node.X - node.Diameter / 2f, node.Y - node.Diameter / 2f, node.Diameter, node.Diameter, delegate { }, Color.white, 24, enabled: true, "orb-mint"); PhoneArt.Image(((Component)val3).transform, SiteIcon(site), 25f, 14f, 40f, 36f, val2); PhoneArt.Text(((Component)val3).transform, text, 6f, 53f, 78f, 28f, 22, val2, bold: true, (TextAnchor)4); RectTransform val4 = PhoneArt.Group((Transform)(object)content, "Property wage details", 0f, 0f, 720f, 1200f); PhoneArt.Text((Transform)(object)val4, wageChartSlice2.Name, 230f, 322f, 260f, 76f, 32, PhoneArt.White, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)val4, L.T("daily", GameService.Cash((float)wageChartSlice2.Daily)), 225f, 410f, 270f, 68f, 40, val2, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)val4, L.T(automatic ? "wages.chart.share" : "wages.chart.share.selected", text), 225f, 490f, 270f, 58f, 24, PhoneArt.Mint, bold: false, (TextAnchor)4); list2.Add((val3, ((Component)val4).gameObject)); } PhoneArt.InspectOnHover(((Component)val).gameObject, list2); if (pageCount > 1) { int current = wageChartPage; PhoneArt.Button((Transform)(object)content, "‹", 20f, 685f, 46f, 48f, delegate { wageChartPage = (current + pageCount - 1) % pageCount; dirty = true; }, null, 29); PhoneArt.Button((Transform)(object)content, "›", 654f, 685f, 46f, 48f, delegate { wageChartPage = (current + 1) % pageCount; dirty = true; }, null, 29); } string text2 = L.Source(Settings.WagePaymentSource.Value); if (!automatic && selectedWorkers.Count > 0) { PhoneArt.Button((Transform)(object)content, L.T("wages.selected", selectedWorkers.Count), 125f, 758f, 470f, 44f, delegate { Navigate(Page.ChooseEmployees); }, null, 22); } else if (automatic) { PhoneArt.Text((Transform)(object)content, L.T("properties.all"), 125f, 758f, 470f, 44f, 22, PhoneArt.Muted, bold: false, (TextAnchor)4); } PhoneArt.Button((Transform)(object)content, L.T("wages.manual", text2), 60f, 814f, 285f, 68f, delegate { Settings.AutoPay.Value = false; Settings.Save(); }, Color.white, 24, GameService.Host, Settings.AutoPay.Value ? "pill" : "pill-active"); PhoneArt.Button((Transform)(object)content, L.T("wages.auto", text2), 370f, 814f, 290f, 68f, delegate { Settings.AutoPay.Value = true; Settings.Save(); }, Color.white, 24, GameService.Host, Settings.AutoPay.Value ? "pill-active" : "pill"); string label = (automatic ? L.T("wages.pay", GameService.Cash(num)) : ((selectedWorkers.Count == 0) ? L.T("wages.choose") : L.T("wages.pay.selected", L.Workers(selectedWorkers.Count), GameService.Cash(selectedDue)))); PhoneArt.Button((Transform)(object)content, label, 90f, 906f, 540f, 76f, delegate { if (!automatic && selectedWorkers.Count == 0) { Navigate(Page.ChooseEmployees); } else { Do(() => (!automatic) ? GameService.PaySelected(selectedWorkers.Select((Worker w) => w.Id).ToHashSet(), selectedDue) : GameService.Pay()); } }, PhoneArt.Lime, 27, GameService.Host && (!automatic || num > 0f)); } private void WageEmployees() { //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) PhoneArt.Text((Transform)(object)content, L.T("wages.choose"), 60f, 115f, 600f, 70f, 42, null, bold: true, (TextAnchor)4); PhoneArt.Button((Transform)(object)content, L.T("wages.filter", sites.FirstOrDefault((Site s) => s.Id == wageProperty)?.Name ?? L.T("properties.all")), 100f, 198f, 520f, 56f, delegate { Pick(Page.ChooseWageProperty); }); IEnumerable<Site> source = sites.Where((Site s) => wageProperty == "" || s.Id == wageProperty); List<(Worker Worker, string Site)> roster = source.SelectMany((Site s) => s.Workers.Select((Worker w) => (Worker: w, Site: s.Name))).ToList(); RectTransform? parent = content; string label = L.T("wages.select.unpaid"); Action action = delegate { foreach (var item in roster.Where(((Worker Worker, string Site) e) => !e.Worker.Paid)) { wageWorkers.Add(item.Worker.Id); } dirty = true; }; bool enabled = GameService.Host && roster.Any(((Worker Worker, string Site) e) => !e.Worker.Paid); PhoneArt.Button((Transform)(object)parent, label, 60f, 270f, 285f, 48f, action, null, 22, enabled); RectTransform? parent2 = content; string label2 = L.T("wages.clear"); Action action2 = delegate { wageWorkers.Clear(); dirty = true; }; enabled = GameService.Host && wageWorkers.Count > 0; PhoneArt.Button((Transform)(object)parent2, label2, 375f, 270f, 285f, 48f, action2, null, 22, enabled); wageWorkerPage = Math.Clamp(wageWorkerPage, 0, Math.Max(0, (roster.Count - 1) / 4)); List<(Worker, string)> list = roster.Skip(wageWorkerPage * 4).Take(4).ToList(); for (int num = 0; num < list.Count; num++) { Worker worker = list[num].Item1; PhoneLayout.Node node = PhoneLayout.WageWorkers[num]; bool flag = !worker.Paid && wageWorkers.Contains(worker.Id); Action action3 = delegate { if (!wageWorkers.Add(worker.Id)) { wageWorkers.Remove(worker.Id); } dirty = true; }; Button val = PhoneArt.Button((Transform)(object)content, "", node.X - node.Diameter / 2f, node.Y - node.Diameter / 2f, node.Diameter, node.Diameter, action3, Color.white, 24, GameService.Host && !worker.Paid, flag ? "orb-lime" : "orb-mint"); PhoneArt.WorkerFace(((Component)val).transform, WorkerPortrait(worker), Initials(worker.Name), 20f, 20f, node.Diameter - 40f, val); if (flag) { PhoneArt.Text(((Component)val).transform, "✓", 88f, 0f, 32f, 32f, 27, PhoneArt.Lime, bold: true, (TextAnchor)4); } Button obj = PhoneArt.Button((Transform)(object)content, "", 212f, node.Y - 54f, 458f, 110f, action3, Color.white, 24, GameService.Host && !worker.Paid, flag ? "pill-active" : "pill"); PhoneArt.Text(((Component)obj).transform, worker.Name, 20f, 7f, 418f, 38f, 31, null, bold: true, (TextAnchor)4); PhoneArt.Text(((Component)obj).transform, L.Role(worker.Role) + " · " + list[num].Item2, 20f, 45f, 418f, 28f, 21, PhoneArt.Muted, bold: false, (TextAnchor)4); PhoneArt.Text(((Component)obj).transform, worker.Paid ? L.T("wages.paid.today") : L.T("picker.due", GameService.Cash(worker.Wage)), 20f, 73f, 418f, 30f, 25, worker.Paid ? PhoneArt.Muted : PhoneArt.Peach, bold: true, (TextAnchor)4); } if (roster.Count == 0) { PhoneArt.Text((Transform)(object)content, L.T("wages.empty"), 100f, 445f, 520f, 100f, 28, PhoneArt.Muted, bold: false, (TextAnchor)4); } int pages = Math.Max(1, (roster.Count + 3) / 4); int value = wageWorkerPage; if (pages > 1) { PhoneArt.Button((Transform)(object)content, "‹", 230f, 855f, 58f, 39f, delegate { wageWorkerPage = (value + pages - 1) % pages; dirty = true; }, null, 26); PhoneArt.Text((Transform)(object)content, $"{value + 1} / {pages}", 300f, 855f, 120f, 39f, 19, PhoneArt.Muted, bold: false, (TextAnchor)4); PhoneArt.Button((Transform)(object)content, "›", 432f, 855f, 58f, 39f, delegate { wageWorkerPage = (value + 1) % pages; dirty = true; }, null, 26); } List<Worker> list2 = (from w in sites.SelectMany((Site s) => s.Workers) where !w.Paid && wageWorkers.Contains(w.Id) select w).ToList(); PhoneArt.Button((Transform)(object)content, L.T("wages.review", list2.Count, GameService.Cash(list2.Sum((Worker w) => w.Wage))), 90f, 906f, 540f, 76f, delegate { Navigate(Page.Wages); }, PhoneArt.Lime, 27, GameService.Host && list2.Count > 0); } private void Rules() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) PhoneArt.Image((Transform)(object)content, "night-arc", 60f, 120f, 600f, 350f, Color.white); PhoneArt.Image((Transform)(object)content, "orb-mint", 304f, 106f, 112f, 112f, Color.white); PhoneArt.Image((Transform)(object)content, "clock", 330f, 132f, 60f, 60f, PhoneArt.Mint); PhoneArt.Text((Transform)(object)content, L.T("rules.past4"), 267f, 211f, 185f, 35f, 25, PhoneArt.White, bold: true, (TextAnchor)4); PhoneArt.Image((Transform)(object)content, "orb-mint", 55f, 355f, 110f, 110f, Color.white); PhoneArt.Image((Transform)(object)content, "moon", 82f, 380f, 56f, 56f, PhoneArt.Mint); PhoneArt.Image((Transform)(object)content, "orb-peach", 555f, 355f, 110f, 110f, Color.white); PhoneArt.Image((Transform)(object)content, "sun", 582f, 380f, 56f, 56f, PhoneArt.Peach); PhoneArt.Text((Transform)(object)content, L.T("rules.night"), 32f, 466f, 155f, 40f, 25, PhoneArt.Mint, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)content, L.T("rules.wake"), 532f, 466f, 155f, 40f, 25, PhoneArt.Peach, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)content, "24/7", 247f, 278f, 226f, 66f, 54, PhoneArt.Lime, bold: true, (TextAnchor)4); PhoneArt.Text((Transform)(object)content, L.T("rules.operation"), 220f, 333f, 280f, 50f, 37, PhoneArt.White, bold: true, (TextAnchor)4); RuleSwitch(360f, 405f, Settings.Overnight.Value, delegate { Settings.Overnight.Value = !Settings.Overnight.Value; Settings.Save(); }); PhoneArt.Text((Transform)(object)content, L.T("rules.active"), 200f, 481f, 320f, 72f, 25, PhoneArt.Muted, bold: true, (TextAnchor)4); PhoneArt.Image((Transform)(object)content, "pill", 85f, 590f, 550f, 235f, Color.white); PhoneArt.Image((Transform)(object)content, "bed", 125f, 660f, 65f, 65f, PhoneArt.Mint); PhoneArt.Image((Transform)(object)content, "locker", 530f, 660f, 65f, 65f, PhoneArt.Mint); PhoneArt.Text((Transform)(object)content, L.T("rules.housing"), 185f, 614f, 350f, 66f, 29, PhoneArt.White, bold: true, (TextAnchor)4); RuleSwitch(360f, 710f, Settings.Housing.Value, delegate { Settings.Housing.Value = !Settings.Housing.Value; Settings.Save(); }); PhoneArt.Image((Transform)(object)content, "pill", 50f, 875f, 620f, 78f, Color.white); PhoneArt.Text((Transform)(object)content, L.T("rules.morning"), 64f, 883f, 592f, 62f, 22, PhoneArt.Mint, bold: false, (TextAnchor)4); } private void RuleSwitch(float cx, float y, bool on, Action action, float width = 140f) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) PhoneArt.Image(((Component)PhoneArt.Button((Transform)(object)content, "", cx - width / 2f, y, width, 52f, action, on ? PhoneArt.Lime : Color.white, 24, GameService.Host)).transform, "disc", on ? (width - 45f) : 7f, 7f, 38f, 38f, on ? PhoneArt.White : PhoneArt.Muted); } private void Picker() { //IL_02d0: Unknown result type (might be due to invalid IL or missing references) bool wages = page == Page.ChooseWageProperty; PhoneArt.Text((Transform)(object)content, (page == Page.ChooseDestination) ? L.T("destination.choose") : L.T("picker.property"), 60f, 135f, 600f, 70f, 34, null, bold: true, (TextAnchor)4); List<Site> list = sites.Where((Site site) => page != Page.ChooseDestination || site.Id != selected).ToList(); List<Site> list2 = list.Skip(propertyPage * 3).Take(3).ToList(); for (int num = 0; num < list2.Count; num++) { Site s = list2[num]; bool flag = (wages ? (wageProperty == s.Id) : (s.Id == selected || (page == Page.ChooseDestination && s.Id == destination))); PhoneArt.Node((Transform)(object)content, (num == 1) ? 500 : 210, 355 + num * 190, 220f, SiteIcon(s), s.Name, s.Workers.Count + "/" + s.Capacity, wages ? L.T("picker.due", GameService.Cash(s.Due)) : "", flag, delegate { if (wages) { wageProperty = s.Id; wageWorkerPage = 0; Navigate(Page.ChooseEmployees); } else { if (page == Page.ChooseDestination) { destination = s.Id; } else { selected = s.Id; movers.Clear(); workerPage = 0; } Navigate(returnPage); } }); } Paging(list.Count, 3, ref propertyPage, 850f); if (wages) { PhoneArt.Button((Transform)(object)content, L.T("properties.all"), 180f, 215f, 360f, 44f, delegate { wageProperty = ""; wageWorkerPage = 0; Navigate(Page.ChooseEmployees); }, null, 21); } PhoneArt.Button((Transform)(object)content, wages ? L.T("done") : L.T("back"), 180f, 914f, 360f, 64f, delegate { Navigate(returnPage); }, PhoneArt.Lime); } private void Paging(int count, int size, ref int current, float y, bool workers = false) { //IL_00e9: Unknown result type (might be due to invalid IL or missing references) int pages = Math.Max(1, (count + size - 1) / size); current = Math.Clamp(current, 0, pages - 1); if (pages <= 1) { return; } int value = current; PhoneArt.Button((Transform)(object)content, "‹", 230f, y, 58f, 39f, delegate { if (workers) { workerPage = (value + pages - 1) % pages; } else { PropertyPage((value + pages - 1) % pages, size); } dirty = true; }, null, 26); PhoneArt.Text((Transform)(object)content, $"{current + 1} / {pages}", 300f, y, 120f, 39f, 19, PhoneArt.Muted, bold: false, (TextAnchor)4); PhoneArt.Button((Transform)(object)content, "›", 432f, y, 58f, 39f, delegate { if (workers) { workerPage = (value + 1) % pages; } else { PropertyPage((value + 1) % pages, size); } dirty = true; }, null, 26); } private void Navigation() { //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) string[] array = new string[4] { L.T("nav.hire"), L.T("nav.move"), L.T("wages"), L.T("nav.rules") }; string[] array2 = new string[4] { "person", "move", "bank", "rules" }; Page[] array3 = new Page[4] { Page.Hire, Page.Move, Page.Wages, Page.Rules }; for (int i = 0; i < 4; i++) { Page target = array3[i]; bool flag = this.page == target; if (!flag) { bool flag2 = target == Page.Wages; if (flag2) { Page page = this.page; bool flag3 = (uint)(page - 7) <= 1u; flag2 = flag3; } flag = flag2; } bool flag4 = flag; PhoneLayout.Node node = PhoneLayout.Navigation[i]; Button obj = PhoneArt.Button((Transform)(object)content, "", 0f, 990f, 720f, 220f, delegate { Navigate(target); }, Color.white, 24, enabled: true, "nav" + i + (flag4 ? "-active" : "")); PhoneArt.Image(((Component)obj).transform, array2[i], node.X - 25f, node.Y - 990f - 51f, 50f, 50f, flag4 ? PhoneArt.Lime : PhoneArt.Mint); PhoneArt.Text(((Component)obj).transform, array[i], node.X - 76f, node.Y - 990f + 1f, 152f, 42f, 28, flag4 ? PhoneArt.Lime : PhoneArt.White, bold: true, (TextAnchor)4); } PhoneArt.Image((Transform)(object)content, "orb-lime", 340f, 1154f, 40f, 40f, Color.white); } private void RefreshPortraits() { List<Worker> list = sites.SelectMany((Site s) => s.Workers).ToList(); HashSet<string> ids = list.Select((Worker w) => w.Id).ToHashSet(); string[] array = workerPortraits.Keys.Where((string id) => !ids.Contains(id)).ToArray(); foreach (string key in array) { workerPortraits.Remove(key); } foreach (Worker item in list) { if (Object.op_Implicit((Object)(object)WorkerPortrait(item))) { continue; } try { NPC native = (NPC)(object)item.Native; if (Object.op_Implicit((Object)(object)native) && native.HasNPCData) { Sprite mugshotSprite = native.MugshotSprite; if (Object.op_Implicit((Object)(object)mugshotSprite))