Пример #1
0
        private void OnAnnouncingNtfEntrance(AnnouncingNtfEntranceEventArgs ev)
        {
            var cassie = Config.Cassies.FirstOrDefault(info => info.Trigger == "OnNtfArrived");

            if (cassie != null)
            {
                ev.IsAllowed = false;
                var cassieMessage = cassie.Value.Replace("{mtf}", $"NATO_{ev.UnitName[0]} {ev.UnitNumber}");
                Cassie.GlitchyMessage(CassieFormatter.Format(cassieMessage), cassie.GlitchChance, cassie.JamChance);
            }
        }
Пример #2
0
        private void OnAnnouncingScpTermination(AnnouncingScpTerminationEventArgs ev)
        {
            string damageType = ev.TerminationCause;

            if (ev.Killer != null)
            {
                damageType = ev.Killer.Team.ToFriendlyString(ev.Killer.ReferenceHub.characterClassManager);
            }
            var cassie = Config.GetScpDeathCassie(ev.Role.roleId);

            if (cassie != null)
            {
                ev.IsAllowed = false;
                var cassieMessage = cassie.Value.Replace("{damagetype}", damageType);
                Cassie.GlitchyMessage(CassieFormatter.Format(cassieMessage), cassie.GlitchChance, cassie.JamChance);
            }
        }