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 Peak; 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.4")] [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; } } 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 muralModeModifierKey; private ConfigEntry muralModeMainKey; private ConfigEntry muralModeRequireModifier; private ConfigEntry elevatorModifierKey; private ConfigEntry elevatorMainKey; private ConfigEntry elevatorRequireModifier; private ConfigEntry 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("MuralMode", "RequireModifierKey", true, "Whether MuralMode requires a modifier key to be held down"); muralModeModifierKey = ((BaseUnityPlugin)this).Config.Bind("MuralMode", "ModifierKey", (KeyCode)308, "The modifier key for MuralMode (only used if RequireModifierKey is true)"); muralModeMainKey = ((BaseUnityPlugin)this).Config.Bind("MuralMode", "MainKey", (KeyCode)112, "The main key to trigger MuralMode"); elevatorRequireModifier = ((BaseUnityPlugin)this).Config.Bind("Elevator", "RequireModifierKey", true, "Whether Elevator requires a modifier key to be held down"); elevatorModifierKey = ((BaseUnityPlugin)this).Config.Bind("Elevator", "ModifierKey", (KeyCode)308, "The modifier key for Elevator (only used if RequireModifierKey is true)"); elevatorMainKey = ((BaseUnityPlugin)this).Config.Bind("Elevator", "MainKey", (KeyCode)101, "The main key to trigger Elevator"); basketballSpawnKey = ((BaseUnityPlugin)this).Config.Bind("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.SetActiveSafe(active: false); mirrorCamToggled = true; mirrorCamToggleTime = Time.time; string text = (muralModeRequireModifier.Value ? $"{muralModeModifierKey.Value} + {muralModeMainKey.Value}" : ((object)muralModeMainKey.Value/*cast due to .constrained prefix*/).ToString()); } 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.SetActiveSafe(active: false); } GameObject val6 = GameObject.Find("Map/BL_Airport/Main Meshes/Carpet"); if ((Object)(object)val6 != (Object)null) { val6.SetActiveSafe(active: false); } GameObject val7 = GameObject.Find("Map/BL_Airport/Main Meshes/Desk"); if ((Object)(object)val7 != (Object)null) { val7.SetActiveSafe(active: false); } GameObject val8 = GameObject.Find("Map/BL_Airport/Main Meshes/Outside grid"); if ((Object)(object)val8 != (Object)null) { val8.SetActiveSafe(active: false); } GameObject val9 = GameObject.Find("Map/BL_Airport/Main Meshes/Outside grid (1)"); if ((Object)(object)val9 != (Object)null) { val9.SetActiveSafe(active: false); } GameObject val10 = GameObject.Find("Map/BL_Airport/Main Meshes/Climbing wall blockers"); if ((Object)(object)val10 != (Object)null) { val10.SetActiveSafe(active: false); } GameObject val11 = GameObject.Find("Map/BL_Airport/Main Meshes/Cube"); if ((Object)(object)val11 != (Object)null) { val11.SetActiveSafe(active: false); } GameObject val12 = GameObject.Find("Map/BL_Airport/Main Meshes/Cube (1)"); if ((Object)(object)val12 != (Object)null) { val12.SetActiveSafe(active: 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.SetActiveSafe(active: false); } GameObject val4 = GameObject.Find("Map/BL_Airport/Elevator (3)"); if ((Object)(object)val4 != (Object)null) { val4.SetActiveSafe(active: 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[] 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.SetActiveSafe(active: 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.SetActiveSafe(active: 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.SetActiveSafe(active: false); } GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val3 in array2) { if (((Object)val3).name.ToLower().Contains("ropedynamic") && ((Object)val3).name.ToLower().Contains("clone")) { val3.SetActiveSafe(active: false); } } GameObject val4 = GameObject.Find("Map/BL_Airport/Displays"); if ((Object)(object)val4 != (Object)null) { val4.SetActiveSafe(active: false); } GameObject val5 = GameObject.Find("Map/BL_Airport/Vegetation"); if ((Object)(object)val5 != (Object)null) { val5.SetActiveSafe(active: false); } GameObject val6 = GameObject.Find("Map/BL_Airport/Lights"); if ((Object)(object)val6 != (Object)null) { val6.SetActiveSafe(active: false); } GameObject val7 = GameObject.Find("Map/BL_Airport/BakeData"); if ((Object)(object)val7 != (Object)null) { val7.SetActiveSafe(active: false); } GameObject val8 = GameObject.Find("Map/BL_Airport/GlassFence"); if ((Object)(object)val8 != (Object)null) { val8.SetActiveSafe(active: 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.SetActiveSafe(active: false); } } GameObject val10 = GameObject.Find("Map/BL_Airport/Conveyor (0)"); if ((Object)(object)val10 != (Object)null) { val10.SetActiveSafe(active: false); } GameObject val11 = GameObject.Find("Map/BL_Airport/Conveyor (1)"); if ((Object)(object)val11 != (Object)null) { val11.SetActiveSafe(active: 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.SetActiveSafe(active: 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.SetActiveSafe(active: false); } } } private void ProcessMirrorChanges() { GameObject val = GameObject.Find("Map/Mirror (1)/Details/Cube (2)"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } GameObject val2 = GameObject.Find("Map/Mirror (1)/Mirror"); if ((Object)(object)val2 != (Object)null) { MeshRenderer component = val2.GetComponent(); 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.SetActiveSafe(active: 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.SetActiveSafe(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.SetActiveSafe(active: false); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActiveSafe(active: 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.SetActiveSafe(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.SetActiveSafe(active: false); } } } private void ProcessLuggageObjects() { GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.ToLower().Contains("luggage")) { val.SetActiveSafe(active: false); } } GameObject val2 = GameObject.Find("Map/BL_Airport/Misc"); if ((Object)(object)val2 != (Object)null) { Transform[] componentsInChildren = val2.GetComponentsInChildren(); Transform[] array3 = componentsInChildren; foreach (Transform val3 in array3) { if (((Object)val3).name.ToLower().Contains("luggagewagon")) { ((Component)val3).gameObject.SetActiveSafe(active: false); } } } ProcessSpecificLuggageObjects(); } private void ProcessSpecificLuggageObjects() { GameObject val = GameObject.Find("Map/BL_Airport/LuggageEpic"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } GameObject val2 = GameObject.Find("Map/BL_Airport/LuggageSmall"); if ((Object)(object)val2 != (Object)null) { val2.SetActiveSafe(active: false); } GameObject val3 = GameObject.Find("Map/BL_Airport/LuggageSmall (2)"); if ((Object)(object)val3 != (Object)null) { val3.SetActiveSafe(active: false); } GameObject val4 = GameObject.Find("Map/BL_Airport/LuggageBig"); if ((Object)(object)val4 != (Object)null) { val4.SetActiveSafe(active: false); } GameObject val5 = GameObject.Find("Map/BL_Airport/LuggageBig (1)"); if ((Object)(object)val5 != (Object)null) { val5.SetActiveSafe(active: false); } GameObject val6 = GameObject.Find("Map/BL_Airport/LuggageBig (2)"); if ((Object)(object)val6 != (Object)null) { val6.SetActiveSafe(active: false); } } private void ProcessLightsObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Lights"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActiveSafe(active: false); } } } private void ProcessDisplaysObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Displays"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); ((Component)child).gameObject.SetActiveSafe(active: false); } } } private void ProcessBakeDataObjects() { GameObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.ToLower().Contains("bakedata")) { val.SetActiveSafe(active: false); } } } private void ProcessConveyorObjects() { GameObject val = GameObject.Find("Map/BL_Airport/Conveyor (0)"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } GameObject val2 = GameObject.Find("Map/BL_Airport/Conveyor (1)"); if ((Object)(object)val2 != (Object)null) { val2.SetActiveSafe(active: false); } } private void ProcessGlassFenceObjects() { GameObject val = GameObject.Find("Map/BL_Airport/GlassFence"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: 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.SetActiveSafe(active: false); } } GameObject[] array3 = Object.FindObjectsByType((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.SetActiveSafe(active: false); } } } private void ProcessSplitmeshObjects() { GameObject[] array = Object.FindObjectsByType((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((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.SetActiveSafe(active: false); } } } private void ProcessRopeDynamicObjects() { GameObject[] array = Object.FindObjectsByType((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.SetActiveSafe(active: 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(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(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(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(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(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(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(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(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(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(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(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(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((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[] 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(true); if ((Object)(object)val2 == (Object)null) { Transform[] componentsInChildren = target.GetComponentsInChildren(true); Transform[] array = componentsInChildren; foreach (Transform val3 in array) { val2 = ((Component)val3).GetComponent(); if ((Object)(object)val2 != (Object)null) { break; } } } if ((Object)(object)val2 != (Object)null) { ((Renderer)val2).material = val; return; } Renderer[] componentsInChildren2 = target.GetComponentsInChildren(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((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.SetActiveSafe(active: false); break; } } } } private void ProcessMirror1DetailsChildren() { GameObject val = GameObject.Find("Map/Mirror (1)/Details"); if ((Object)(object)val != (Object)null) { for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); bool active = i == 7; ((Component)child).gameObject.SetActiveSafe(active); } } else { Logger.LogWarning((object)"Mirror (1)/Details not found!"); } } private void ProcessPhotoboothRepositioning() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/Photobooth"); if ((Object)(object)val != (Object)null) { val.transform.position = new Vector3(-29.4011f, 1.66f, 97.89f); } else { Logger.LogWarning((object)"Map/Photobooth not found!"); } } private void ProcessPhotoboothCurtain() { GameObject val = GameObject.Find("Map/Photobooth/PhotoBooth 1/Curtain"); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } else { Logger.LogWarning((object)"Map/Photobooth/PhotoBooth 1/Curtain not found!"); } } private void ProcessPhotoboothFrames() { string[] array = new string[4] { "Map/Photobooth/Frame.003 (1)", "Map/Photobooth/Frame.003 (2)", "Map/Photobooth/Frame.003 (3)", "Map/Photobooth/Frame.003 (4)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } else { Logger.LogWarning((object)("Frame object not found: " + text)); } } } private void ProcessTrashRepositioning() { //IL_0057: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Misc"); if ((Object)(object)val != (Object)null) { for (int i = 0; i < val.transform.childCount; i++) { Transform child = val.transform.GetChild(i); if (((Object)child).name == "Trash 1 (3)") { child.localPosition = new Vector3(6.3242f, 0.1958f, 0.5818f); child.eulerAngles = new Vector3(270f, 90.0003f, 0f); } else if (((Object)child).name == "Trash 2 (3)") { child.localPosition = new Vector3(6.3242f, 0.1958f, 0.8818f); child.eulerAngles = new Vector3(270f, 90.0003f, 0f); } } } else { Logger.LogWarning((object)"Map/BL_Airport/Misc not found!"); } } private void ProcessCube3ScaleUpdate() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/Mirror (1)/Details/Cube (3)"); if ((Object)(object)val != (Object)null) { val.transform.localScale = new Vector3(-6.7855f, 0.2f, 0.5386f); } else { Logger.LogWarning((object)"Map/Mirror (1)/Details/Cube (3) not found!"); } } private void ProcessCourtAndCubeInstantiation() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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 = Object.Instantiate(val); ((Object)val2).name = "Cube(Clone)"; GameObject val3 = GameObject.Find("Map"); if ((Object)(object)val3 != (Object)null) { val2.transform.SetParent(val3.transform); } val2.transform.localPosition = new Vector3(-28.6591f, 0.5036f, 13.6492f); val2.transform.eulerAngles = new Vector3(0f, 90f, 180f); val2.transform.localScale = new Vector3(30f, 1f, 20f); val2.transform.hasChanged = true; ApplyMaterialToObject(val2, "M_Airport Shutter"); } else { Logger.LogWarning((object)"Map/Cube not found for instantiation!"); } GameObject val4 = GameObject.Find("Court"); if ((Object)(object)val4 != (Object)null) { val4.transform.localPosition = new Vector3(-28.4955f, 1.01f, 7.2f); val4.transform.eulerAngles = new Vector3(270f, 180f, 0f); val4.transform.hasChanged = true; } else { Logger.LogWarning((object)"Court not found for repositioning!"); } if ((Object)(object)val4 != (Object)null) { GameObject val5 = Object.Instantiate(val4); ((Object)val5).name = "Court(Clone)"; if ((Object)(object)val4.transform.parent != (Object)null) { val5.transform.SetParent(val4.transform.parent); } val5.transform.localPosition = new Vector3(-28.4955f, 1.01f, 20.3f); val5.transform.eulerAngles = new Vector3(270f, 0f, 0f); val5.transform.hasChanged = true; } } private void ProcessHoopRepositioning() { //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("Hoop"); if ((Object)(object)val != (Object)null) { val.transform.localPosition = new Vector3(-28.3345f, 5.95f, -1.151f); val.transform.eulerAngles = new Vector3(270f, 180f, 0f); val.transform.hasChanged = true; } else { Logger.LogWarning((object)"Hoop not found for repositioning!"); } } private void ProcessAdditionalCubeAndHoopInstantiation() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_018c: 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 = Object.Instantiate(val); ((Object)val2).name = "Cube(Clone)"; GameObject val3 = GameObject.Find("Map"); if ((Object)(object)val3 != (Object)null) { val2.transform.SetParent(val3.transform); } val2.transform.localPosition = new Vector3(-28.34f, -9.1982f, 28.7985f); val2.transform.eulerAngles = new Vector3(0f, 90f, 90f); val2.transform.localScale = new Vector3(34.2973f, 0.3f, 0.3f); val2.transform.hasChanged = true; val2.SetActive(true); ApplyMaterialToObject(val2, "Plane 1"); } else { Logger.LogWarning((object)"Map/Cube not found for instantiation!"); } GameObject val4 = GameObject.Find("Hoop"); if ((Object)(object)val4 != (Object)null) { GameObject val5 = Object.Instantiate(val4); ((Object)val5).name = "Hoop(Clone)"; if ((Object)(object)val4.transform.parent != (Object)null) { val5.transform.SetParent(val4.transform.parent); } val5.transform.localPosition = new Vector3(-28.3345f, 5.95f, 28.66f); val5.transform.eulerAngles = new Vector3(270f, 0f, 0f); val5.transform.hasChanged = true; val5.SetActive(true); } else { Logger.LogWarning((object)"Hoop not found for instantiation!"); } } private void ProcessChessPiecesRepositioning() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027c: 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_02b2: 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_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04da: 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_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_088e: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_093a: Unknown result type (might be due to invalid IL or missing references) //IL_094e: Unknown result type (might be due to invalid IL or missing references) //IL_0972: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09d2: Unknown result type (might be due to invalid IL or missing references) //IL_09e6: Unknown result type (might be due to invalid IL or missing references) //IL_0a0a: Unknown result type (might be due to invalid IL or missing references) //IL_0a1e: Unknown result type (might be due to invalid IL or missing references) //IL_0a32: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Unknown result type (might be due to invalid IL or missing references) //IL_0a7e: Unknown result type (might be due to invalid IL or missing references) //IL_0b4e: Unknown result type (might be due to invalid IL or missing references) //IL_0b5d: Unknown result type (might be due to invalid IL or missing references) //IL_0b6c: Unknown result type (might be due to invalid IL or missing references) try { GameObject val = GameObject.Find("Chess"); if ((Object)(object)val == (Object)null) { Logger.LogError((object)"Chess object not found in scene!"); return; } var array = new[] { new { index = 0, name = "Plane", localPos = new Vector3(0f, 0.25f, -54f), localRot = new Vector3(270f, 90f, 0f), localScale = new Vector3(3.2f, 3.2f, 3.2f) }, new { index = 1, name = "C_Bishop_f", localPos = new Vector3(-1.2f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 2, name = "C_Bishop_f (1)", localPos = new Vector3(1.2f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 3, name = "C_Rook_m", localPos = new Vector3(-2.8f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 4, name = "C_Rook_m (1)", localPos = new Vector3(2.8f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 5, name = "C_Queen", localPos = new Vector3(-0.4f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 6, name = "C_Queen (1)", localPos = new Vector3(3.22f, 0.87f, -49.46f), localRot = new Vector3(0f, 270f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 7, name = "C_King", localPos = new Vector3(0.4f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 8, name = "C_Knight", localPos = new Vector3(-2f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 9, name = "C_Knight (1)", localPos = new Vector3(2f, 0.87f, -56.8f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 10, name = "C_Pawn", localPos = new Vector3(1.2f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 11, name = "C_Pawn (1)", localPos = new Vector3(2f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 12, name = "C_Pawn (2)", localPos = new Vector3(2.8f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 13, name = "C_Pawn (3)", localPos = new Vector3(0.4f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 14, name = "C_Pawn (4)", localPos = new Vector3(-0.4f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 15, name = "C_Pawn (5)", localPos = new Vector3(-1.2f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 16, name = "C_Pawn (6)", localPos = new Vector3(-2f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 17, name = "C_Pawn (7)", localPos = new Vector3(-2.8f, 0.87f, -56f), localRot = new Vector3(0f, 0f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 18, name = "C_Bishop B", localPos = new Vector3(-1.2f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 19, name = "C_Bishop B (1)", localPos = new Vector3(1.2f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 20, name = "C_King B", localPos = new Vector3(0.4f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 21, name = "C_Knight B", localPos = new Vector3(-2f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 22, name = "C_Knight B (1)", localPos = new Vector3(2f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 23, name = "C_Rook B (1)", localPos = new Vector3(-2.8f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 24, name = "C_Rook B", localPos = new Vector3(2.8f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 25, name = "C_Queen B", localPos = new Vector3(-0.4f, 0.87f, -51.2f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 26, name = "C_Queen B (1)", localPos = new Vector3(3.22f, 0.87f, -58.32f), localRot = new Vector3(0f, 270f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 27, name = "C_Pawn B", localPos = new Vector3(-0.4f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 28, name = "C_Pawn B (1)", localPos = new Vector3(-1.2f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 29, name = "C_Pawn B (2)", localPos = new Vector3(-2f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 30, name = "C_Pawn B (3)", localPos = new Vector3(-2.8f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 31, name = "C_Pawn B (4)", localPos = new Vector3(0.4f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 32, name = "C_Pawn B (5)", localPos = new Vector3(1.2f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 33, name = "C_Pawn B (6)", localPos = new Vector3(2f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) }, new { index = 34, name = "C_Pawn B (7)", localPos = new Vector3(2.8f, 0.87f, -52f), localRot = new Vector3(0f, 180f, 0f), localScale = new Vector3(1f, 1f, 1f) } }; int childCount = val.transform.childCount; if (childCount < 35) { Logger.LogError((object)$"Expected 35 children but found {childCount}. Cannot reposition all pieces."); return; } int num = 0; var array2 = array; foreach (var anon in array2) { if (anon.index < childCount) { Transform child = val.transform.GetChild(anon.index); if (((Object)child).name != anon.name) { Logger.LogWarning((object)$"Name mismatch at index {anon.index}: expected '{anon.name}', found '{((Object)child).name}'"); } child.localPosition = anon.localPos; child.localEulerAngles = anon.localRot; child.localScale = anon.localScale; ((Component)child).gameObject.SetActive(true); child.hasChanged = true; num++; } else { Logger.LogError((object)$"Index {anon.index} out of range for {anon.name}"); } } } catch (Exception ex) { Logger.LogError((object)("Error repositioning chess pieces: " + ex.Message)); } } private void ProcessDesertRock9() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) try { GameObject val = GameObject.Find("Desert_Rock 9"); if ((Object)(object)val == (Object)null) { Logger.LogWarning((object)"Desert_Rock 9 not found!"); return; } val.transform.localPosition = new Vector3(-7.7287f, 3.8622f, 15.0475f); val.transform.localScale = new Vector3(1f, 0.8f, 1f); val.transform.hasChanged = true; GameObject val2 = Object.Instantiate(val); ((Object)val2).name = "Desert_Rock 9(Clone)"; if ((Object)(object)val.transform.parent != (Object)null) { val2.transform.SetParent(val.transform.parent); } val2.transform.localPosition = new Vector3(-7.7287f, 24.3822f, 15.0475f); val2.transform.localScale = new Vector3(1f, 0.8f, 1f); val2.transform.hasChanged = true; val2.SetActive(true); } catch (Exception ex) { Logger.LogError((object)("Error processing Desert_Rock 9: " + ex.Message)); } } private void ProcessBasketballCourtFence() { //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_00b5: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) 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(val); ((Object)val3).name = "Cube(Clone)"; val3.transform.SetParent(val2.transform); val3.transform.localPosition = new Vector3(-18.65f, -9.1982f, 6.3161f); val3.transform.eulerAngles = new Vector3(0f, 180f, 90f); val3.transform.localScale = new Vector3(40f, 0f, 15f); val3.transform.hasChanged = true; val3.SetActive(true); ApplyMaterialToObject(val3, "M_Airport Schaffold 5"); GameObject val4 = Object.Instantiate(val); ((Object)val4).name = "Cube(Clone)"; val4.transform.SetParent(val2.transform); val4.transform.localPosition = new Vector3(-18.65f, -9.1982f, 21.3f); val4.transform.eulerAngles = new Vector3(0f, 180f, 90f); val4.transform.localScale = new Vector3(40f, 0f, 15f); val4.transform.hasChanged = true; val4.SetActive(true); ApplyMaterialToObject(val4, "M_Airport Schaffold 5"); GameObject val5 = Object.Instantiate(val); ((Object)val5).name = "Cube(Clone)"; val5.transform.SetParent(val2.transform); val5.transform.localPosition = new Vector3(-31.1501f, -9.1982f, 32.4f); val5.transform.eulerAngles = new Vector3(0f, 90f, 90f); val5.transform.localScale = new Vector3(40f, 0f, 15f); val5.transform.hasChanged = true; val5.SetActive(true); ApplyMaterialToObject(val5, "M_Airport Schaffold 5"); GameObject val6 = Object.Instantiate(val); ((Object)val6).name = "Cube(Clone)"; val6.transform.SetParent(val2.transform); val6.transform.localPosition = new Vector3(-18.64f, -6.2982f, 28.7985f); val6.transform.eulerAngles = new Vector3(0f, 90f, 90f); val6.transform.localScale = new Vector3(34.2973f, 0.3f, 0.3f); val6.transform.hasChanged = true; val6.SetActive(true); ApplyMaterialToObject(val6, "Plane 1"); GameObject val7 = Object.Instantiate(val); ((Object)val7).name = "Cube(Clone)"; val7.transform.SetParent(val2.transform); val7.transform.localPosition = new Vector3(-23.64f, -6.2982f, 32.3985f); val7.transform.eulerAngles = new Vector3(0f, 90f, 90f); val7.transform.localScale = new Vector3(34.2973f, 0.3f, 0.3f); val7.transform.hasChanged = true; val7.SetActive(true); ApplyMaterialToObject(val7, "Plane 1"); } else { Logger.LogWarning((object)"Map parent not found for fence instantiation!"); } } else { Logger.LogWarning((object)"Map/Cube not found for fence instantiation!"); } } private void ProcessAdditionalCubes() { //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_00b5: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_09eb: Unknown result type (might be due to invalid IL or missing references) //IL_0a0c: Unknown result type (might be due to invalid IL or missing references) //IL_0a2d: 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(val); ((Object)val3).name = "Cube(Clone)"; val3.transform.SetParent(val2.transform); val3.transform.localPosition = new Vector3(-4.1837f, -1.4f, 51.3988f); val3.transform.eulerAngles = new Vector3(0f, 90f, 90f); val3.transform.localScale = new Vector3(4.3707f, 0.5f, 20.5874f); val3.transform.hasChanged = true; val3.SetActive(true); ApplyMaterialToObject(val3, "M_Airport Tiles"); GameObject val4 = Object.Instantiate(val); ((Object)val4).name = "Cube(Clone)"; val4.transform.SetParent(val2.transform); val4.transform.localPosition = new Vector3(1.5581f, -4.3f, 51.3988f); val4.transform.eulerAngles = new Vector3(0f, 90f, 90f); val4.transform.localScale = new Vector3(4.5707f, 0.5f, 8.9747f); val4.transform.hasChanged = true; val4.SetActive(true); ApplyMaterialToObject(val4, "M_Airport Tiles"); GameObject val5 = Object.Instantiate(val); ((Object)val5).name = "Cube(Clone)"; val5.transform.SetParent(val2.transform); val5.transform.localPosition = new Vector3(-9.8874f, -4.3f, 51.3988f); val5.transform.eulerAngles = new Vector3(0f, 90f, 90f); val5.transform.localScale = new Vector3(4.5707f, 0.5f, 8.9747f); val5.transform.hasChanged = true; val5.SetActive(true); ApplyMaterialToObject(val5, "M_Airport Tiles"); GameObject val6 = Object.Instantiate(val); ((Object)val6).name = "Cube(Clone)"; val6.transform.SetParent(val2.transform); val6.transform.localPosition = new Vector3(-21.3548f, -7.0873f, 76.3491f); val6.transform.eulerAngles = new Vector3(0f, 0f, 0f); val6.transform.localScale = new Vector3(50f, 1f, 50f); val6.transform.hasChanged = true; val6.SetActive(true); GameObject val7 = Object.Instantiate(val); ((Object)val7).name = "Cube(Clone)"; val7.transform.SetParent(val2.transform); val7.transform.localPosition = new Vector3(-4.1837f, -3.1037f, 54.733f); val7.transform.eulerAngles = new Vector3(0f, 90f, 90f); val7.transform.localScale = new Vector3(7.2525f, 0.5f, 20.5874f); val7.transform.hasChanged = true; val7.SetActive(true); ApplyMaterialToObject(val7, "M_Airport Tiles"); GameObject val8 = Object.Instantiate(val); ((Object)val8).name = "Cube(Clone)"; val8.transform.SetParent(val2.transform); val8.transform.localPosition = new Vector3(3.4981f, -3.1037f, 77.9957f); val8.transform.eulerAngles = new Vector3(0f, 180f, 90f); val8.transform.localScale = new Vector3(7.2525f, 0.5f, 46.8288f); val8.transform.hasChanged = true; val8.SetActive(true); ApplyMaterialToObject(val8, "M_Airport Tiles"); GameObject val9 = Object.Instantiate(val); ((Object)val9).name = "Cube(Clone)"; val9.transform.SetParent(val2.transform); val9.transform.localPosition = new Vector3(-46.6147f, -3.1037f, 76.3957f); val9.transform.eulerAngles = new Vector3(0f, 180f, 90f); val9.transform.localScale = new Vector3(7.2525f, 0.5f, 49.9288f); val9.transform.hasChanged = true; val9.SetActive(true); ApplyMaterialToObject(val9, "M_Airport Tiles"); GameObject val10 = Object.Instantiate(val); ((Object)val10).name = "Cube(Clone)"; val10.transform.SetParent(val2.transform); val10.transform.localPosition = new Vector3(-21.6635f, -3.1037f, 101.5433f); val10.transform.eulerAngles = new Vector3(0f, 90f, 90f); val10.transform.localScale = new Vector3(7.2525f, 0.5f, 49.9288f); val10.transform.hasChanged = true; val10.SetActive(true); ApplyMaterialToObject(val10, "M_Airport Tiles"); GameObject val11 = Object.Instantiate(val); ((Object)val11).name = "Cube(Clone)"; val11.transform.SetParent(val2.transform); val11.transform.localPosition = new Vector3(-30.3968f, -3.1037f, 51.3988f); val11.transform.eulerAngles = new Vector3(0f, 90f, 90f); val11.transform.localScale = new Vector3(7.2525f, 0.5f, 32.0837f); val11.transform.hasChanged = true; val11.SetActive(true); ApplyMaterialToObject(val11, "M_Airport Tiles"); GameObject val12 = Object.Instantiate(val); ((Object)val12).name = "Cube(Clone)"; val12.transform.SetParent(val2.transform); val12.transform.localPosition = new Vector3(-21.3548f, -0.4873f, 76.3491f); val12.transform.eulerAngles = new Vector3(0f, 0f, 0f); val12.transform.localScale = new Vector3(50f, 1f, 50f); val12.transform.hasChanged = true; val12.SetActive(true); GameObject val13 = Object.Instantiate(val); ((Object)val13).name = "Cube(Clone)"; val13.transform.SetParent(val2.transform); val13.transform.localPosition = new Vector3(8.1525f, 3.8382f, 48.889f); val13.transform.eulerAngles = new Vector3(0f, 315.6107f, 90f); val13.transform.localScale = new Vector3(22.8072f, 1f, 6.9146f); val13.transform.hasChanged = true; val13.SetActive(true); ApplyMaterialToObject(val13, "M_Airport Tiles"); GameObject val14 = Object.Instantiate(val); ((Object)val14).name = "Cube(Clone)"; val14.transform.SetParent(val2.transform); val14.transform.localPosition = new Vector3(7.2525f, 7.1382f, 51.389f); val14.transform.eulerAngles = new Vector3(0f, 0f, 90f); val14.transform.localScale = new Vector3(16.1762f, 1f, 6.05f); val14.transform.hasChanged = true; val14.SetActive(true); ApplyMaterialToObject(val14, "M_Airport Tiles"); GameObject val15 = Object.Instantiate(val); ((Object)val15).name = "Cube(Clone)"; val15.transform.SetParent(val2.transform); val15.transform.localPosition = new Vector3(5.6961f, -1.4836f, 51.989f); val15.transform.eulerAngles = new Vector3(0f, 0f, 0f); val15.transform.localScale = new Vector3(4.1471f, 1f, 6.05f); val15.transform.hasChanged = true; val15.SetActive(true); ApplyMaterialToObject(val15, "M_Airport Tiles"); GameObject val16 = Object.Instantiate(val); ((Object)val16).name = "Cube(Clone)"; val16.transform.SetParent(val2.transform); val16.transform.localPosition = new Vector3(8.1144f, -3.1037f, 54.733f); val16.transform.eulerAngles = new Vector3(0f, 90f, 90f); val16.transform.localScale = new Vector3(7.2525f, 0.5f, 4.091f); val16.transform.hasChanged = true; val16.SetActive(true); ApplyMaterialToObject(val16, "M_Airport Tiles"); GameObject val17 = Object.Instantiate(val); ((Object)val17).name = "Cube(Clone)"; val17.transform.SetParent(val2.transform); val17.transform.localPosition = new Vector3(11.0144f, -1.0037f, 54.6f); val17.transform.eulerAngles = new Vector3(0f, 85f, 90f); val17.transform.localScale = new Vector3(4.46f, 0.2f, 7f); val17.transform.hasChanged = true; val17.SetActive(true); ApplyMaterialToObject(val17, "M_Airport Tiles"); } else { Logger.LogWarning((object)"Map parent not found for additional cubes instantiation!"); } } else { Logger.LogWarning((object)"Map/Cube not found for additional cubes instantiation!"); } } public void OnEvent(EventData photonEvent) { } private void ApplyBasketballModifications(GameObject basketball) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //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) try { basketball.transform.position = new Vector3(-37.6f, 1.7f, 31.25f); basketball.transform.eulerAngles = new Vector3(0f, 270f, 8f); basketball.transform.localScale = new Vector3(0f, 1f, 1f); Rigidbody component = basketball.GetComponent(); if ((Object)(object)component != (Object)null) { component.isKinematic = true; Logger.LogInfo((object)("Set Rigidbody to kinematic for " + ((Object)basketball).name)); } Collider component2 = basketball.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); Logger.LogInfo((object)("Removed Collider component from " + ((Object)basketball).name)); } Logger.LogInfo((object)("Applied basketball modifications to " + ((Object)basketball).name)); } catch (Exception ex) { Logger.LogError((object)("Error applying basketball modifications: " + ex.Message)); } } private void ApplyBounceShroomModifications(GameObject bounceShroom) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) try { bounceShroom.transform.localScale = new Vector3(3f, 3f, 3f); Transform val = bounceShroom.transform.Find("Bounce"); if ((Object)(object)val != (Object)null) { CollisionModifier component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.knockback = 14000f; Logger.LogInfo((object)$"Applied bounce modifications to {((Object)val).name} - knockback: {component.knockback}"); } else { Logger.LogWarning((object)("CollisionModifier component not found on " + ((Object)val).name)); } } else { Logger.LogWarning((object)"'Bounce' child object not found under BounceShroomSpawn(Clone)"); } } catch (Exception ex) { Logger.LogError((object)("Error applying bounce shroom modifications: " + ex.Message)); } } private void SpawnBounceShroom() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) try { if (!PhotonNetwork.IsMasterClient) { Logger.LogInfo((object)"Not master client, skipping bounce shroom spawning"); return; } if (!PhotonNetwork.IsConnected) { Logger.LogWarning((object)"PhotonNetwork not connected, cannot spawn bounce shroom"); return; } string text = "0_Items/BounceShroomSpawn"; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(-2.1732f, 0.8f, 4.8533f); Quaternion identity = Quaternion.identity; GameObject val2 = PhotonNetwork.Instantiate(text, val, identity, (byte)0, (object[])null); if ((Object)(object)val2 != (Object)null) { ((Object)val2).name = "BounceShroomSpawn(Clone)"; val2.transform.localScale = new Vector3(3f, 3f, 3f); Logger.LogInfo((object)$"Spawned BounceShroomSpawn(Clone) at position {val2.transform.position} with scale {val2.transform.localScale}"); ApplyBounceShroomModifications(val2); } else { Logger.LogWarning((object)("PhotonNetwork.Instantiate returned null for prefab " + text)); } } catch (Exception ex) { Logger.LogError((object)("Error spawning bounce shroom: " + ex.Message)); } } private void ProcessElevatorSystem() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Map/BL_Airport/Elevator (1)"); if ((Object)(object)val == (Object)null) { Logger.LogWarning((object)"Elevator not found! Cannot initialize elevator system."); return; } GameObject val2 = GameObject.Find("GAME/GUIManager/Canvas_Letterbox"); if (!((Object)(object)val2 != (Object)null)) { return; } Component component = val2.GetComponent("CanvasScaler"); if ((Object)(object)component != (Object)null) { PropertyInfo property = ((object)component).GetType().GetProperty("referenceResolution"); if (property != null) { originalCanvasResolution = (Vector2)property.GetValue(component, null); } } } private void HandleElevatorInput() { if (!PhotonNetwork.InRoom || isElevatorMoving) { return; } if (IsPlayerNearElevator()) { if (CheckElevatorKeyCombination()) { showElevatorMenu = !showElevatorMenu; if (showElevatorMenu) { Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; } else { Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } } } else if (showElevatorMenu) { showElevatorMenu = false; Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } } private bool IsPlayerNearElevator() { //IL_0064: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_0079: Unknown result type (might be due to invalid IL or missing references) Character val = null; if (Character.AllCharacters != null && Character.AllCharacters.Count > 0) { val = ((IEnumerable)Character.AllCharacters).FirstOrDefault((Func)((Character c) => (Object)(object)c.refs?.view != (Object)null && c.refs.view.OwnerActorNr == PhotonNetwork.LocalPlayer.ActorNumber)); } if ((Object)(object)val == (Object)null) { return false; } Vector3 groundPos = val.data.groundPos; float num = Vector3.Distance(groundPos, elevatorTriggerPosition); float num2 = Vector3.Distance(groundPos, playerTeleportPosition); if (num2 < num) { isOnGroundFloor = true; return num2 <= elevatorTriggerRadius; } isOnGroundFloor = false; return num <= elevatorTriggerRadius; } private void OnGUI() { if (showElevatorMenu) { DrawElevatorMenu(); } } private void DrawElevatorMenu() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) elevatorMenuRect = new Rect(50f, 50f, 300f, 200f); if (typeof(GUI) != null) { elevatorMenuRect = GUI.Window(1, elevatorMenuRect, new WindowFunction(DrawElevatorMenuWindow), "Elevator Control"); } HandleElevatorMenuInput(); } private void HandleElevatorMenuInput() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Cursor.lockState = (CursorLockMode)0; Cursor.visible = true; if (Input.GetMouseButtonDown(0)) { Vector2 val = Vector2.op_Implicit(Input.mousePosition); val.y = (float)Screen.height - val.y; if (!((Rect)(ref elevatorMenuRect)).Contains(val)) { } } } private void DrawElevatorMenuWindow(int windowID) { //IL_0071: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); string text = (isOnGroundFloor ? "Ground Floor" : "Floor 1"); string text2 = (elevatorRequireModifier.Value ? $"{elevatorModifierKey.Value} + {elevatorMainKey.Value}" : ((object)elevatorMainKey.Value/*cast due to .constrained prefix*/).ToString()); GUILayout.Label("Elevator Control - " + text + "\nPress " + text2 + " to toggle", GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Space(10f); if (isOnGroundFloor) { if (GUILayout.Button("\ud83c\udfe2 Floor 1", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) })) { ((MonoBehaviour)this).StartCoroutine(MoveElevatorToFloor1()); showElevatorMenu = false; Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } } else if (GUILayout.Button("\ud83c\udfe2 Ground Level", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) })) { ((MonoBehaviour)this).StartCoroutine(MoveElevatorToGroundLevel()); showElevatorMenu = false; Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } GUILayout.Space(10f); if (GUILayout.Button("❌ Close", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { showElevatorMenu = false; Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; } GUILayout.EndVertical(); GUI.DragWindow(); } private IEnumerator MoveElevatorToGroundLevel() { if (isElevatorMoving) { yield break; } isElevatorMoving = true; GameObject elevator = GameObject.Find("Map/BL_Airport/Elevator (1)"); if ((Object)(object)elevator == (Object)null) { Logger.LogWarning((object)"Elevator: Elevator not found!"); isElevatorMoving = false; yield break; } Animator elevatorAnimator = elevator.GetComponent(); if ((Object)(object)elevatorAnimator == (Object)null) { Logger.LogWarning((object)"Elevator: Animator component not found!"); isElevatorMoving = false; yield break; } try { MethodInfo method = typeof(Animator).GetMethod("ClearInternalControllerPlayable", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(elevatorAnimator, null); } else { ((Behaviour)elevatorAnimator).enabled = true; elevatorAnimator.Rebind(); elevatorAnimator.Update(0f); } } catch (Exception ex) { Exception ex2 = ex; Logger.LogWarning((object)("Elevator: Could not call ClearInternalControllerPlayable: " + ex2.Message)); ((Behaviour)elevatorAnimator).enabled = true; elevatorAnimator.Rebind(); elevatorAnimator.Update(0f); } yield return (object)new WaitForSeconds(2f); yield return ((MonoBehaviour)this).StartCoroutine(SmoothBlackoutScreen()); elevator.transform.localPosition = elevatorGroundLevelPosition; yield return (object)new WaitForSeconds(0.1f); TeleportPlayerToPosition(playerTeleportPosition); yield return ((MonoBehaviour)this).StartCoroutine(SmoothRestoreScreen()); isElevatorMoving = false; } private IEnumerator MoveElevatorToFloor1() { if (isElevatorMoving) { yield break; } isElevatorMoving = true; GameObject elevator = GameObject.Find("Map/BL_Airport/Elevator (1)"); if ((Object)(object)elevator == (Object)null) { Logger.LogWarning((object)"Elevator: Elevator not found!"); isElevatorMoving = false; yield break; } Animator elevatorAnimator = elevator.GetComponent(); if ((Object)(object)elevatorAnimator == (Object)null) { Logger.LogWarning((object)"Elevator: Animator component not found!"); isElevatorMoving = false; yield break; } try { MethodInfo method = typeof(Animator).GetMethod("ClearInternalControllerPlayable", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(elevatorAnimator, null); } else { ((Behaviour)elevatorAnimator).enabled = true; elevatorAnimator.Rebind(); elevatorAnimator.Update(0f); } } catch (Exception ex) { Exception ex2 = ex; Logger.LogWarning((object)("Elevator: Could not call ClearInternalControllerPlayable: " + ex2.Message)); ((Behaviour)elevatorAnimator).enabled = true; elevatorAnimator.Rebind(); elevatorAnimator.Update(0f); } yield return (object)new WaitForSeconds(2f); yield return ((MonoBehaviour)this).StartCoroutine(SmoothBlackoutScreen()); elevator.transform.localPosition = elevatorOriginalPosition; yield return (object)new WaitForSeconds(0.1f); TeleportPlayerToPosition(playerOriginalPosition); yield return ((MonoBehaviour)this).StartCoroutine(SmoothRestoreScreen()); isElevatorMoving = false; } private IEnumerator SmoothBlackoutScreen() { GameObject canvasLetterbox = GameObject.Find("GAME/GUIManager/Canvas_Letterbox"); if (!((Object)(object)canvasLetterbox != (Object)null)) { yield break; } canvasLetterbox.SetActive(true); Component canvasScaler = canvasLetterbox.GetComponent("CanvasScaler"); if (!((Object)(object)canvasScaler != (Object)null)) { yield break; } PropertyInfo prop = ((object)canvasScaler).GetType().GetProperty("referenceResolution"); if (prop != null) { Vector2 startRes = originalCanvasResolution; Vector2 targetRes = Vector2.zero; float duration = 1f; float elapsed = 0f; while (elapsed < duration) { elapsed += Time.deltaTime; float progress = elapsed / duration; Vector2 currentRes = Vector2.Lerp(startRes, targetRes, progress); prop.SetValue(canvasScaler, currentRes, null); yield return null; } prop.SetValue(canvasScaler, Vector2.zero, null); } } private IEnumerator SmoothRestoreScreen() { GameObject canvasLetterbox = GameObject.Find("GAME/GUIManager/Canvas_Letterbox"); if (!((Object)(object)canvasLetterbox != (Object)null)) { yield break; } Component canvasScaler = canvasLetterbox.GetComponent("CanvasScaler"); if ((Object)(object)canvasScaler != (Object)null) { PropertyInfo prop = ((object)canvasScaler).GetType().GetProperty("referenceResolution"); if (prop != null) { Vector2 startRes = Vector2.zero; Vector2 targetRes = originalCanvasResolution; float duration = 1f; float elapsed = 0f; while (elapsed < duration) { elapsed += Time.deltaTime; float progress = elapsed / duration; Vector2 currentRes = Vector2.Lerp(startRes, targetRes, progress); prop.SetValue(canvasScaler, currentRes, null); yield return null; } prop.SetValue(canvasScaler, originalCanvasResolution, null); } } yield return (object)new WaitForSeconds(0.5f); canvasLetterbox.SetActiveSafe(active: false); } private void ProcessBasketballObjectsTurnOff() { string[] array = new string[4] { "Basketball", "Basketball (1)", "Basketball (2)", "Basketball (3)" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } else { Logger.LogWarning((object)(text + " not found to turn off!")); } } } private void CheckBasketballSpawn() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (!Input.GetKeyDown(basketballSpawnKey.Value) || basketballSpawnCount >= 2) { return; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null) { return; } Vector3 groundPos = localCharacter.data.groundPos; if (!(groundPos == Vector3.zero)) { float num = Vector3.Distance(groundPos, basketballSpawnPosition); if (num <= basketballSpawnRadius) { SpawnBasketball(); } } } private void SpawnBasketball() { Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null) { Logger.LogWarning((object)"Cannot spawn basketball - local player not found!"); return; } try { string prefabNameFromItemId = GetPrefabNameFromItemId(48); if (string.IsNullOrEmpty(prefabNameFromItemId)) { Logger.LogError((object)"Could not find prefab name for basketball (itemID 48)"); return; } localCharacter.refs.items.photonView.RPC("RPC_SpawnItemInHandMaster", (RpcTarget)2, new object[1] { prefabNameFromItemId }); basketballSpawnCount++; } catch (Exception ex) { Logger.LogError((object)("Failed to spawn basketball: " + ex.Message)); } } private string GetPrefabNameFromItemId(ushort itemId) { try { Item val = default(Item); if (ItemDatabase.TryGetItem(itemId, ref val)) { return ((Object)val).name; } List objects = ((DatabaseAsset)(object)SingletonAsset.Instance).Objects; foreach (Item item in objects) { if (item.itemID == itemId) { return ((Object)item).name; } } Logger.LogWarning((object)$"Item with ID {itemId} not found in database"); return null; } catch (Exception ex) { Logger.LogError((object)$"Error looking up item by ID {itemId}: {ex.Message}"); return null; } } private void CreateStaticBasketball() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) if (!PhotonNetwork.IsMasterClient) { Logger.LogInfo((object)"Not master client, skipping static basketball spawning"); return; } GameObject val = GameObject.Find("Basketball"); if ((Object)(object)val == (Object)null) { Logger.LogWarning((object)"Original Basketball object not found! Cannot create static basketball."); return; } GameObject val2 = Object.Instantiate(val); if ((Object)(object)val2 != (Object)null) { val2.transform.position = new Vector3(-37.6f, 1.7f, 31.25f); val2.transform.eulerAngles = new Vector3(0f, 270f, 8f); val2.transform.localScale = new Vector3(0f, 1f, 1f); Rigidbody component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { component.isKinematic = true; } val2.DestroyItemSafely(); ((Object)val2).name = "Basketball(Clone)"; } else { Logger.LogError((object)"Failed to instantiate basketball clone!"); } } private void ProcessPropObjectsRepositioning() { string[] array = new string[8] { "Binoculars_Prop", "GAME/Binoculars_Prop", "Lollipop_Prop", "GAME/Lollipop_Prop", "Bugle_Prop Variant", "GAME/Bugle_Prop Variant", "BingBong_Prop Variant", "SpecialDay Airport/BingBong_Prop Variant" }; string[] array2 = array; foreach (string text in array2) { GameObject val = GameObject.Find(text); if ((Object)(object)val != (Object)null) { val.SetActiveSafe(active: false); } } ((MonoBehaviour)this).StartCoroutine(SpawnPropsSequentially()); } private IEnumerator SpawnPropsSequentially() { yield return (object)new WaitForSeconds(5f); if (!isAirportScene) { yield break; } if (PhotonNetwork.IsMasterClient) { SpawnBounceShroom(); } else { ((MonoBehaviour)this).StartCoroutine(ClientFindAndModifyBounceShroom()); } while (!PhotonNetwork.IsConnected) { if (!isAirportScene) { yield break; } yield return (object)new WaitForSeconds(0.5f); } GameObject trash1_1 = GameObject.Find("Map/BL_Airport/Misc/Trash 1 (1)"); if ((Object)(object)trash1_1 == (Object)null) { Logger.LogWarning((object)"Trash 1 (1) not found! Cannot spawn prop items around it."); yield break; } Vector3 trashPosition = trash1_1.transform.position; Vector3 spawnPosition = trashPosition + new Vector3(0f, 1f, 0f); GameObject basketball = SpawnPropItem("0_Items/Basketball", spawnPosition); if ((Object)(object)basketball != (Object)null) { ConfigureSpawnedBasketball(basketball); } yield return (object)new WaitForSeconds(1f); SpawnPropItem("0_Items/Bugle_Prop Variant", spawnPosition); yield return (object)new WaitForSeconds(1f); SpawnPropItem("0_Items/BingBong_Prop Variant", spawnPosition); yield return (object)new WaitForSeconds(1f); SpawnPropItem("0_Items/Lollipop_Prop", spawnPosition); yield return (object)new WaitForSeconds(1f); SpawnPropItem("0_Items/Binoculars_Prop", spawnPosition); ((MonoBehaviour)this).StartCoroutine(AirplaneFlightSequence()); } private IEnumerator ClientFindAndModifyBounceShroom() { yield return (object)new WaitForSeconds(6f); GameObject bounceShroom = GameObject.Find("BounceShroomSpawn(Clone)"); if ((Object)(object)bounceShroom != (Object)null) { Logger.LogInfo((object)"Client: Found BounceShroomSpawn(Clone), applying modifications"); ApplyBounceShroomModifications(bounceShroom); } else { Logger.LogWarning((object)"Client: BounceShroomSpawn(Clone) not found for modifications"); } } private void ProcessAirplaneRepositioning() { //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/Plane (2)"); if ((Object)(object)val != (Object)null) { val.transform.position = new Vector3(93.9193f, -2.9142f, 223.7701f); val.transform.eulerAngles = new Vector3(270.0396f, 89.9345f, 0f); } else { Logger.LogWarning((object)"Airplane (Map/BL_Airport/Plane (2)) not found!"); } } private IEnumerator AirplaneFlightSequence() { GameObject airplane = GameObject.Find("Map/BL_Airport/Plane (2)"); if ((Object)(object)airplane == (Object)null) { Logger.LogWarning((object)"Airplane not found! Cannot start flight sequence."); yield break; } FlightWaypoint[] waypoints = 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) }; while (isAirportScene) { for (int i = 0; i < waypoints.Length - 1; i++) { if (!isAirportScene) { yield break; } yield return ((MonoBehaviour)this).StartCoroutine(MoveAirplaneAlongSplineSegment(airplane, waypoints, i)); } if (!isAirportScene) { yield break; } yield return (object)new WaitForSeconds(5f); } if (isAirportScene) { } } private IEnumerator MoveAirplaneAlongSplineSegment(GameObject airplane, FlightWaypoint[] waypoints, int segmentStartIndex) { if (!isAirportScene) { yield break; } if ((Object)(object)airplane == (Object)null) { Logger.LogWarning((object)"Airplane GameObject is null, stopping coroutine"); yield break; } int i0 = Mathf.Max(segmentStartIndex - 1, 0); int i2 = segmentStartIndex + 1; int i3 = Mathf.Min(segmentStartIndex + 2, waypoints.Length - 1); Vector3 p0 = waypoints[i0].position; Vector3 p1 = waypoints[segmentStartIndex].position; Vector3 p2 = waypoints[i2].position; Vector3 p3 = waypoints[i3].position; float duration = waypoints[i2].duration; float elapsedTime = 0f; Vector3 val; while (elapsedTime < duration) { if (!isAirportScene) { yield break; } if ((Object)(object)airplane == (Object)null) { Logger.LogWarning((object)"Airplane GameObject became null during coroutine, stopping"); yield break; } elapsedTime += Time.deltaTime; float t = Mathf.Clamp01(elapsedTime / duration); Vector3 pos = CatmullRom(p0, p1, p2, p3, t); Vector3 dir = CatmullRomTangent(p0, p1, p2, p3, t); float straightY = Mathf.Lerp(p1.y, p2.y, t); if (pos.y < straightY) { pos.y = straightY; } if (((Vector3)(ref dir)).sqrMagnitude > 0.0001f) { val = new Vector3(dir.x, 0f, dir.z); Vector3 flatDir = ((Vector3)(ref val)).normalized; if (((Vector3)(ref flatDir)).sqrMagnitude > 0.0001f) { Quaternion look = Quaternion.LookRotation(flatDir, Vector3.up); Vector3 euler = ((Quaternion)(ref look)).eulerAngles; euler.y = (euler.y - 90f + 360f) % 360f; euler.x = 270f; euler.z = 0f; airplane.transform.eulerAngles = euler; } } airplane.transform.position = pos; yield return null; } airplane.transform.position = waypoints[i2].position; Vector3 nextDir = ((i2 >= waypoints.Length - 1) ? (waypoints[1].position - waypoints[0].position) : (waypoints[i2 + 1].position - waypoints[i2].position)); val = new Vector3(nextDir.x, 0f, nextDir.z); Vector3 flatEndDir = ((Vector3)(ref val)).normalized; if (((Vector3)(ref flatEndDir)).sqrMagnitude > 0.0001f) { Quaternion lookEnd = Quaternion.LookRotation(flatEndDir, Vector3.up); Vector3 eulerEnd = ((Quaternion)(ref lookEnd)).eulerAngles; eulerEnd.y = (eulerEnd.y - 90f + 360f) % 360f; eulerEnd.x = 270f; eulerEnd.z = 0f; airplane.transform.eulerAngles = eulerEnd; } } private Vector3 CatmullRom(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_002f: 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) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0092: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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) float num = t * t; float num2 = num * t; return 0.5f * (2f * p1 + (-p0 + p2) * t + (2f * p0 - 5f * p1 + 4f * p2 - p3) * num + (-p0 + 3f * p1 - 3f * p2 + p3) * num2); } private Vector3 CatmullRomTangent(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) float num = t * t; return 0.5f * (-p0 + p2 + 2f * (2f * p0 - 5f * p1 + 4f * p2 - p3) * t + 3f * (-p0 + 3f * p1 - 3f * p2 + p3) * num); } private void ConfigureSpawnedBasketball(GameObject basketball) { //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) if ((Object)(object)basketball == (Object)null) { Logger.LogWarning((object)"Cannot configure null basketball object."); return; } basketball.transform.position = new Vector3(-37.6f, 1.7f, 31.25f); basketball.transform.eulerAngles = new Vector3(0f, 270f, 8f); basketball.transform.localScale = new Vector3(0f, 1f, 1f); Rigidbody component = basketball.GetComponent(); if ((Object)(object)component != (Object)null) { component.isKinematic = true; } basketball.DestroyItemSafely(); ((Object)basketball).name = "Basketball(Static)"; } private GameObject SpawnPropItem(string prefabPath, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) try { if (!PhotonNetwork.IsConnected) { Logger.LogWarning((object)"PhotonNetwork not connected, cannot spawn prop item"); return null; } GameObject val = PhotonNetwork.Instantiate(prefabPath, position, Random.rotation, (byte)0, (object[])null); if ((Object)(object)val != (Object)null) { return val; } Logger.LogWarning((object)("PhotonNetwork.Instantiate returned null for prefab " + prefabPath)); return null; } catch (Exception ex) { Logger.LogError((object)("Error spawning prop item with prefab " + prefabPath + ": " + ex.Message)); Logger.LogError((object)("Stack trace: " + ex.StackTrace)); return null; } } } internal static class AirportRemixedGameObjectUtility { public static void SetActiveSafe(this GameObject gameObject, bool active) { if (!((Object)(object)gameObject == (Object)null)) { if (!active) { DeregisterItemIfPresent(gameObject); } gameObject.SetActive(active); } } public static void DestroyItemSafely(this GameObject gameObject) { if (!((Object)(object)gameObject == (Object)null)) { DeregisterItemIfPresent(gameObject); ItemOptimizer component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } Item component2 = gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } } } private static void DeregisterItemIfPresent(GameObject gameObject) { Item component = gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { ItemOptimizationManager.DeregisterItem(component); } } } public static class PluginInfo { public const string PLUGIN_GUID = "tony4twentys.Airport_Remixed"; public const string PLUGIN_NAME = "Airport Remixed"; public const string PLUGIN_VERSION = "2.2.4"; }