Exemplo n.º 1
0
        public override Brush Construct(BrushArgs args)
        {
            CopyState cState = args.Player.CurrentCopy;

            if (cState == null)
            {
                args.Player.Message("You haven't copied anything yet.");
                return(null);
            }

            if (args.Message.Length == 0)
            {
                return(new SimplePasteBrush(cState));
            }
            string[] parts = args.Message.SplitSpaces();

            if (parts[0].CaselessEq("not"))
            {
                PasteNotBrush brush = new PasteNotBrush(cState);
                brush.Exclude = ReplaceBrushFactory.GetBlocks(args.Player, 1, parts.Length, parts);
                return(brush.Exclude == null ? null : brush);
            }
            else
            {
                PasteBrush brush = new PasteBrush(cState);
                brush.Include = ReplaceBrushFactory.GetBlocks(args.Player, 0, parts.Length, parts);
                return(brush.Include == null ? null : brush);
            }
        }
Exemplo n.º 2
0
 public override Brush Construct(BrushArgs args)
 {
     return(ReplaceBrushFactory.ProcessReplace(args, true));
 }