Beispiel #1
0
    public static IEnumerator Explode(TwitchBomb bomb, string user, bool isWhisper)
    {
        if (!OtherModes.TrainingModeOn)
        {
            IRCConnection.SendMessage("Training mode is not on.", user, false, user);
            return(null);
        }

        if (isWhisper)
        {
            IRCConnection.SendMessage("Sorry {0}, you can't end Training mode in a whisper.", user, false, user);
            return(null);
        }

        Leaderboard.Instance.GetRank(user, out var entry);
        if (!UserAccess.HasAccess(user, AccessLevel.Defuser, true) && entry != null && entry.SolveScore < TwitchPlaySettings.data.MinScoreForNewbomb)
        {
            IRCConnection.SendMessage("Sorry, you don't have enough points to end Training mode.");
            return(null);
        }

        return(bomb.DelayBombExplosionCoroutine());
    }
Beispiel #2
0
 public static IEnumerator Explode(TwitchBomb bomb) => bomb.DelayBombExplosionCoroutine();