Ejemplo n.º 1
0
    public static IEnumerator DefaultCommand(TwitchHoldable holdable, string user, bool isWhisper, string cmd)
    {
        if (holdable.CommandType == typeof(AlarmClockCommands))
        {
            return(AlarmClockCommands.Snooze(holdable, user, isWhisper));
        }

        if (holdable.CommandType != null)
        {
            return(holdable.RespondToCommand(user, isWhisper));
        }

        return(holdable.RespondToCommand(user, cmd, isWhisper));
    }
Ejemplo n.º 2
0
    public static IEnumerator DefaultCommand(TwitchHoldable holdable, string user, bool isWhisper, string cmd)
    {
        if (holdable.CommandType == typeof(AlarmClockCommands))
        {
            return(AlarmClockCommands.Snooze(holdable, user, isWhisper));
        }

        if (holdable.CommandType == typeof(IRCConnectionManagerCommands) ||
            holdable.CommandType == typeof(MissionBinderCommands) ||
            holdable.CommandType == typeof(FreeplayCommands))
        {
            return(holdable.RespondToCommand(user, isWhisper));
        }

        return(holdable.RespondToCommand(user, cmd, isWhisper));
    }
Ejemplo n.º 3
0
    public static IEnumerator Snooze()
    {
        if (GameRoom.Instance is ElevatorGameRoom)
        {
            yield break;
        }
        if (!TwitchPlaysService.Instance.Holdables.TryGetValue("alarm", out var alarmClock))
        {
            yield break;
        }

        var e = alarmClock.Hold();

        while (e.MoveNext())
        {
            yield return(e.Current);
        }

        e = AlarmClockCommands.Snooze(alarmClock.Holdable.GetComponent <AlarmClock>());
        while (e.MoveNext())
        {
            yield return(e.Current);
        }
    }