using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("DilapidatedManor")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DilapidatedManor")] [assembly: AssemblyTitle("DilapidatedManor")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace DilapidatedManor.Features { internal class AnimationManager : MonoBehaviour { public Animator animator; public string animationString; public void Changebool(bool b) { animator.SetBool(animationString, b); } } internal class DisablePower : NetworkBehaviour { private RoundManager roundManager; private void Start() { roundManager = Object.FindObjectOfType(); } public void DisableFacilityPower() { ((MonoBehaviour)this).StartCoroutine(KillPower()); } private IEnumerator KillPower() { roundManager.FlickerLights(false, false); yield return (object)new WaitForSeconds(3f); roundManager.FlickerLights(false, false); yield return (object)new WaitForSeconds(5f); roundManager.FlickerLights(false, false); yield return (object)new WaitForSeconds(2.5f); roundManager.SwitchPower(false); roundManager.powerOffPermanently = true; yield return (object)new WaitForSeconds(0.75f); HUDManager.Instance.RadiationWarningHUD(); } } public class Exterminator : NetworkBehaviour { [SerializeField] private Animator AttackManager; [SerializeField] private Animator DoorManager; [SerializeField] private Animator MainManager; [SerializeField] private MeshRenderer ExterminatorEye1; [SerializeField] private MeshRenderer ExterminatorEye2; [SerializeField] private List EyeOpenTextures; [SerializeField] private List EyeBlink; [SerializeField] private List EyeFinal; [SerializeField] private Texture2D EyeOpen; [SerializeField] private Texture2D EyePoint; [SerializeField] private AudioSource EyesAudio; [SerializeField] private AudioClip AwakeClip; [SerializeField] private List BlinkSounds; [SerializeField] private List AttackSounds; [SerializeField] private List AttackAudiosources; [SerializeField] private List Spawners; public UnityEvent MoveAttackLeftEvent; public UnityEvent MoveAttackRightEvent; public UnityEvent StayAttackEvent; public UnityEvent Type1Event; public UnityEvent Type2Event; public UnityEvent Type3Event; public UnityEvent Type4Event; public UnityEvent Type5Event; public UnityEvent AttackEvent; private int CurrentPosition = 1; private int ThumpersSpawned = 0; private int ThumpersKilled = 0; private int AttackType = 0; private int AttackNum = 0; private int AttackCounter = 0; private string AttackTrigger = ""; private int PreviousAttack; private float AttackDelay = 0f; private bool PrimingAttack = false; private int FinalSequence = 0; private bool SpawnSwitch = false; private void Update() { if (((NetworkBehaviour)this).IsSpawned && PrimingAttack) { if (AttackDelay > 0f) { AttackDelay -= Time.deltaTime; return; } AttackCounter++; ExecuteAttack(); PrimingAttack = false; } } private void AttemptThumperSpawn() { if (ThumpersKilled < 4) { if (ThumpersKilled == ThumpersSpawned) { if (SpawnSwitch) { SpawnSwitch = false; return; } SpawnSwitch = true; Spawners[ThumpersKilled].SetActive(true); ThumpersSpawned++; } } else { FinalSequence = 2; } } public void HostAttackPicker() { if (((NetworkBehaviour)this).IsServer) { PreviousAttack = AttackType; int num = AttackType; while (PreviousAttack == num) { num = Random.Range(0, 4); } AttackType = num; if (FinalSequence > 0) { AttackType = 4; } TriggerAttackClientRpc(AttackType); } AttackDelay = 1.5f; PrimingAttack = true; } public void ExecuteAttack() { int num = 0; switch (CurrentPosition) { case 0: num = 0; break; case 1: num = 4; break; case 2: num = 8; break; } num += AttackType; AttackNum = num; if (AttackType == 4) { AttackNum = 12; } AttackTrigger = "Attack" + AttackNum; ExecuteClientRpc(AttackType, AttackTrigger, FinalSequence); } public void ExecuteClientRpc(int attackType, string attackTrigger, int finalSequence) { AttackManager.SetTrigger(attackTrigger); EyesAudio.PlayOneShot(AttackSounds[attackType]); AttackAudiosources[attackType].Play(); if (finalSequence == 2) { DoorManager.SetTrigger("OpenCage1"); } } public void HostNextAttack() { bool flag = false; bool flag2 = false; float value = Random.value; if (AttackCounter > 12) { FinalSequence = 1; } if (FinalSequence > 0) { CurrentPosition = 1; MainManager.SetBool("FinalAttack", true); HostAttackPicker(); return; } if (((NetworkBehaviour)this).IsServer) { if (value > 0.5f) { if (CurrentPosition < 2) { flag2 = true; flag = true; } } else if (CurrentPosition > 0) { flag = true; } if (!flag) { TriggerMoveClientRpc(0); } else if (flag2) { TriggerMoveClientRpc(1); } else { TriggerMoveClientRpc(2); } } HostAttackPicker(); } public void TriggerMoveClientRpc(int moveType) { switch (moveType) { case 0: StayAttackEvent.Invoke(); break; case 1: MoveAttackLeftEvent.Invoke(); break; case 2: MoveAttackRightEvent.Invoke(); break; } } public void TriggerAttackClientRpc(int attacktype) { switch (attacktype) { case 0: Type1Event.Invoke(); break; case 1: Type2Event.Invoke(); break; case 2: Type3Event.Invoke(); break; case 3: Type4Event.Invoke(); break; case 4: Type5Event.Invoke(); break; } } public void IncreaseThumperCount() { ThumpersKilled++; } public void EyesBlinkSequence() { int index = Random.Range(0, BlinkSounds.Count - 1); ((MonoBehaviour)this).StartCoroutine(EyeSequenceCoroutine(EyeBlink, Open: true, BlinkSounds[index])); } public void EyesFinalSequence() { int index = Random.Range(0, BlinkSounds.Count - 1); ((MonoBehaviour)this).StartCoroutine(EyeSequenceCoroutine(EyeFinal, Open: false, BlinkSounds[index])); } public void EyesOpenSequence() { ((MonoBehaviour)this).StartCoroutine(EyeSequenceCoroutine(EyeOpenTextures, Open: true, AwakeClip)); } public void EyesPoint() { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); } public void EyesOpen() { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); } private IEnumerator EyeSequenceCoroutine(List? Eyes, bool Open, AudioClip? Clip) { if ((Object)(object)Clip != (Object)null) { EyesAudio.PlayOneShot(Clip, 1f); } if (Eyes != null) { foreach (Texture2D texture in Eyes) { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)texture); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)texture); yield return (object)new WaitForSeconds(0.2f); } if (Eyes == EyeBlink) { AttemptThumperSpawn(); } } if (Open) { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyeOpen); } else { ((Renderer)ExterminatorEye1).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); ((Renderer)ExterminatorEye2).materials[1].SetTexture("_BaseColorMap", (Texture)(object)EyePoint); } yield return 0; } public void SetPosition1() { CurrentPosition++; } public void SetPosition2() { CurrentPosition--; } public void SetType0() { AttackType = 0; } public void SetType1() { AttackType = 1; } public void SetType2() { AttackType = 2; } public void SetType3() { AttackType = 3; } public void SetType4() { AttackType = 4; } } internal class GrandArmoryElevator : MonoBehaviour { public List ElevatorFloors = new List(); public List FloorObjects = new List(); public Animator ElevatorAnimator; public int CurrentFloor = 0; public int ButtonFloor = 0; public float Duration = 3.5f; public AnimationCurve ElevatorCurve; public Transform Elevator; public BoxCollider UpTrigger; public BoxCollider DownTrigger; public BoxCollider BottomTrigger; private Vector3 ElevatorHeight; private bool IsElevatorMoving; private void Start() { SetEnabledTriggers(); } public void MoveFloorUp() { //IL_0065: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if (!IsElevatorMoving && CurrentFloor < ElevatorFloors.Count - 1) { ((Collider)DownTrigger).enabled = false; ((Collider)UpTrigger).enabled = false; ((Collider)BottomTrigger).enabled = false; Vector3 position = ElevatorFloors[CurrentFloor].position; CurrentFloor++; IsElevatorMoving = true; Vector3 position2 = ElevatorFloors[CurrentFloor].position; ElevatorAnimator.SetTrigger("ElevatorMoveUp"); ((MonoBehaviour)this).StartCoroutine(MoveCoroutine(position, position2, Duration)); } } public void MoveFloorDown() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (!IsElevatorMoving && CurrentFloor > 0) { ((Collider)DownTrigger).enabled = false; ((Collider)UpTrigger).enabled = false; ((Collider)BottomTrigger).enabled = false; Vector3 position = ElevatorFloors[CurrentFloor].position; CurrentFloor--; IsElevatorMoving = true; Vector3 position2 = ElevatorFloors[CurrentFloor].position; ElevatorAnimator.SetTrigger("ElevatorMoveDown"); ((MonoBehaviour)this).StartCoroutine(MoveCoroutine(position, position2, Duration)); } } public void MoveToButton() { //IL_0061: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (!IsElevatorMoving && CurrentFloor != ButtonFloor) { ((Collider)DownTrigger).enabled = false; ((Collider)UpTrigger).enabled = false; ((Collider)BottomTrigger).enabled = false; Vector3 position = ElevatorFloors[CurrentFloor].position; CurrentFloor = ButtonFloor; IsElevatorMoving = true; Vector3 position2 = ElevatorFloors[CurrentFloor].position; ElevatorAnimator.SetTrigger("ElevatorMoveDown"); ((MonoBehaviour)this).StartCoroutine(MoveCoroutine(position, position2, Duration)); } } private IEnumerator MoveCoroutine(Vector3 tStart, Vector3 tEnd, float duration) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject gameObject in FloorObjects) { gameObject.SetActive(false); } yield return (object)new WaitForSeconds(0.5f); float t = 0f; while (t < duration) { t += Time.deltaTime; float curvedT = ElevatorCurve.Evaluate(t / duration); ElevatorHeight = Vector3.Lerp(tStart, tEnd, curvedT); ((Component)Elevator).transform.position = ElevatorHeight; yield return 0f; } yield return (object)new WaitForSeconds(1.5f); IsElevatorMoving = false; SetEnabledTriggers(); } private void SetEnabledTriggers() { FloorObjects[CurrentFloor].SetActive(true); ((Collider)DownTrigger).enabled = true; ((Collider)UpTrigger).enabled = true; ((Collider)BottomTrigger).enabled = true; if (CurrentFloor == ButtonFloor) { ((Collider)BottomTrigger).enabled = false; } if (CurrentFloor == 0) { ((Collider)DownTrigger).enabled = false; } else if (CurrentFloor == ElevatorFloors.Count - 1) { ((Collider)UpTrigger).enabled = false; } } } internal class RadioReceiver : MonoBehaviour { public int ReceiverId; [SerializeField] private UnityEvent ReceiveEvent; public void MessageReceiveEvent() { ReceiveEvent.Invoke(); } } public class RadioSender : MonoBehaviour { [SerializeField] private int SenderId; private RadioReceiver receiver; public void FindSignal() { if (!(Object.FindObjectsOfType(typeof(RadioReceiver)) is RadioReceiver[] array)) { return; } RadioReceiver[] array2 = array; foreach (RadioReceiver radioReceiver in array2) { if (SenderId == radioReceiver.ReceiverId) { receiver = radioReceiver; } } } public void SendReceiverSignal() { receiver.MessageReceiveEvent(); } } internal class SkinnedThumperDeath : MonoBehaviour { private Exterminator Exterminator; public void ThumperKilled() { Exterminator = Object.FindAnyObjectByType(); if ((Object)(object)Exterminator != (Object)null) { Exterminator.IncreaseThumperCount(); } } } internal class WeatherTweaksButton : NetworkBehaviour { private RoundManager roundManager; private void Start() { roundManager = Object.FindObjectOfType(); } public void PressWeatherButton() { ((MonoBehaviour)this).StartCoroutine(KillPowerShort()); } private IEnumerator KillPowerShort() { roundManager.FlickerLights(false, false); yield return (object)new WaitForSeconds(5.5f); roundManager.SwitchPower(false); roundManager.powerOffPermanently = true; yield return (object)new WaitForSeconds(0.75f); HUDManager.Instance.RadiationWarningHUD(); } } }