Exemple #1
0
        private static bool DressCommand(string command, Variable[] vars, bool quiet, bool force)
        {
            if (vars.Length == 0)
            {
                throw new RunTimeError("Usage: dress ('name of dress list')");
            }

            if (_lastDressList == null)
            {
                _lastDressList = DressList.Find(vars[0].AsString());

                if (_lastDressList != null)
                {
                    _lastDressList.Dress();
                }
                else if (!quiet)
                {
                    CommandHelper.SendWarning(command, $"'{vars[0].AsString()}' not found", quiet);
                    return(true);
                }
            }
            else if (ActionQueue.Empty)
            {
                _lastDressList = null;
                return(true);
            }

            return(false);
        }
Exemple #2
0
        public static bool DressCommand(string command, Argument[] args, bool quiet, bool force)
        {
            if (args.Length == 0)
            {
                throw new RunTimeError(null, "Usage: dress ('name of dress list')");
            }

            if (_lastDressList == null)
            {
                _lastDressList = DressList.Find(args[0].AsString());

                if (_lastDressList != null)
                {
                    _lastDressList.Dress();
                }
                else if (!quiet)
                {
                    throw new RunTimeError(null, $"'{args[0].AsString()}' not found");
                }
            }
            else if (ActionQueue.Empty)
            {
                _lastDressList = null;
                return(true);
            }

            return(false);
        }
Exemple #3
0
        public static bool DressCommand(string command, Argument[] args, bool quiet, bool force)
        {
            if (args.Length == 0)
            {
                throw new RunTimeError(null, "Usage: dress ('name of dress list')");
            }

            DressList d = DressList.Find(args[0].AsString());

            if (d != null)
            {
                d.Dress();
            }
            else if (!quiet)
            {
                throw new RunTimeError(null, $"'{args[0].AsString()}' not found");
            }

            return(true);
        }