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)); }
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)); } }
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); }
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); }
public static void Toggle(TwitchPlaysMode mode) => Set(mode, nextMode != mode);
public static bool InMode(TwitchPlaysMode mode) => currentMode == mode;
public static string GetName(TwitchPlaysMode mode) => Enum.GetName(typeof(TwitchPlaysMode), mode);
public static bool InMode(TwitchPlaysMode mode) { return(currentMode == mode); }
public static string GetName(TwitchPlaysMode mode) { return(Enum.GetName(typeof(TwitchPlaysMode), mode)); }