Example #1
0
        public void BrushRange(Player player, int range = 300)
        {
            BrushTool brush = player.Inventory.GetItemInHand() as BrushTool;

            if (brush == null)
            {
                return;
            }

            brush.Range = range;
            brush.UpdateDisplay(player);

            player.SendMessage($"Set brush range to {range}");
        }
Example #2
0
        public void BrushMaterial(Player player, Pattern material)
        {
            BrushTool brush = player.Inventory.GetItemInHand() as BrushTool;

            if (brush == null)
            {
                return;
            }

            brush.Pattern = material;
            brush.UpdateDisplay(player);

            player.SendMessage($"Set brush material");
        }
Example #3
0
        public void BrushSize(Player player, int radius = 2)
        {
            BrushTool brush = player.Inventory.GetItemInHand() as BrushTool;

            if (brush == null)
            {
                return;
            }

            brush.Radius = radius;
            brush.UpdateDisplay(player);

            player.SendMessage($"Set brush radius to {radius}");
        }
Example #4
0
        public void BrushMask(Player player, Mask mask = null)
        {
            BrushTool brush = player.Inventory.GetItemInHand() as BrushTool;

            if (brush == null)
            {
                return;
            }

            if (mask == null)
            {
                brush.Mask = new AnyBlockMask();
                brush.UpdateDisplay(player);

                player.SendMessage($"Removed source mask from brush");
                return;
            }

            brush.Mask = mask;
            brush.UpdateDisplay(player);

            player.SendMessage($"Set new brush source mask");
        }