Esempio n. 1
0
        /// <summary>
        /// Does the whole recontainment process the same way as main game does.
        /// </summary>
        public static IEnumerator <float> Fake5Gens()
        {
            // People complained about it being "easy to be told apart". Not anymore.
            MTFRespawn             mtf  = PlayerManager.localPlayer.GetComponent <MTFRespawn>();
            NineTailedFoxAnnouncer annc = NineTailedFoxAnnouncer.singleton;

            while (annc.queue.Count > 0 || AlphaWarheadController.Host.inProgress)
            {
                yield return(0f);
            }
            mtf.CallRpcPlayCustomAnnouncement("SCP079RECON5", false, false);
            // This massive for loop jank is what the main game does. Go complain to them.
            for (int i = 0; i < 2750; i++)
            {
                yield return(0f);
            }
            while (annc.queue.Count > 0 || AlphaWarheadController.Host.inProgress)
            {
                yield return(0f);
            }
            mtf.CallRpcPlayCustomAnnouncement("SCP079RECON6", true, false);
            mtf.CallRpcPlayCustomAnnouncement("SCP 0 7 9 CONTAINEDSUCCESSFULLY", false, false);
            for (int j = 0; j < 350; j++)
            {
                yield return(0f);
            }
            Generator079.generators[0].CallRpcOvercharge();
            foreach (Door door in UnityEngine.Object.FindObjectsOfType <Door>())
            {
                Scp079Interactable component = door.GetComponent <Scp079Interactable>();
                if (component.currentZonesAndRooms[0].currentZone == "HeavyRooms" && door.isOpen && !door.locked)
                {
                    door.ChangeState(true);
                }
            }
            Recontainer079.isLocked = true;
            for (int k = 0; k < 500; k++)
            {
                yield return(0f);
            }
            Recontainer079.isLocked = false;
        }