From 87563d8bbf70cba9443435113a8bddfcd39f611d Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 25 Jul 2025 11:49:42 +0200 Subject: refactor: ECS patrol order --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 3d014bf..86dc59b 100644 --- a/main.go +++ b/main.go @@ -103,7 +103,9 @@ func (g *Game) updatePatrolling(cursor physics.Point) { if inpututil.IsMouseButtonJustReleased(ebiten.MouseButtonRight) { destination := cursor.Div(100).Mul(100) for _, e := range g.Entities { - Patrol(e, destination) + if e.Selection.IsEnabled && e.Selection.Value.IsSelected { + Patrol(e.Position, e.Move, &e.Order, destination) + } } g.CurrentAction = Selecting } -- cgit v1.3