Example #1
0
        private static void HandleRoundStart()
        {
            if (Plugin.Config.ForceRestart > -1)
            {
                State.RunCoroutine(HandlerHelper.RunForceRestart());
            }

            if (Plugin.Config.ItemAutoCleanup != 0)
            {
                State.RunCoroutine(HandlerHelper.RunAutoCleanup());
            }

            if (Plugin.Config.DecontaminationTime > -1)
            {
                LightContainmentZoneDecontamination.DecontaminationController.Singleton.TimeOffset =
                    (float)((11.7399997711182 - Plugin.Config.DecontaminationTime) * 60.0);
            }

            if (Plugin.Config.GeneratorDuration > -1)
            {
                foreach (Generator079 generator in Generator079.Generators)
                {
                    generator.startDuration = Plugin.Config.GeneratorDuration;
                    generator.SetTime(Plugin.Config.GeneratorDuration);
                }
            }

            if (!Plugin.Config.SelfHealingDuration.IsEmpty() && !Plugin.Config.SelfHealingAmount.IsEmpty())
            {
                State.RunCoroutine(HandlerHelper.RunSelfHealing());
            }

            if (Plugin.Config.Scp106LureAmount < 1)
            {
                Object.FindObjectOfType <LureSubjectContainer>().SetState(true);
            }

            HandlerHelper.SetupWindowsHealth();

            if (Plugin.Config.InsertTablets)
            {
                foreach (WorkStation workstation in Object.FindObjectsOfType <WorkStation>())
                {
                    workstation.NetworkisTabletConnected = true;
                }
            }
        }
Example #2
0
        private static void HandleFemurEnter(EnteringFemurBreakerEventArgs ev)
        {
            // That means the femur breaker is always open
            if (Plugin.Config.Scp106LureAmount < 1)
            {
                return;
            }

            // Allowed team check
            if (!Plugin.Config.Scp106LureTeam.Contains(ev.Player.Team))
            {
                ev.IsAllowed = false;
                return;
            }

            if (++State.LuresCount < Plugin.Config.Scp106LureAmount)
            {
                State.RunCoroutine(HandlerHelper.RunLureReload());
            }
        }