public void OnWarheadCancel(WarheadCancelEvent ev) { if (IsAutoWarheadStart) { ev.Allow = false; } else { Expansions.Broadcast(Configs.BroadcastTime, Configs.WarheadCancel); } }
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); }
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; }
public void OnWarheadCancel(WarheadCancelEvent ev) => DiscordLab.bot.NewMessage($"{ev.Disabler.nameClean} canceled the warhead detonation");