Example #1
0
    public static void RefreshModes(KMGameInfo.State state)
    {
        _state = state;

        if (currentMode == TwitchPlaysMode.Normal)
        {
            if (Assets.Scripts.Records.RecordManager.Instance != null)
            {
                _disableBestRecords = Assets.Scripts.Records.RecordManager.Instance.DisableBestRecords;
            }
            if (Assets.Scripts.Stats.StatsManager.Instance != null)
            {
                _disableStats = Assets.Scripts.Stats.StatsManager.Instance.DisableStatChanges;
            }
        }

        if ((_state != KMGameInfo.State.PostGame && _state != KMGameInfo.State.Setup) || currentMode == nextMode)
        {
            return;
        }

        currentMode = nextMode;
        DisableLeaderboard();
        IRCConnection.Instance.SendMessage("Mode is now set to: {0}", Enum.GetName(typeof(TwitchPlaysMode), currentMode));
    }
Example #2
0
 public static void RefreshModes()
 {
     if (!BombMessageResponder.BombActive && currentMode != nextMode)
     {
         currentMode = nextMode;
         IRCConnection.Instance.SendMessage("Mode is now set to: {0}", Enum.GetName(typeof(TwitchPlaysMode), currentMode));
     }
 }
Example #3
0
    public static bool Set(TwitchPlaysMode mode, bool state = true)
    {
        if (state == false)
        {
            mode = TwitchPlaysMode.Normal;
        }

        nextMode = mode;
        if (!BombMessageResponder.BombActive)
        {
            currentMode = mode;
            return(true);
        }
        return(false);
    }
Example #4
0
    public static bool Set(TwitchPlaysMode mode, bool state = true)
    {
        if (!state)
        {
            mode = TwitchPlaysMode.Normal;
        }

        nextMode = mode;
        if (_state != KMGameInfo.State.PostGame && _state != KMGameInfo.State.Setup)
        {
            return(false);
        }

        currentMode = mode;
        return(true);
    }
Example #5
0
 public static void Toggle(TwitchPlaysMode mode) => Set(mode, nextMode != mode);
Example #6
0
 public static bool InMode(TwitchPlaysMode mode) => currentMode == mode;
Example #7
0
 public static string GetName(TwitchPlaysMode mode) => Enum.GetName(typeof(TwitchPlaysMode), mode);
Example #8
0
 public static bool InMode(TwitchPlaysMode mode)
 {
     return(currentMode == mode);
 }
Example #9
0
 public static string GetName(TwitchPlaysMode mode)
 {
     return(Enum.GetName(typeof(TwitchPlaysMode), mode));
 }