public IEnumerator <float> ChopperThread()
        {
            while (roundStarted)
            {
                yield return(Timing.WaitForSeconds(time)); // Wait seconds (10 minutes by defualt)

                Log.Info("Spawning chopper!");

                RespawnEffectsController.ExecuteAllEffects(RespawnEffectsController.EffectType.Selection, SpawnableTeamType.NineTailedFox);

                Map.Broadcast(5, dropText);
                Cassie.Message(announcementText);

                yield return(Timing.WaitForSeconds(15)); // Wait 15 seconds

                Vector3 spawn = GetRandomSpawnPoint(RoleType.NtfCadet);

                foreach (KeyValuePair <ItemType, int> drop in allowedItems) // Drop items
                {
                    Log.Info("Spawning " + drop.Value + " " + drop.Key.ToString() + "'s");
                    for (int i = 0; i < drop.Value; i++)
                    {
                        SpawnItem(drop.Key, spawn, spawn);
                    }
                }
                yield return(Timing.WaitForSeconds(15)); // Wait 15 seconds to let the chopper leave.
            }
        }
Example #2
0
        protected override void RoleAdded(Player player)
        {
            try
            {
                foreach (CustomAbility ability in CustomAbilities)
                {
                    if (ability is BlackoutAbility blackout)
                    {
                        blackout.CanUseOverride = () => CanUseAbility(player, blackout);
                    }
                }

                if (!ConsumptionStacks.ContainsKey(player))
                {
                    ConsumptionStacks[player] = 1;
                }
                player.UnitName = "Scp575";
                Log.Debug($"{Name} added to {player.Nickname}");
                Cassie.GlitchyMessage("Alert . scp 5 7 5 has breached containment", 0.5f, 0.1f);
                _coroutines.Add(Timing.RunCoroutine(Invisibility(player)));
                player.CustomInfo = $"<color=red>{player.Nickname}\nSCP-575</color>";
                player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.Nickname;
                player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.Badge;
                player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.Role;
                player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.PowerStatus;
                player.ReferenceHub.nicknameSync.ShownPlayerInfo &= ~PlayerInfoArea.UnitName;
            }
            catch (Exception e)
            {
                Log.Error($"{Name}: {e}\n{e.StackTrace}");
            }
        }
Example #3
0
        private void OnAnnouncingScpTermination(AnnouncingScpTerminationEventArgs ev)
        {
            if (ev.Role.roleId == RoleType.Scp106)
            {
                string message = $"scp 5 7 5 has been successfully terminated . termination cause {ev.TerminationCause}";

                ev.IsAllowed = false;
                Cassie.Message(message);
            }
        }