Пример #1
0
    public static void Assign(TwitchModule module, string user, [Group(1)] string targetUser)
    {
        if (TwitchPlaySettings.data.AnarchyMode)
        {
            IRCConnection.SendMessageFormat("Sorry {0}, assigning modules is not allowed in anarchy mode.", user);
            return;
        }

        if (module.TakeInProgress != null)
        {
            module.StopCoroutine(module.TakeInProgress);
            module.TakeInProgress = null;
        }

        module.PlayerName = targetUser;
        module.RemoveFromClaimQueue(user);
        module.CanClaimNow(user, true, true);
        module.SetBannerColor(module.ClaimedBackgroundColour);
        IRCConnection.SendMessageFormat(TwitchPlaySettings.data.AssignModule, module.Code, module.PlayerName, user, module.HeaderText);
    }
Пример #2
0
 public static void Unmark(TwitchModule module) => module.SetBannerColor(module.Claimed ? module.ClaimedBackgroundColour : module.unclaimedBackgroundColor);
Пример #3
0
 public static void Mark(TwitchModule module) => module.SetBannerColor(module.MarkedBackgroundColor);
Пример #4
0
 public static void Solved(TwitchModule module, string user)
 {
     module.SetBannerColor(module.SolvedBackgroundColor);
     module.PlayerName = null;
     IRCConnection.SendMessageFormat(TwitchPlaySettings.data.ModuleReady, module.Code, user, module.HeaderText);
 }