Exemplo n.º 1
0
 public void OnWarheadCancel(WarheadCancelEvent ev)
 {
     if (IsAutoWarheadStart)
     {
         ev.Allow = false;
     }
     else
     {
         Expansions.Broadcast(Configs.BroadcastTime, Configs.WarheadCancel);
     }
 }
Exemplo n.º 2
0
 public void OnCancel(WarheadCancelEvent ev)
 {
     if (!Sitrep.Events.Contains("warheadcancelevent"))
     {
         return;
     }
     if (!Sitrep.CustomChannelIds.TryGetValue("warheadcancelevent", out ulong channel))
     {
         channel = Sitrep.EventsId;
     }
     Send($":octagonal_sign: [{ev.Player.Role.AsString()}] {ev.Player.Nick.DiscordSanitize()} ({ev.Player.ParsedUserId}) zrušil detonaci Alpha Warhead.", channel);
 }
Exemplo n.º 3
0
        public static void InvokeWarheadCancel(GameObject player, ref bool allow)
        {
            if (WarheadCancelledEvent == null)
            {
                return;
            }

            WarheadCancelEvent ev = new WarheadCancelEvent
            {
                Allow  = allow,
                Player = player ? player.GetPlayer() : null
            };

            WarheadCancelledEvent.Invoke(ev);

            allow = ev.Allow;
        }
Exemplo n.º 4
0
 public void OnWarheadCancel(WarheadCancelEvent ev)
 => DiscordLab.bot.NewMessage($"{ev.Disabler.nameClean} canceled the warhead detonation");