Beispiel #1
0
        public Workshop Get()
        {
            // Match lobby settings, variables, and subroutines.
            MatchSettings();
            MatchVariables();
            MatchSubroutines();

            // Match action copy
            if (ActionGroup(out var actions))
            {
                return(new Workshop(Variables.ToArray(), Subroutines.ToArray(), actions.ToArray()));
            }
            // Match condition copy
            else if (ConditionGroup(out var conditions))
            {
                return(new Workshop(Variables.ToArray(), Subroutines.ToArray(), conditions.ToArray()));
            }
            else
            {
                // Match rules
                while (Rule(out TTERule rule))
                {
                    Rules.Add(rule);
                }
                return(new Workshop(Variables.ToArray(), Subroutines.ToArray(), Rules.ToArray(), LobbySettings));
            }
        }
Beispiel #2
0
        public Workshop GetActionList()
        {
            // Match variables and subroutines.
            MatchVariables();
            MatchSubroutines();

            // Match actions.
            if (ActionGroup(out var actions))
            {
                return(new Workshop(Variables.ToArray(), Subroutines.ToArray(), actions.ToArray()));
            }
            return(null);
        }