Decompiled source of Airport Remixed v2.2.2
tony4twentys-Airport_Remixed.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using Photon.Pun; using Photon.Realtime; using UnityEngine; using UnityEngine.SceneManagement; using Zorro.Core; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Airport Remixed")] [assembly: AssemblyDescription("A BepInEx plugin for PEAK that remixes airport functionality")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("tony4twentys")] [assembly: AssemblyProduct("Airport Remixed")] [assembly: AssemblyCopyright("Copyright © tony4twentys 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3d39d492-4184-4d83-8b4a-1227283ca458")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace tony4twentys.Airport_Remixed; [BepInPlugin("tony4twentys.Airport_Remixed", "Airport Remixed", "2.2.1")] [BepInProcess("PEAK.exe")] public class AirportRemixedPlugin : BaseUnityPlugin, IOnEventCallback { private struct FlightWaypoint { public Vector3 position; public Vector3 rotation; public float duration; public FlightWaypoint(Vector3 pos, Vector3 rot, float dur) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: 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_000a: Unknown result type (might be due to invalid IL or missing references) position = pos; rotation = rot; duration = dur; } } [CompilerGenerated] private sealed class <AirplaneFlightSequence>d__156 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <airplane>5__1; private FlightWaypoint[] <waypoints>5__2; private int <i>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AirplaneFlightSequence>d__156(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <airplane>5__1 = null; <waypoints>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_0127: 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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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_01d2: 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_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <airplane>5__1 = GameObject.Find("Map/BL_Airport/Plane (2)"); if ((Object)(object)<airplane>5__1 == (Object)null) { Logger.LogWarning((object)"Airplane not found! Cannot start flight sequence."); return false; } <waypoints>5__2 = new FlightWaypoint[8] { new FlightWaypoint(new Vector3(93.9193f, -2.9142f, 223.7701f), new Vector3(270.0396f, 89.9345f, 0f), 8f), new FlightWaypoint(new Vector3(93.9183f, -2.9142f, 48.3104f), new Vector3(270.0396f, 89.9345f, 0f), 6f), new FlightWaypoint(new Vector3(93.9162f, 123.207f, -313.9848f), new Vector3(270.0396f, 89.9345f, 0f), 10f), new FlightWaypoint(new Vector3(464.6261f, 123.207f, -397.7801f), new Vector3(270f, 0f, 0f), 8f), new FlightWaypoint(new Vector3(582.9521f, 123.207f, -6.9619f), new Vector3(270f, 270f, 0f), 6f), new FlightWaypoint(new Vector3(582.9522f, 123.207f, 629.2016f), new Vector3(270f, 270f, 0f), 6f), new FlightWaypoint(new Vector3(321.6179f, 123.207f, 829.2727f), new Vector3(270f, 180f, 0f), 8f), new FlightWaypoint(new Vector3(93.9193f, -2.9142f, 223.7701f), new Vector3(270.0396f, 89.9345f, 0f), 12f) }; goto IL_02fc; case 1: <>1__state = -1; <i>5__3++; goto IL_02ac; case 2: { <>1__state = -1; goto IL_02fc; } IL_02ac: if (<i>5__3 < <waypoints>5__2.Length - 1) { if (!<>4__this.isAirportScene) { return false; } <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.MoveAirplaneAlongSplineSegment(<airplane>5__1, <waypoints>5__2, <i>5__3)); <>1__state = 1; return true; } if (!<>4__this.isAirportScene) { return false; } <>2__current = (object)new WaitForSeconds(5f); <>1__state = 2; return true; IL_02fc: if (<>4__this.isAirportScene) { <i>5__3 = 0; goto IL_02ac; } if (!<>4__this.isAirportScene) { return false; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <ClientFindAndModifyBounceShroom>d__154 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <bounceShroom>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ClientFindAndModifyBounceShroom>d__154(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <bounceShroom>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(6f); <>1__state = 1; return true; case 1: <>1__state = -1; <bounceShroom>5__1 = GameObject.Find("BounceShroomSpawn(Clone)"); if ((Object)(object)<bounceShroom>5__1 != (Object)null) { Logger.LogInfo((object)"Client: Found BounceShroomSpawn(Clone), applying modifications"); <>4__this.ApplyBounceShroomModifications(<bounceShroom>5__1); } else { Logger.LogWarning((object)"Client: BounceShroomSpawn(Clone) not found for modifications"); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <MoveAirplaneAlongSplineSegment>d__157 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject airplane; public FlightWaypoint[] waypoints; public int segmentStartIndex; public AirportRemixedPlugin <>4__this; private int <i0>5__1; private int <i1>5__2; private int <i2>5__3; private int <i3>5__4; private Vector3 <p0>5__5; private Vector3 <p1>5__6; private Vector3 <p2>5__7; private Vector3 <p3>5__8; private float <duration>5__9; private float <elapsedTime>5__10; private Vector3 <nextDir>5__11; private Vector3 <flatEndDir>5__12; private float <t>5__13; private Vector3 <pos>5__14; private Vector3 <dir>5__15; private float <straightY>5__16; private Vector3 <flatDir>5__17; private Quaternion <look>5__18; private Vector3 <euler>5__19; private Quaternion <lookEnd>5__20; private Vector3 <eulerEnd>5__21; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <MoveAirplaneAlongSplineSegment>d__157(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00f0: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_01af: 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_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01de: 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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!<>4__this.isAirportScene) { return false; } if ((Object)(object)airplane == (Object)null) { Logger.LogWarning((object)"Airplane GameObject is null, stopping coroutine"); return false; } <i0>5__1 = Mathf.Max(segmentStartIndex - 1, 0); <i1>5__2 = segmentStartIndex; <i2>5__3 = segmentStartIndex + 1; <i3>5__4 = Mathf.Min(segmentStartIndex + 2, waypoints.Length - 1); <p0>5__5 = waypoints[<i0>5__1].position; <p1>5__6 = waypoints[<i1>5__2].position; <p2>5__7 = waypoints[<i2>5__3].position; <p3>5__8 = waypoints[<i3>5__4].position; <duration>5__9 = waypoints[<i2>5__3].duration; <elapsedTime>5__10 = 0f; break; case 1: <>1__state = -1; break; } Vector3 val; if (<elapsedTime>5__10 < <duration>5__9) { if (!<>4__this.isAirportScene) { return false; } if ((Object)(object)airplane == (Object)null) { Logger.LogWarning((object)"Airplane GameObject became null during coroutine, stopping"); return false; } <elapsedTime>5__10 += Time.deltaTime; <t>5__13 = Mathf.Clamp01(<elapsedTime>5__10 / <duration>5__9); <pos>5__14 = <>4__this.CatmullRom(<p0>5__5, <p1>5__6, <p2>5__7, <p3>5__8, <t>5__13); <dir>5__15 = <>4__this.CatmullRomTangent(<p0>5__5, <p1>5__6, <p2>5__7, <p3>5__8, <t>5__13); <straightY>5__16 = Mathf.Lerp(<p1>5__6.y, <p2>5__7.y, <t>5__13); if (<pos>5__14.y < <straightY>5__16) { <pos>5__14.y = <straightY>5__16; } if (((Vector3)(ref <dir>5__15)).sqrMagnitude > 0.0001f) { val = new Vector3(<dir>5__15.x, 0f, <dir>5__15.z); <flatDir>5__17 = ((Vector3)(ref val)).normalized; if (((Vector3)(ref <flatDir>5__17)).sqrMagnitude > 0.0001f) { <look>5__18 = Quaternion.LookRotation(<flatDir>5__17, Vector3.up); <euler>5__19 = ((Quaternion)(ref <look>5__18)).eulerAngles; <euler>5__19.y = (<euler>5__19.y - 90f + 360f) % 360f; <euler>5__19.x = 270f; <euler>5__19.z = 0f; airplane.transform.eulerAngles = <euler>5__19; } } airplane.transform.position = <pos>5__14; <>2__current = null; <>1__state = 1; return true; } airplane.transform.position = waypoints[<i2>5__3].position; if (<i2>5__3 < waypoints.Length - 1) { <nextDir>5__11 = waypoints[<i2>5__3 + 1].position - waypoints[<i2>5__3].position; } else { <nextDir>5__11 = waypoints[1].position - waypoints[0].position; } val = new Vector3(<nextDir>5__11.x, 0f, <nextDir>5__11.z); <flatEndDir>5__12 = ((Vector3)(ref val)).normalized; if (((Vector3)(ref <flatEndDir>5__12)).sqrMagnitude > 0.0001f) { <lookEnd>5__20 = Quaternion.LookRotation(<flatEndDir>5__12, Vector3.up); <eulerEnd>5__21 = ((Quaternion)(ref <lookEnd>5__20)).eulerAngles; <eulerEnd>5__21.y = (<eulerEnd>5__21.y - 90f + 360f) % 360f; <eulerEnd>5__21.x = 270f; <eulerEnd>5__21.z = 0f; airplane.transform.eulerAngles = <eulerEnd>5__21; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <MoveElevatorToFloor1>d__144 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <elevator>5__1; private Animator <elevatorAnimator>5__2; private MethodInfo <method>5__3; private Exception <ex>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <MoveElevatorToFloor1>d__144(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <elevator>5__1 = null; <elevatorAnimator>5__2 = null; <method>5__3 = null; <ex>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_0211: 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_022c: Expected O, but got Unknown //IL_0248: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this.isElevatorMoving) { return false; } <>4__this.isElevatorMoving = true; <elevator>5__1 = GameObject.Find("Map/BL_Airport/Elevator (1)"); if ((Object)(object)<elevator>5__1 == (Object)null) { Logger.LogWarning((object)"Elevator: Elevator not found!"); <>4__this.isElevatorMoving = false; return false; } <elevatorAnimator>5__2 = <elevator>5__1.GetComponent<Animator>(); if ((Object)(object)<elevatorAnimator>5__2 == (Object)null) { Logger.LogWarning((object)"Elevator: Animator component not found!"); <>4__this.isElevatorMoving = false; return false; } try { <method>5__3 = typeof(Animator).GetMethod("ClearInternalControllerPlayable", BindingFlags.Instance | BindingFlags.NonPublic); if (<method>5__3 != null) { <method>5__3.Invoke(<elevatorAnimator>5__2, null); } else { ((Behaviour)<elevatorAnimator>5__2).enabled = true; <elevatorAnimator>5__2.Rebind(); <elevatorAnimator>5__2.Update(0f); } <method>5__3 = null; } catch (Exception ex) { <ex>5__4 = ex; Logger.LogWarning((object)("Elevator: Could not call ClearInternalControllerPlayable: " + <ex>5__4.Message)); ((Behaviour)<elevatorAnimator>5__2).enabled = true; <elevatorAnimator>5__2.Rebind(); <elevatorAnimator>5__2.Update(0f); } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SmoothBlackoutScreen()); <>1__state = 2; return true; case 2: <>1__state = -1; <elevator>5__1.transform.localPosition = <>4__this.elevatorOriginalPosition; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.TeleportPlayerToPosition(<>4__this.playerOriginalPosition); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SmoothRestoreScreen()); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.isElevatorMoving = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <MoveElevatorToGroundLevel>d__143 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <elevator>5__1; private Animator <elevatorAnimator>5__2; private MethodInfo <method>5__3; private Exception <ex>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <MoveElevatorToGroundLevel>d__143(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <elevator>5__1 = null; <elevatorAnimator>5__2 = null; <method>5__3 = null; <ex>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Expected O, but got Unknown //IL_0211: 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_022c: Expected O, but got Unknown //IL_0248: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this.isElevatorMoving) { return false; } <>4__this.isElevatorMoving = true; <elevator>5__1 = GameObject.Find("Map/BL_Airport/Elevator (1)"); if ((Object)(object)<elevator>5__1 == (Object)null) { Logger.LogWarning((object)"Elevator: Elevator not found!"); <>4__this.isElevatorMoving = false; return false; } <elevatorAnimator>5__2 = <elevator>5__1.GetComponent<Animator>(); if ((Object)(object)<elevatorAnimator>5__2 == (Object)null) { Logger.LogWarning((object)"Elevator: Animator component not found!"); <>4__this.isElevatorMoving = false; return false; } try { <method>5__3 = typeof(Animator).GetMethod("ClearInternalControllerPlayable", BindingFlags.Instance | BindingFlags.NonPublic); if (<method>5__3 != null) { <method>5__3.Invoke(<elevatorAnimator>5__2, null); } else { ((Behaviour)<elevatorAnimator>5__2).enabled = true; <elevatorAnimator>5__2.Rebind(); <elevatorAnimator>5__2.Update(0f); } <method>5__3 = null; } catch (Exception ex) { <ex>5__4 = ex; Logger.LogWarning((object)("Elevator: Could not call ClearInternalControllerPlayable: " + <ex>5__4.Message)); ((Behaviour)<elevatorAnimator>5__2).enabled = true; <elevatorAnimator>5__2.Rebind(); <elevatorAnimator>5__2.Update(0f); } <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SmoothBlackoutScreen()); <>1__state = 2; return true; case 2: <>1__state = -1; <elevator>5__1.transform.localPosition = <>4__this.elevatorGroundLevelPosition; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.TeleportPlayerToPosition(<>4__this.playerTeleportPosition); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SmoothRestoreScreen()); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.isElevatorMoving = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <SmoothBlackoutScreen>d__145 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <canvasLetterbox>5__1; private Component <canvasScaler>5__2; private PropertyInfo <prop>5__3; private Vector2 <startRes>5__4; private Vector2 <targetRes>5__5; private float <duration>5__6; private float <elapsed>5__7; private float <progress>5__8; private Vector2 <currentRes>5__9; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SmoothBlackoutScreen>d__145(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <canvasLetterbox>5__1 = null; <canvasScaler>5__2 = null; <prop>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; } else { <>1__state = -1; <canvasLetterbox>5__1 = GameObject.Find("GAME/GUIManager/Canvas_Letterbox"); if (!((Object)(object)<canvasLetterbox>5__1 != (Object)null)) { goto IL_019f; } <canvasLetterbox>5__1.SetActive(true); <canvasScaler>5__2 = <canvasLetterbox>5__1.GetComponent("CanvasScaler"); if (!((Object)(object)<canvasScaler>5__2 != (Object)null)) { goto IL_0197; } <prop>5__3 = ((object)<canvasScaler>5__2).GetType().GetProperty("referenceResolution"); if (!(<prop>5__3 != null)) { goto IL_018f; } <startRes>5__4 = <>4__this.originalCanvasResolution; <targetRes>5__5 = Vector2.zero; <duration>5__6 = 1f; <elapsed>5__7 = 0f; } if (<elapsed>5__7 < <duration>5__6) { <elapsed>5__7 += Time.deltaTime; <progress>5__8 = <elapsed>5__7 / <duration>5__6; <currentRes>5__9 = Vector2.Lerp(<startRes>5__4, <targetRes>5__5, <progress>5__8); <prop>5__3.SetValue(<canvasScaler>5__2, <currentRes>5__9, null); <>2__current = null; <>1__state = 1; return true; } <prop>5__3.SetValue(<canvasScaler>5__2, Vector2.zero, null); goto IL_018f; IL_0197: <canvasScaler>5__2 = null; goto IL_019f; IL_018f: <prop>5__3 = null; goto IL_0197; IL_019f: return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <SmoothRestoreScreen>d__146 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <canvasLetterbox>5__1; private Component <canvasScaler>5__2; private PropertyInfo <prop>5__3; private Vector2 <startRes>5__4; private Vector2 <targetRes>5__5; private float <duration>5__6; private float <elapsed>5__7; private float <progress>5__8; private Vector2 <currentRes>5__9; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SmoothRestoreScreen>d__146(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <canvasLetterbox>5__1 = null; <canvasScaler>5__2 = null; <prop>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: 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_00c5: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <canvasLetterbox>5__1 = GameObject.Find("GAME/GUIManager/Canvas_Letterbox"); if (!((Object)(object)<canvasLetterbox>5__1 != (Object)null)) { break; } <canvasScaler>5__2 = <canvasLetterbox>5__1.GetComponent("CanvasScaler"); if ((Object)(object)<canvasScaler>5__2 != (Object)null) { <prop>5__3 = ((object)<canvasScaler>5__2).GetType().GetProperty("referenceResolution"); if (<prop>5__3 != null) { <startRes>5__4 = Vector2.zero; <targetRes>5__5 = <>4__this.originalCanvasResolution; <duration>5__6 = 1f; <elapsed>5__7 = 0f; goto IL_015b; } goto IL_0196; } goto IL_019e; case 1: <>1__state = -1; goto IL_015b; case 2: { <>1__state = -1; <canvasLetterbox>5__1.SetActive(false); <canvasScaler>5__2 = null; break; } IL_019e: <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; IL_0196: <prop>5__3 = null; goto IL_019e; IL_015b: if (<elapsed>5__7 < <duration>5__6) { <elapsed>5__7 += Time.deltaTime; <progress>5__8 = <elapsed>5__7 / <duration>5__6; <currentRes>5__9 = Vector2.Lerp(<startRes>5__4, <targetRes>5__5, <progress>5__8); <prop>5__3.SetValue(<canvasScaler>5__2, <currentRes>5__9, null); <>2__current = null; <>1__state = 1; return true; } <prop>5__3.SetValue(<canvasScaler>5__2, <>4__this.originalCanvasResolution, null); goto IL_0196; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <SpawnPropsSequentially>d__153 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AirportRemixedPlugin <>4__this; private GameObject <trash1_1>5__1; private Vector3 <trashPosition>5__2; private Vector3 <spawnPosition>5__3; private GameObject <basketball>5__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SpawnPropsSequentially>d__153(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <trash1_1>5__1 = null; <basketball>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_01de: 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_01f9: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0283: 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_00e1: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; case 1: <>1__state = -1; if (!<>4__this.isAirportScene) { return false; } if (PhotonNetwork.IsMasterClient) { <>4__this.SpawnBounceShroom(); } else { ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ClientFindAndModifyBounceShroom()); } goto IL_00f2; case 2: <>1__state = -1; goto IL_00f2; case 3: <>1__state = -1; <>4__this.SpawnPropItem("0_Items/Bugle_Prop Variant", <spawnPosition>5__3); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.SpawnPropItem("0_Items/BingBong_Prop Variant", <spawnPosition>5__3); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 5; return true; case 5: <>1__state = -1; <>4__this.SpawnPropItem("0_Items/Lollipop_Prop", <spawnPosition>5__3); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 6; return true; case 6: { <>1__state = -1; <>4__this.SpawnPropItem("0_Items/Binoculars_Prop", <spawnPosition>5__3); ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.AirplaneFlightSequence()); return false; } IL_00f2: if (!PhotonNetwork.IsConnected) { if (!<>4__this.isAirportScene) { return false; } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; } <trash1_1>5__1 = GameObject.Find("Map/BL_Airport/Misc/Trash 1 (1)"); if ((Object)(object)<trash1_1>5__1 == (Object)null) { Logger.LogWarning((object)"Trash 1 (1) not found! Cannot spawn prop items around it."); return false; } <trashPosition>5__2 = <trash1_1>5__1.transform.position; <spawnPosition>5__3 = <trashPosition>5__2 + new Vector3(0f, 1f, 0f); <basketball>5__4 = <>4__this.SpawnPropItem("0_Items/Basketball", <spawnPosition>5__3); if ((Object)(object)<basketball>5__4 != (Object)null) { <>4__this.ConfigureSpawnedBasketball(<basketball>5__4); } <>2__current = (object)new WaitForSeconds(1f); <>1__state = 3; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static ManualLogSource Logger; private bool mirrorCamToggled = false; private float mirrorCamToggleTime = 0f; private const float MIRROR_CAM_TOGGLE_DURATION = 20f; private bool isAirportScene = false; private bool wasReaching = false; private Vector3 triggerPositionA = new Vector3(-6.4864f, 0.5546f, 121.8579f); private Vector3 triggerPositionB = new Vector3(-6.1427f, 0.5946f, 124.008f); private float triggerRadius = 1.5f; private float lastTeleportTime = 0f; private const float TELEPORT_COOLDOWN = 3f; private bool wasReachingGates = false; private bool gatesAreOpen = false; private Vector3 gateTriggerPosition = new Vector3(-1.0352f, 0.5548f, 103.7902f); private float gateTriggerRadius = 3f; private float lastGateTriggerTime = 0f; private const float GATE_TRIGGER_COOLDOWN = 3f; private Vector3 basketballSpawnPosition = new Vector3(-36.9181f, 0.8002f, 30.9986f); private float basketballSpawnRadius = 3f; private const ushort BASKETBALL_ITEM_ID = 48; private int basketballSpawnCount = 0; private const int MAX_BASKETBALL_SPAWNS = 2; private bool doorAnimationActive = false; private bool doorIsOpen = false; private float doorAnimationStartTime = 0f; private Vector3 doorOriginalPosition = new Vector3(3.318f, -2.345f, 0f); private Vector3 doorTargetPosition = new Vector3(1.418f, -2.145f, 0f); private Vector3 doorTriggerPosition = new Vector3(-30.3765f, 1.8948f, 100.1498f); private float doorTriggerRadius = 2f; private const float DOOR_X_ANIMATION_DURATION = 3f; private const float DOOR_Y_ANIMATION_DURATION = 1f; private bool wasReachingDoor = false; private ConfigEntry<KeyCode> muralModeModifierKey; private ConfigEntry<KeyCode> muralModeMainKey; private ConfigEntry<bool> muralModeRequireModifier; private ConfigEntry<KeyCode> elevatorModifierKey; private ConfigEntry<KeyCode> elevatorMainKey; private ConfigEntry<bool> elevatorRequireModifier; private ConfigEntry<KeyCode> basketballSpawnKey; private bool showElevatorMenu = false; private Rect elevatorMenuRect = new Rect(50f, 50f, 300f, 250f); private Vector2 originalCanvasResolution = Vector2.zero; private bool isElevatorMoving = false; private Vector3 elevatorTriggerPosition = new Vector3(-3.7638f, 0.8764f, 50.3836f); private float elevatorTriggerRadius = 3f; private Vector3 elevatorGroundLevelPosition = new Vector3(-4.07f, -2.35f, 21.85f); private Vector3 playerTeleportPosition = new Vector3(-3.4111f, -4.456f, 50.1321f); private Vector3 elevatorOriginalPosition = new Vector3(-4.07f, 0.6479f, 21.85f); private Vector3 playerOriginalPosition = new Vector3(-3.7638f, 2.8764f, 50.3836f); private bool isOnGroundFloor = false; private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Logger.LogInfo((object)"Plugin tony4twentys.Airport_Remixed is loaded!"); InitializeConfig(); } private void InitializeConfig() { //IL_0138: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) muralModeRequireModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("MuralMode", "RequireModifierKey", true, "Whether MuralMode requires a modifier key to be held down"); muralModeModifierKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("MuralMode", "ModifierKey", (KeyCode)308, "The modifier key for MuralMode (only used if RequireModifierKey is true)"); muralModeMainKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("MuralMode", "MainKey", (KeyCode)112, "The main key to trigger MuralMode"); elevatorRequireModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("Elevator", "RequireModifierKey", true, "Whether Elevator requires a modifier key to be held down"); elevatorModifierKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Elevator", "ModifierKey", (KeyCode)308, "The modifier key for Elevator (only used if RequireModifierKey is true)"); elevatorMainKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Elevator", "MainKey", (KeyCode)101, "The main key to trigger Elevator"); basketballSpawnKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Basketball", "SpawnKey", (KeyCode)98, "The key to spawn basketball when near the basketball bin"); Logger.LogInfo((object)"MuralMode configuration loaded:"); Logger.LogInfo((object)$" Require Modifier: {muralModeRequireModifier.Value}"); Logger.LogInfo((object)$" Modifier Key: {muralModeModifierKey.Value}"); Logger.LogInfo((object)$" Main Key: {muralModeMainKey.Value}"); Logger.LogInfo((object)"Elevator configuration loaded:"); Logger.LogInfo((object)$" Require Modifier: {elevatorRequireModifier.Value}"); Logger.LogInfo((object)$" Modifier Key: {elevatorModifierKey.Value}"); Logger.LogInfo((object)$" Main Key: {elevatorMainKey.Value}"); Logger.LogInfo((object)"Basketball configuration loaded:"); Logger.LogInfo((object)$" Spawn Key: {basketballSpawnKey.Value}"); } private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; PhotonNetwork.AddCallbackTarget((object)this); } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; PhotonNetwork.RemoveCallbackTarget((object)this); ((MonoBehaviour)this).StopAllCoroutines(); ResetAirportState(); } private void Update() { if (CheckMuralModeKeyCombination()) { ToggleMirrorCam(); } CheckTeleportTrigger(); CheckDoorAnimationTrigger(); CheckGateTriggers(); UpdateDoorAnimation(); CheckBasketballSpawn(); if (mirrorCamToggled && Time.time - mirrorCamToggleTime >= 20f) { RestoreMirrorCam(); } HandleElevatorInput(); } private void TeleportPlayerToPosition(Vector3 worldPosition) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter != (Object)null) { ((MonoBehaviourPun)localCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { worldPosition, false }); } else { Logger.LogWarning((object)"Local player not found - cannot teleport"); } } private void CheckTeleportTrigger() { //IL_0049: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || Time.time - lastTeleportTime < 3f) { return; } bool isReaching = localCharacter.data.isReaching; Vector3 groundPos = localCharacter.data.groundPos; if (groundPos == Vector3.zero) { return; } if (isReaching && !wasReaching) { float num = Vector3.Distance(groundPos, triggerPositionA); if (num <= triggerRadius) { TeleportPlayerToPosition(new Vector3(-6.2216f, 0.5968f, 123.2305f)); lastTeleportTime = Time.time; return; } float num2 = Vector3.Distance(groundPos, triggerPositionB); if (num2 <= triggerRadius) { TeleportPlayerToPosition(new Vector3(-6.4864f, 0.5546f, 121.8579f)); lastTeleportTime = Time.time; return; } } wasReaching = isReaching; } private void CheckDoorAnimationTrigger() { //IL_0038: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || doorAnimationActive) { return; } bool isReaching = localCharacter.data.isReaching; Vector3 groundPos = localCharacter.data.groundPos; if (groundPos == Vector3.zero) { return; } if (isReaching && !wasReachingDoor) { float num = Vector3.Distance(groundPos, doorTriggerPosition); if (num <= doorTriggerRadius) { StartDoorAnimation(); } } wasReachingDoor = isReaching; } private void CheckGateTriggers() { //IL_0049: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_007b: Unknown result type (might be due to invalid IL or missing references) Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || Time.time - lastGateTriggerTime < 3f) { return; } bool isReaching = localCharacter.data.isReaching; Vector3 groundPos = localCharacter.data.groundPos; if (groundPos == Vector3.zero) { return; } if (isReaching && !wasReachingGates) { float num = Vector3.Distance(groundPos, gateTriggerPosition); if (num <= gateTriggerRadius) { if (gatesAreOpen) { CloseBothGates(); } else { OpenBothGates(); } lastGateTriggerTime = Time.time; return; } } wasReachingGates = isReaching; } private void OpenBothGates() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Fences/Check In desk/Desk/Gate"); GameObject val2 = GameObject.Find("Map/BL_Airport/Fences/Check In desk/Desk (1)/Gate"); if ((Object)(object)val != (Object)null && (Object)(object)val2 != (Object)null) { val.transform.eulerAngles = new Vector3(270f, 90f, 0f); val2.transform.eulerAngles = new Vector3(270f, 270f, 0f); gatesAreOpen = true; } } private void CloseBothGates() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Fences/Check In desk/Desk/Gate"); GameObject val2 = GameObject.Find("Map/BL_Airport/Fences/Check In desk/Desk (1)/Gate"); if ((Object)(object)val != (Object)null && (Object)(object)val2 != (Object)null) { val.transform.eulerAngles = new Vector3(270f, 180f, 0f); val2.transform.eulerAngles = new Vector3(270f, 180f, 0f); gatesAreOpen = false; } } private void StartDoorAnimation() { GameObject val = GameObject.Find("Map/Photobooth/PhotoBooth 1/Door"); if (!((Object)(object)val == (Object)null)) { doorAnimationActive = true; doorAnimationStartTime = Time.time; doorIsOpen = !doorIsOpen; } } private void UpdateDoorAnimation() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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) //IL_0204: Unknown result type (might be due to invalid IL or missing references) if (!doorAnimationActive) { return; } GameObject val = GameObject.Find("Map/Photobooth/PhotoBooth 1/Door"); if ((Object)(object)val == (Object)null) { doorAnimationActive = false; return; } float num = Time.time - doorAnimationStartTime; Vector3 localPosition = val.transform.localPosition; Vector3 val2 = (doorIsOpen ? doorTargetPosition : doorOriginalPosition); if (doorIsOpen) { if (num <= 3f) { float num2 = num / 3f; localPosition.x = Mathf.Lerp(doorOriginalPosition.x, doorTargetPosition.x, num2); localPosition.y = doorOriginalPosition.y; } else if (num <= 4f) { float num3 = (num - 3f) / 1f; localPosition.x = doorTargetPosition.x; localPosition.y = Mathf.Lerp(doorOriginalPosition.y, doorTargetPosition.y, num3); } else { localPosition = doorTargetPosition; doorAnimationActive = false; } } else if (num <= 1f) { float num4 = num / 1f; localPosition.x = doorTargetPosition.x; localPosition.y = Mathf.Lerp(doorTargetPosition.y, doorOriginalPosition.y, num4); } else if (num <= 4f) { float num5 = (num - 1f) / 3f; localPosition.x = Mathf.Lerp(doorTargetPosition.x, doorOriginalPosition.x, num5); localPosition.y = doorOriginalPosition.y; } else { localPosition = doorOriginalPosition; doorAnimationActive = false; } val.transform.localPosition = localPosition; } private bool CheckMuralModeKeyCombination() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (!Input.GetKeyDown(muralModeMainKey.Value)) { return false; } if (muralModeRequireModifier.Value) { return Input.GetKey(muralModeModifierKey.Value); } return true; } private bool CheckElevatorKeyCombination() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (!Input.GetKeyDown(elevatorMainKey.Value)) { return false; } if (elevatorRequireModifier.Value) { return Input.GetKey(elevatorModifierKey.Value); } return true; } private void ToggleMirrorCam() { //IL_0065: 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) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/Mirror (1)/Mirror Cam"); if ((Object)(object)val != (Object)null) { val.SetActive(false); mirrorCamToggled = true; mirrorCamToggleTime = Time.time; string text; if (!muralModeRequireModifier.Value) { KeyCode value = muralModeMainKey.Value; text = ((object)(KeyCode)(ref value)).ToString(); } else { text = $"{muralModeModifierKey.Value} + {muralModeMainKey.Value}"; } string text2 = text; } else { Logger.LogWarning((object)"Mirror Cam not found at path: Map/Mirror (1)/Mirror Cam"); } } private void RestoreMirrorCam() { GameObject val = GameObject.Find("Map/Mirror (1)/Mirror Cam"); if ((Object)(object)val != (Object)null) { val.SetActive(true); mirrorCamToggled = false; } else { Logger.LogWarning((object)"Mirror Cam not found when trying to restore"); } } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (isAirportScene = ((Scene)(ref scene)).name == "Airport") { ((MonoBehaviour)this).StopAllCoroutines(); ResetAirportState(); basketballSpawnCount = 0; ProcessAllAirportObjects(); } else { ((MonoBehaviour)this).StopAllCoroutines(); ResetAirportState(); } } private void ResetAirportState() { mirrorCamToggled = false; doorAnimationActive = false; doorIsOpen = false; wasReaching = false; wasReachingDoor = false; wasReachingGates = false; gatesAreOpen = false; lastTeleportTime = 0f; lastGateTriggerTime = 0f; basketballSpawnCount = 0; } private void ProcessAllAirportObjects() { try { ProcessAllObjectsFromScan(); } catch (Exception ex) { Logger.LogError((object)("Error in comprehensive processing: " + ex.Message)); } } private void ProcessAllObjectsFromScan() { ProcessFlyNotificationObjects(); ProcessMapObjects(); ProcessChessObjects(); ProcessSpecificMapObjects(); ProcessScoutmasterObjects(); ProcessMirrorObjects(); ProcessAirportObjects(); ProcessVoiceClientObjects(); ProcessVegetationObjects(); ProcessSeatingObjects(); ProcessTrashObjects(); ProcessLuggageObjects(); ProcessLightsObjects(); ProcessDisplaysObjects(); ProcessBakeDataObjects(); ProcessConveyorObjects(); ProcessGlassFenceObjects(); ProcessOutofBoundsBlockersObjects(); ProcessSplitmeshObjects(); ProcessColliderObjects(); ProcessRemainingObjects(); ProcessMapChildrenTurnOff(); ProcessRopeDynamicObjects(); ProcessObjectsThatMustBeOn(); ProcessNewObjectInstantiation(); ProcessRootObjectsTurnOff(); ProcessMirror1DetailsChildren(); ProcessPhotoboothRepositioning(); ProcessPhotoboothCurtain(); ProcessPhotoboothFrames(); ProcessPropObjectsRepositioning(); ProcessAirplaneRepositioning(); ProcessTrashRepositioning(); ProcessCube3ScaleUpdate(); ProcessCourtAndCubeInstantiation(); ProcessHoopRepositioning(); ProcessAdditionalCubeAndHoopInstantiation(); ProcessBasketballCourtFence(); ProcessAdditionalCubes(); ProcessElevatorSystem(); ProcessBasketballObjectsTurnOff(); ProcessChessPiecesRepositioning(); ProcessRootObjectsTurnOff(); ProcessDesertRock9(); } private void ProcessFlyNotificationObjects() { //IL_0035: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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) GameObject val = GameObject.Find("FlyNotificationCanvas"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(1280f, 708.5f, 0f); val.transform.rotation = Quaternion.Euler(0f, 0f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); } GameObject val2 = GameObject.Find("FlyNotificationCanvas/FlyText"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); val2.transform.position = new Vector3(1280f, 508.5f, 0f); val2.transform.rotation = Quaternion.Euler(0f, 0f, 0f); val2.transform.localScale = new Vector3(1f, 1f, 1f); } } private void ProcessMapObjects() { ProcessMainMeshesObjects(); ProcessElevatorObjects(); ProcessSeatsObjects(); ProcessMiscObjects(); ProcessFencesObjects(); } private void ProcessMainMeshesObjects() { //IL_0035: 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_0075: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Main Meshes"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(-14.1f, 0.51f, 103.6f); val.transform.rotation = Quaternion.Euler(0f, 180f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); ProcessMainMeshesChildren(val); } } private void ProcessMainMeshesChildren(GameObject mainMeshes) { GameObject val = GameObject.Find("Map/BL_Airport/Main Meshes/Airport"); if ((Object)(object)val != (Object)null) { val.SetActive(true); } GameObject val2 = GameObject.Find("Map/BL_Airport/Main Meshes/Airport (1)Roof"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); } GameObject val3 = GameObject.Find("Map/BL_Airport/Main Meshes/Airstrip"); if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); } GameObject val4 = GameObject.Find("Map/BL_Airport/Main Meshes/Windows"); if ((Object)(object)val4 != (Object)null) { val4.SetActive(true); } GameObject val5 = GameObject.Find("Map/BL_Airport/Main Meshes/Schaffold"); if ((Object)(object)val5 != (Object)null) { val5.SetActive(false); } GameObject val6 = GameObject.Find("Map/BL_Airport/Main Meshes/Carpet"); if ((Object)(object)val6 != (Object)null) { val6.SetActive(false); } GameObject val7 = GameObject.Find("Map/BL_Airport/Main Meshes/Desk"); if ((Object)(object)val7 != (Object)null) { val7.SetActive(false); } GameObject val8 = GameObject.Find("Map/BL_Airport/Main Meshes/Outside grid"); if ((Object)(object)val8 != (Object)null) { val8.SetActive(false); } GameObject val9 = GameObject.Find("Map/BL_Airport/Main Meshes/Outside grid (1)"); if ((Object)(object)val9 != (Object)null) { val9.SetActive(false); } GameObject val10 = GameObject.Find("Map/BL_Airport/Main Meshes/Climbing wall blockers"); if ((Object)(object)val10 != (Object)null) { val10.SetActive(false); } GameObject val11 = GameObject.Find("Map/BL_Airport/Main Meshes/Cube"); if ((Object)(object)val11 != (Object)null) { val11.SetActive(false); } GameObject val12 = GameObject.Find("Map/BL_Airport/Main Meshes/Cube (1)"); if ((Object)(object)val12 != (Object)null) { val12.SetActive(false); } } private void ProcessElevatorObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Elevator"); if ((Object)(object)val != (Object)null) { val.SetActive(true); } GameObject val2 = GameObject.Find("Map/BL_Airport/Elevator (1)"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); } GameObject val3 = GameObject.Find("Map/BL_Airport/Elevator (2)"); if ((Object)(object)val3 != (Object)null) { val3.SetActive(false); } GameObject val4 = GameObject.Find("Map/BL_Airport/Elevator (3)"); if ((Object)(object)val4 != (Object)null) { val4.SetActive(false); } } private void ProcessSeatsObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Seats"); if ((Object)(object)val != (Object)null) { val.SetActive(true); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActive(true); } } } private void ProcessMiscObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Misc"); if ((Object)(object)val != (Object)null) { val.SetActive(true); ProcessMiscChildren(val); } } private void ProcessMiscChildren(GameObject misc) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Misc/Doors"); if ((Object)(object)val != (Object)null) { val.transform.localPosition = new Vector3(-3.1522f, 0.5401f, -8.2f); val.transform.eulerAngles = new Vector3(270f, 270.0003f, 0f); val.transform.hasChanged = true; } Transform[] componentsInChildren = misc.GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val2 in array) { if (((Object)val2).name.ToLower().Contains("trash")) { ((Component)val2).gameObject.SetActive(true); } } Transform[] array2 = componentsInChildren; foreach (Transform val3 in array2) { if (((Object)val3).name.ToLower().Contains("luggagewagon")) { ((Component)val3).gameObject.SetActive(false); } } } private void ProcessFencesObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Fences"); if ((Object)(object)val != (Object)null) { val.SetActive(true); ProcessFencesChildren(val); } } private void ProcessFencesChildren(GameObject fences) { GameObject val = GameObject.Find("Map/BL_Airport/Fences/Check In desk"); if ((Object)(object)val != (Object)null) { val.SetActive(true); ProcessCheckInDeskChildren(val); } for (int i = 0; i < fences.transform.childCount; i++) { Transform child = fences.transform.GetChild(i); string name = ((Object)child).name; if (name.Contains("fence") && !name.Contains("Check In")) { ((Component)child).gameObject.SetActive(false); } } } private void ProcessCheckInDeskChildren(GameObject checkInDesk) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Fences/Check In desk/Desk"); if ((Object)(object)val != (Object)null) { val.SetActive(true); } GameObject val2 = GameObject.Find("Map/BL_Airport/Fences/Check In desk/Desk (1)"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); val2.transform.position = new Vector3(-0.773f, 0.51f, 99.836f); val2.transform.rotation = Quaternion.Euler(270f, 180f, 0f); val2.transform.localScale = new Vector3(0.665f, -0.665f, 0.665f); } GameObject val3 = GameObject.Find("Map/BL_Airport/Fences/Check In desk/AirportGateKiosk"); if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); val3.transform.position = new Vector3(-0.83f, 1.6f, 101.5f); val3.transform.rotation = Quaternion.Euler(270f, 180f, 0f); val3.transform.localScale = new Vector3(0.448f, 0.448f, 0.448f); } } private void ProcessChessObjects() { //IL_0035: 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_0075: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Chess/C_Queen B (1)"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(2.17f, 1.191f, 83.34f); val.transform.rotation = Quaternion.Euler(0f, 269.999f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); } } private void ProcessSpecificMapObjects() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/Cube"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(-18.902f, 0.3f, 23.811f); val.transform.rotation = Quaternion.Euler(0f, 0f, 0f); val.transform.localScale = new Vector3(50f, 1f, 50f); } GameObject val2 = GameObject.Find("Map/BL_Airport/Main Meshes/Climbing wall blockers"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } GameObject[] array = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val3 in array2) { if (((Object)val3).name.ToLower().Contains("ropedynamic") && ((Object)val3).name.ToLower().Contains("clone")) { val3.SetActive(false); } } GameObject val4 = GameObject.Find("Map/BL_Airport/Displays"); if ((Object)(object)val4 != (Object)null) { val4.SetActive(false); } GameObject val5 = GameObject.Find("Map/BL_Airport/Vegetation"); if ((Object)(object)val5 != (Object)null) { val5.SetActive(false); } GameObject val6 = GameObject.Find("Map/BL_Airport/Lights"); if ((Object)(object)val6 != (Object)null) { val6.SetActive(false); } GameObject val7 = GameObject.Find("Map/BL_Airport/BakeData"); if ((Object)(object)val7 != (Object)null) { val7.SetActive(false); } GameObject val8 = GameObject.Find("Map/BL_Airport/GlassFence"); if ((Object)(object)val8 != (Object)null) { val8.SetActive(false); } GameObject[] array3 = (GameObject[])(object)new GameObject[2] { GameObject.Find("Map/BL_Airport/OutofBoundsBlockers"), GameObject.Find("Map/BL_Airport/OutofBoundsBlockers (1)") }; GameObject[] array4 = array3; foreach (GameObject val9 in array4) { if ((Object)(object)val9 != (Object)null) { val9.SetActive(false); } } GameObject val10 = GameObject.Find("Map/BL_Airport/Conveyor (0)"); if ((Object)(object)val10 != (Object)null) { val10.SetActive(false); } GameObject val11 = GameObject.Find("Map/BL_Airport/Conveyor (1)"); if ((Object)(object)val11 != (Object)null) { val11.SetActive(false); } ProcessBasicRails(); ProcessStanchions(); ProcessKiosk2Positioning(); ProcessMirrorChanges(); } private void ProcessScoutmasterObjects() { //IL_0035: 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_0075: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("scoutmaster Myres"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(0.514f, 0.59f, 106.503f); val.transform.rotation = Quaternion.Euler(0f, 200f, 0f); val.transform.localScale = new Vector3(0.139f, 0.11f, 0.139f); } } private void ProcessMirrorObjects() { GameObject val = GameObject.Find("Map/Mirror (1)"); if ((Object)(object)val != (Object)null) { val.SetActive(true); ProcessMirror1Children(val); } } private void ProcessMirror1Children(GameObject mirror1) { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < mirror1.transform.childCount; i++) { Transform child = mirror1.transform.GetChild(i); ((Component)child).gameObject.SetActive(true); } GameObject val = GameObject.Find("Map/Mirror (1)/Mirror/Mirror Collider"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(-22.42f, 3.92f, 85.8f); val.transform.rotation = Quaternion.Euler(90f, 90f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); } } private void ProcessBasicRails() { string[] array = new string[5] { "Map/BL_Airport/Misc/Basic Rail", "Map/BL_Airport/Misc/Basic Rail (1)", "Map/BL_Airport/Misc/Basic Rail (2)", "Map/BL_Airport/Misc/Basic Rail (3)", "Map/BL_Airport/Misc/Basic Rail (4)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActive(false); } } } private void ProcessKiosk2Positioning() { //IL_0035: 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_0075: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Fences/Kiosk (2)"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(-6.8f, 1.5f, 54.1f); val.transform.rotation = Quaternion.Euler(270f, 270f, 0f); val.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); } } private void ProcessStanchions() { string[] array = new string[8] { "Map/stanchion", "Map/stanchion (1)", "Map/stanchion (2)", "Map/stanchion (3)", "Map/stanchion (4)", "Map/stanchion (5)", "Map/stanchion (6)", "Map/stanchion (7)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActive(false); } } } private void ProcessMirrorChanges() { GameObject val = GameObject.Find("Map/Mirror (1)/Details/Cube (2)"); if ((Object)(object)val != (Object)null) { val.SetActive(false); } GameObject val2 = GameObject.Find("Map/Mirror (1)/Mirror"); if ((Object)(object)val2 != (Object)null) { MeshRenderer component = val2.GetComponent<MeshRenderer>(); if ((Object)(object)component != (Object)null && (Object)(object)((Renderer)component).material != (Object)null) { ((Renderer)component).material.SetTexture("_TextureSample0", (Texture)null); } else { Logger.LogWarning((object)"Mirror found but no MeshRenderer or material component"); } } } private void ProcessAirportObjects() { GameObject val = GameObject.Find("Map/BL_Airport"); if ((Object)(object)val != (Object)null) { val.SetActive(true); } GameObject val2 = GameObject.Find("Map"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); } } private void ProcessVoiceClientObjects() { //IL_0035: 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_0075: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("VoiceClient"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(6.167f, 4.516f, -370.526f); val.transform.rotation = Quaternion.Euler(0f, 0f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); } } private void ProcessRemainingObjects() { ProcessDefaultActiveObjects(); ProcessDefaultInactiveObjects(); ProcessObjectsWithSpecificTransforms(); } private void ProcessDefaultActiveObjects() { string[] array = new string[4] { "Map/BL_Airport/Elevator/Door 1", "Map/BL_Airport/Elevator/Light (8)", "Map/BL_Airport/Elevator (1)/Door 1", "Map/BL_Airport/Elevator (1)/Colliders (1)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActive(true); } } } private void ProcessDefaultInactiveObjects() { string[] array = new string[10] { "Map/BL_Airport/Main Meshes/Schaffold", "Map/BL_Airport/Main Meshes/Carpet", "Map/BL_Airport/Main Meshes/Desk", "Map/BL_Airport/Main Meshes/Outside grid", "Map/BL_Airport/Main Meshes/Outside grid (1)", "Map/BL_Airport/Main Meshes/Climbing wall blockers", "Map/BL_Airport/Main Meshes/Cube", "Map/BL_Airport/Main Meshes/Cube (1)", "Map/BL_Airport/Elevator (2)", "Map/BL_Airport/Elevator (3)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActive(false); } } } private void ProcessObjectsWithSpecificTransforms() { //IL_0016: 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_003e: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) SetObjectTransform("Map/BL_Airport/Fences/Check In desk/AirportGateKiosk", new Vector3(-0.83f, 1.6f, 101.5f), new Vector3(270f, 180f, 0f), new Vector3(0.448f, 0.448f, 0.448f)); SetObjectTransform("Map/BL_Airport/Fences/Check In desk/Desk (1)", new Vector3(-0.773f, 0.51f, 99.836f), new Vector3(270f, 180f, 0f), new Vector3(0.665f, -0.665f, 0.665f)); SetObjectTransform("scoutmaster Myres", new Vector3(0.514f, 0.59f, 106.503f), new Vector3(0f, 200f, 0f), new Vector3(0.139f, 0.11f, 0.139f)); } private void SetObjectTransform(string path, Vector3 position, Vector3 rotation, Vector3 scale) { //IL_001a: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find(path); if ((Object)(object)val != (Object)null) { val.transform.position = position; val.transform.rotation = Quaternion.Euler(rotation); val.transform.localScale = scale; } else { Logger.LogWarning((object)("Object not found at path: " + path)); } } private void SetObjectActive(string objectPath, bool active) { GameObject val = GameObject.Find(objectPath); if ((Object)(object)val != (Object)null) { val.SetActive(active); } else { Logger.LogWarning((object)("Object not found: " + objectPath)); } } private void ProcessVegetationObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Vegetation"); if ((Object)(object)val != (Object)null) { val.SetActive(false); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActive(false); } } } private void ProcessSeatingObjects() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_016c: 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_01c1: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Seats"); if (!((Object)(object)val != (Object)null)) { return; } val.SetActive(true); val.transform.position = new Vector3(-14.1f, 0.51f, 103.6f); val.transform.rotation = Quaternion.Euler(0f, 180f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); bool active = false; if (i == 0 || i == 1 || i == 8 || i == 9 || i == 10 || i == 13 || i == 14 || i == 16 || i == 17 || i == 19) { active = true; } ((Component)child).gameObject.SetActive(active); } SetObjectTransform("Map/BL_Airport/Seats/Seating", new Vector3(1.808f, 0.74f, 115.032f), new Vector3(270f, 180f, 0f), new Vector3(0.286f, 0.286f, 0.286f)); SetObjectTransform("Map/BL_Airport/Seats/Seating (3)", new Vector3(-1.39f, 0.755f, 54.566f), new Vector3(270f, 90f, 0f), new Vector3(0.286f, 0.286f, 0.286f)); if (val.transform.childCount > 9) { Transform child2 = val.transform.GetChild(9); child2.localPosition = new Vector3(-0.7062f, 0.1f, 20.0478f); } } private void ProcessTrashObjects() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00f9: 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_015b: 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_01bd: 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) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Misc/Trash 1"); if ((Object)(object)val != (Object)null) { val.SetActive(true); val.transform.position = new Vector3(2.653f, 0.999f, 98.602f); val.transform.rotation = Quaternion.Euler(270.02f, 180f, 0f); val.transform.localScale = new Vector3(0.182f, 0.182f, 0.182f); } GameObject val2 = GameObject.Find("Map/BL_Airport/Misc/Trash 1 (3)"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); val2.transform.position = new Vector3(-22.744f, 0.989f, 102.177f); val2.transform.rotation = Quaternion.Euler(270f, 180f, 0f); val2.transform.localScale = new Vector3(0.182f, 0.182f, 0.182f); } GameObject val3 = GameObject.Find("Map/BL_Airport/Misc/Trash 2 "); if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); val3.transform.position = new Vector3(1.929f, 0.999f, 98.6f); val3.transform.rotation = Quaternion.Euler(270.02f, 180f, 0f); val3.transform.localScale = new Vector3(0.182f, 0.182f, 0.182f); } GameObject val4 = GameObject.Find("Map/BL_Airport/Misc/Trash 2 (3)"); if ((Object)(object)val4 != (Object)null) { val4.SetActive(true); val4.transform.position = new Vector3(-23.539f, 0.989f, 102.223f); val4.transform.rotation = Quaternion.Euler(270f, 180f, 0f); val4.transform.localScale = new Vector3(0.182f, 0.182f, 0.182f); } GameObject val5 = GameObject.Find("Map/BL_Airport/Misc/Trash 1 (1)"); if ((Object)(object)val5 != (Object)null) { val5.SetActive(true); val5.transform.position = new Vector3(-28.828f, 0.7448f, 97.5635f); val5.transform.rotation = Quaternion.Euler(270f, 270.0003f, 0f); val5.transform.localScale = new Vector3(0.8817f, 0.5817f, 0.0817f); } GameObject val6 = GameObject.Find("Map/BL_Airport/Misc/Trash 1 (4)"); if ((Object)(object)val6 != (Object)null) { val6.SetActive(true); val6.transform.position = new Vector3(-37.5805f, 1.5617f, 31.6923f); val6.transform.rotation = Quaternion.Euler(270f, 270f, 0f); val6.transform.localScale = new Vector3(0.3f, 0.5f, 0.3f); } string[] array = new string[4] { "Map/BL_Airport/Misc/Trash 1 (2)", "Map/BL_Airport/Misc/Trash 2 (4)", "Map/BL_Airport/Misc/Trash 2 (1)", "Map/BL_Airport/Misc/Trash 2 (2)" }; string[] array2 = array; foreach (string text in array2) { GameObject val7 = GameObject.Find(text); if ((Object)(object)val7 != (Object)null) { val7.SetActive(false); } } } private void ProcessLuggageObjects() { GameObject[] array = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.ToLower().Contains("luggage")) { val.SetActive(false); } } GameObject val2 = GameObject.Find("Map/BL_Airport/Misc"); if ((Object)(object)val2 != (Object)null) { Transform[] componentsInChildren = val2.GetComponentsInChildren<Transform>(); Transform[] array3 = componentsInChildren; foreach (Transform val3 in array3) { if (((Object)val3).name.ToLower().Contains("luggagewagon")) { ((Component)val3).gameObject.SetActive(false); } } } ProcessSpecificLuggageObjects(); } private void ProcessSpecificLuggageObjects() { GameObject val = GameObject.Find("Map/BL_Airport/LuggageEpic"); if ((Object)(object)val != (Object)null) { val.SetActive(false); } GameObject val2 = GameObject.Find("Map/BL_Airport/LuggageSmall"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } GameObject val3 = GameObject.Find("Map/BL_Airport/LuggageSmall (2)"); if ((Object)(object)val3 != (Object)null) { val3.SetActive(false); } GameObject val4 = GameObject.Find("Map/BL_Airport/LuggageBig"); if ((Object)(object)val4 != (Object)null) { val4.SetActive(false); } GameObject val5 = GameObject.Find("Map/BL_Airport/LuggageBig (1)"); if ((Object)(object)val5 != (Object)null) { val5.SetActive(false); } GameObject val6 = GameObject.Find("Map/BL_Airport/LuggageBig (2)"); if ((Object)(object)val6 != (Object)null) { val6.SetActive(false); } } private void ProcessLightsObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Lights"); if ((Object)(object)val != (Object)null) { val.SetActive(false); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActive(false); } } } private void ProcessDisplaysObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Displays"); if ((Object)(object)val != (Object)null) { val.SetActive(false); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActive(false); } } } private void ProcessBakeDataObjects() { GameObject[] array = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.ToLower().Contains("bakedata")) { val.SetActive(false); } } } private void ProcessConveyorObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Conveyor (0)"); if ((Object)(object)val != (Object)null) { val.SetActive(false); } GameObject val2 = GameObject.Find("Map/BL_Airport/Conveyor (1)"); if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } } private void ProcessGlassFenceObjects() { GameObject val = GameObject.Find("Map/BL_Airport/GlassFence"); if ((Object)(object)val != (Object)null) { val.SetActive(false); } } private void ProcessOutofBoundsBlockersObjects() { string[] array = new string[2] { "Map/BL_Airport/OutofBoundsBlockers", "Map/BL_Airport/OutofBoundsBlockers (1)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActive(false); } } GameObject[] array3 = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array4 = array3; foreach (GameObject val2 in array4) { if (((Object)val2).name.Contains("OutofBoundsBlockers") && (Object)(object)val2.transform.parent != (Object)null && ((Object)val2.transform.parent).name == "BL_Airport") { val2.SetActive(false); } } } private void ProcessSplitmeshObjects() { GameObject[] array = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.StartsWith("Splitmesh")) { val.SetActive(true); } } } private void ProcessColliderObjects() { GameObject[] array = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.StartsWith("Collider")) { val.SetActive(true); } } } private void ProcessMapChildrenTurnOff() { string[] array = new string[34] { "Map/Flight Board", "Map/Flight Board (1)", "Map/Flight Board (2)", "Map/Flight Board (3)", "Map/Reflection Probe", "Map/Gate Light", "Map/stanchion", "Map/stanchion (1)", "Map/stanchion (2)", "Map/stanchion (3)", "Map/stanchion (4)", "Map/stanchion (5)", "Map/stanchion (6)", "Map/stanchion (7)", "Map/Climbing Wall", "Map/BakeLight", "Map/BakeLight (1)", "Map/BakeLight (2)", "Map/BakeLight (3)", "Map/BL_Airport/Vegetation", "Map/BL_Airport/Lights", "Map/BL_Airport/Displays", "Map/BL_Airport/BakeData", "Map/BL_Airport/GlassFence", "Map/BL_Airport/OutofBoundsBlockers", "Map/BL_Airport/OutofBoundsBlockers (1)", "Map/BL_Airport/OutofBoundsBlockers (2)", "Map/BL_Airport/Conveyor (0)", "Map/BL_Airport/Conveyor (1)", "Map/BL_Airport/Misc/Basic Rail", "Map/BL_Airport/Misc/Basic Rail (1)", "Map/BL_Airport/Misc/Basic Rail (2)", "Map/BL_Airport/Misc/Basic Rail (3)", "Map/BL_Airport/Misc/Basic Rail (4)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActive(false); } } } private void ProcessRopeDynamicObjects() { GameObject[] array = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.Contains("RopeDynamic") || ((Object)val).name.Contains("RopeBone") || ((Object)val).name.Contains("Rope_Armature") || ((Object)val).name.Contains("RopeMesh") || ((Object)val).name.Contains("RopeSegment") || ((Object)val).name.Contains("Rend")) { val.SetActive(false); } } } private void ProcessObjectsThatMustBeOn() { GameObject val = GameObject.Find("Map/BL_Airport/Fences/Check In desk"); if ((Object)(object)val != (Object)null) { if (val.transform.childCount > 0) { Transform child = val.transform.GetChild(0); ((Component)child).gameObject.SetActive(true); if (child.childCount > 0) { Transform child2 = child.GetChild(0); ((Component)child2).gameObject.SetActive(true); } } if (val.transform.childCount > 2) { Transform child3 = val.transform.GetChild(2); ((Component)child3).gameObject.SetActive(true); if (child3.childCount > 0) { Transform child4 = child3.GetChild(0); ((Component)child4).gameObject.SetActive(true); } } } else { Logger.LogWarning((object)"Check In desk not found!"); } } private void ProcessNewObjectInstantiation() { //IL_0073: 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_0101: 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_018f: 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_021d: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: 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_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/Cube"); if ((Object)(object)val != (Object)null) { GameObject val2 = GameObject.Find("Map"); if ((Object)(object)val2 != (Object)null) { GameObject val3 = Object.Instantiate<GameObject>(val); ((Object)val3).name = "Cube(Clone)"; val3.transform.SetParent(val2.transform); val3.transform.eulerAngles = new Vector3(0f, 0f, 90f); val3.transform.localPosition = new Vector3(-39.1241f, -9.1982f, 23.811f); val3.transform.hasChanged = true; val3.SetActive(true); ApplyMaterialToObject(val3, "M_Airport Tiles (instance)"); GameObject val4 = Object.Instantiate<GameObject>(val); ((Object)val4).name = "Cube(Clone)"; val4.transform.SetParent(val2.transform); val4.transform.eulerAngles = new Vector3(0f, 90f, 90f); val4.transform.localPosition = new Vector3(-22.9927f, -9.1982f, -1.6599f); val4.transform.hasChanged = true; val4.SetActive(true); ApplyMaterialToObject(val4, "M_Airport Tiles (instance)"); GameObject val5 = Object.Instantiate<GameObject>(val); ((Object)val5).name = "Cube(Clone)"; val5.transform.SetParent(val2.transform); val5.transform.eulerAngles = new Vector3(0f, 0f, 90f); val5.transform.localPosition = new Vector3(6.4f, -9.1982f, 23.811f); val5.transform.hasChanged = true; val5.SetActive(true); ApplyMaterialToObject(val5, "M_Airport Tiles (instance)"); GameObject val6 = Object.Instantiate<GameObject>(val); ((Object)val6).name = "Cube(Clone)"; val6.transform.SetParent(val2.transform); val6.transform.eulerAngles = new Vector3(0f, 10f, 90f); val6.transform.localPosition = new Vector3(6.1f, -9.1982f, 22.211f); val6.transform.hasChanged = true; val6.SetActive(true); ApplyMaterialToObject(val6, "M_Airport Tiles (instance)"); GameObject val7 = Object.Instantiate<GameObject>(val); ((Object)val7).name = "Cube(Clone)"; val7.transform.SetParent(val2.transform); val7.transform.eulerAngles = new Vector3(0f, 90f, 90f); val7.transform.localPosition = new Vector3(-41.61f, -9.1982f, 49.2747f); val7.transform.hasChanged = true; val7.SetActive(true); ApplyMaterialToObject(val7, "M_Airport Tiles (instance)"); GameObject val8 = Object.Instantiate<GameObject>(val); ((Object)val8).name = "Cube(Clone)"; val8.transform.SetParent(val2.transform); val8.transform.eulerAngles = new Vector3(0f, 90f, 90f); val8.transform.localPosition = new Vector3(-18.1061f, 9.75f, 49.2747f); val8.transform.localScale = new Vector3(12.1f, 1f, 50f); val8.transform.hasChanged = true; val8.SetActive(true); ApplyMaterialToObject(val8, "M_Airport Tiles (instance)"); GameObject val9 = Object.Instantiate<GameObject>(val); ((Object)val9).name = "Cube(Clone)"; val9.transform.SetParent(val2.transform); val9.transform.eulerAngles = new Vector3(0f, 90f, 90f); val9.transform.localPosition = new Vector3(-12.446f, -9.1982f, 49.2747f); val9.transform.localScale = new Vector3(50f, 1f, 3.17f); val9.transform.hasChanged = true; val9.SetActive(true); ApplyMaterialToObject(val9, "M_Airport Tiles (instance)"); GameObject val10 = Object.Instantiate<GameObject>(val); ((Object)val10).name = "Cube(Clone)"; val10.transform.SetParent(val2.transform); val10.transform.eulerAngles = new Vector3(0f, 90f, 90f); val10.transform.localPosition = new Vector3(-6.85f, -9.1982f, 49.2747f); val10.transform.localScale = new Vector3(50f, 1f, 2.78f); val10.transform.hasChanged = true; val10.SetActive(true); ApplyMaterialToObject(val10, "M_Airport Tiles (instance)"); GameObject val11 = Object.Instantiate<GameObject>(val); ((Object)val11).name = "Cube(Clone)"; val11.transform.SetParent(val2.transform); val11.transform.eulerAngles = new Vector3(0f, 90f, 90f); val11.transform.localPosition = new Vector3(-1.32f, -9.1982f, 49.2747f); val11.transform.localScale = new Vector3(50f, 1f, 3f); val11.transform.hasChanged = true; val11.SetActive(true); ApplyMaterialToObject(val11, "M_Airport Tiles (instance)"); GameObject val12 = Object.Instantiate<GameObject>(val); ((Object)val12).name = "Cube(Clone)"; val12.transform.SetParent(val2.transform); val12.transform.eulerAngles = new Vector3(0f, 90f, 90f); val12.transform.localPosition = new Vector3(4.46f, -9.1982f, 49.2747f); val12.transform.localScale = new Vector3(50f, 1f, 3.4f); val12.transform.hasChanged = true; val12.SetActive(true); ApplyMaterialToObject(val12, "M_Airport Tiles (instance)"); GameObject val13 = Object.Instantiate<GameObject>(val); ((Object)val13).name = "Cube(Clone)"; val13.transform.SetParent(val2.transform); val13.transform.eulerAngles = new Vector3(0f, 180f, 90f); val13.transform.localPosition = new Vector3(-22.48f, 3.9f, 85.98f); val13.transform.localScale = new Vector3(6.8f, 0.1f, 15.5f); val13.transform.hasChanged = true; val13.SetActive(true); ApplyMaterialToObject(val13, "M_Airport Tiles (instance)"); GameObject val14 = Object.Instantiate<GameObject>(val); ((Object)val14).name = "Cube(Clone)"; val14.transform.SetParent(val2.transform); val14.transform.eulerAngles = new Vector3(0f, 90f, 90f); val14.transform.localPosition = new Vector3(-6.5728f, 3.9f, 122.9256f); val14.transform.localScale = new Vector3(6.8f, 0.1f, 15.5f); val14.transform.hasChanged = true; val14.SetActive(true); ApplyMaterialToObject(val14, "M_Airport Tiles (instance)"); ApplyMaterialToObject(val, "M_Airport Floor checker (instance)"); } } else { Logger.LogWarning((object)"Original Cube object not found - cannot instantiate clones"); } } private static Material FindMaterialByName(string materialName) { if (string.IsNullOrEmpty(materialName)) { return null; } string text = materialName.Replace(" (Instance)", string.Empty).Trim(); try { Renderer[] array = Object.FindObjectsByType<Renderer>((FindObjectsSortMode)0); Renderer[] array2 = array; foreach (Renderer val in array2) { if ((Object)(object)val == (Object)null) { continue; } Material[] materials = val.materials; foreach (Material val2 in materials) { if ((Object)(object)val2 == (Object)null) { continue; } string a = ((Object)val2).name?.Replace(" (Instance)", string.Empty).Trim(); if (!string.Equals(a, text, StringComparison.OrdinalIgnoreCase) && !(((Object)val2).name == materialName)) { string name = ((Object)val2).name; if (name == null || name.IndexOf(text, StringComparison.OrdinalIgnoreCase) < 0) { continue; } } return val2; } } Material[] array3 = Resources.FindObjectsOfTypeAll<Material>(); Material[] array4 = array3; foreach (Material val3 in array4) { if ((Object)(object)val3 == (Object)null) { continue; } string a2 = ((Object)val3).name?.Replace(" (Instance)", string.Empty).Trim(); if (!string.Equals(a2, text, StringComparison.OrdinalIgnoreCase) && !(((Object)val3).name == materialName)) { string name2 = ((Object)val3).name; if (name2 == null || name2.IndexOf(text, StringComparison.OrdinalIgnoreCase) < 0) { continue; } } return val3; } } catch { } return null; } private static void ApplyMaterialToObject(GameObject target, string materialName) { if ((Object)(object)target == (Object)null || string.IsNullOrEmpty(materialName)) { return; } try { Material val = FindMaterialByName(materialName); if ((Object)(object)val == (Object)null) { ManualLogSource logger = Logger; if (logger != null) { logger.LogWarning((object)("Material not found by name (scene/loaded): " + materialName)); } return; } MeshRenderer val2 = target.GetComponentInChildren<MeshRenderer>(true); if ((Object)(object)val2 == (Object)null) { Transform[] componentsInChildren = target.GetComponentsInChildren<Transform>(true); Transform[] array = componentsInChildren; foreach (Transform val3 in array) { val2 = ((Component)val3).GetComponent<MeshRenderer>(); if ((Object)(object)val2 != (Object)null) { break; } } } if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).material = val; return; } Renderer[] componentsInChildren2 = target.GetComponentsInChildren<Renderer>(true); Renderer[] array2 = componentsInChildren2; foreach (Renderer val4 in array2) { if (!((Object)(object)val4 == (Object)null)) { val4.material = val; } } } catch (Exception ex) { ManualLogSource logger2 = Logger; if (logger2 != null) { logger2.LogWarning((object)("Failed to apply material '" + materialName + "' to '" + ((Object)target).name + "': " + ex.Message)); } } } private void ProcessRootObjectsTurnOff() { string[] array = new string[5] { "Post Fog", "Garage Door", "Post", "Ambience Escalator", "Ambience Escalator (1)" }; GameObject[] array2 = Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0); GameObject[] array3 = array2; foreach (GameObject val in array3) { if ((Object)(object)val == (Object)null) { continue; } for (int j = 0; j < array.Length; j++) { if (((Object)val).name == array[j]) { val.SetActive(false); break; } }