aboutsummaryrefslogtreecommitdiff
path: root/gather_order.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-04 23:05:42 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-04 23:05:42 +0200
commit5224fdc80913597287a5f67efec5d0be3254ce59 (patch)
tree7b6c4cac23223926ffb620a2c9a6a43caab6b613 /gather_order.go
parenta5fef758107888853c14a592696b45768ef56df8 (diff)
Fmt
Diffstat (limited to 'gather_order.go')
-rw-r--r--gather_order.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/gather_order.go b/gather_order.go
index 2f5a060..e359146 100644
--- a/gather_order.go
+++ b/gather_order.go
@@ -24,8 +24,8 @@ func (o *GatherOrder) Update(e *Entity, g *Game) {
return
}
if physics.Distance(e.Position.Value, gatherer.CurrentTarget.Position.Value) <= 100 {
- o.updateGathering(gatherer, source)
- return
+ o.updateGathering(gatherer, source)
+ return
}
if !e.Move.Value.IsActive {
o.startMoveToSource(e, gatherer, g)
@@ -57,7 +57,7 @@ func (o *GatherOrder) updateGathererFull(e *Entity, g *Game, gatherer *ResourceG
slog.Info("storage target", slog.String("storage", destination.String()), slog.Int("distance", distance))
if distance > 1 {
slog.Info("moving to storage", slog.String("storage", destination.String()))
- physics.StartMove(&e.Move,e.Position, destination, g.getMoveMap())
+ physics.StartMove(&e.Move, e.Position, destination, g.getMoveMap())
return
}
gatherer.CurrentVolume = 0
@@ -73,7 +73,7 @@ func (o *GatherOrder) startMoveToSource(e *Entity, gatherer *ResourceGatherer, g
e.Order.Value = nil
return
}
- physics.StartMove(&e.Move,e.Position, destination, g.getMoveMap())
+ physics.StartMove(&e.Move, e.Position, destination, g.getMoveMap())
}
func getAllStorageDockings(g *Game) []physics.Point {
@@ -99,7 +99,7 @@ func Gather(e *Entity, source *Entity, g *Game) Order {
e.Order.Value = nil
return nil
}
- physics.StartMove(&e.Move,e.Position, destination, g.getMoveMap())
+ physics.StartMove(&e.Move, e.Position, destination, g.getMoveMap())
}
}
return &GatherOrder{source: source}