summaryrefslogtreecommitdiff
path: root/tools.go
diff options
context:
space:
mode:
Diffstat (limited to 'tools.go')
-rw-r--r--tools.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools.go b/tools.go
index 6397223..e4fd34a 100644
--- a/tools.go
+++ b/tools.go
@@ -15,6 +15,7 @@ type XZPos struct {
type Tool interface {
SingleClick() bool // Whether only one click should be performed (true) or the action should be repeated, if the mouse is dragged
+ IsSlow() bool
Do(bio mcmap.Biome, biogs BiomeGetSetter, x, z int)
}
@@ -23,6 +24,7 @@ type drawTool struct {
}
func (d *drawTool) SingleClick() bool { return false }
+func (d *drawTool) IsSlow() bool { return false }
func (d *drawTool) Do(bio mcmap.Biome, biogs BiomeGetSetter, x, z int) {
rad := d.radGetter()
@@ -44,6 +46,7 @@ func NewDrawTool(radGetter func() int) *drawTool {
type fillTool struct{}
func (f *fillTool) SingleClick() bool { return true }
+func (f *fillTool) IsSlow() bool { return true }
func chkBounds(x, z, xStart, zStart, xEnd, zEnd int) bool {
return (x >= xStart) && (z >= zStart) && (x < xEnd) && (z < zEnd)