From 2c8bbab70c690cdbb6201b79f3180b8552b53ae1 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 24 Jul 2025 14:24:09 +0200 Subject: fix: main move cancels orders --- README.md | 1 - main.go | 1 - order.go | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f25dc35..121bf0d 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ ## Bugs -- select A, gather, move to B, (it stops), gather (no storage) - if B is < 1 cell away, it will go and merge with A - stops moving if someone settles at destination diff --git a/main.go b/main.go index cecc1d6..c22ebe0 100644 --- a/main.go +++ b/main.go @@ -93,7 +93,6 @@ func (g *Game) updateSelecting(cursor physics.Point, moveMap physics.MoveMap) { for _, e := range g.Entities { if e.Selection.IsEnabled && e.Selection.Value.IsSelected { e.MainAction(g, destination, entityAtDestination, moveMap) - } } } diff --git a/order.go b/order.go index eba71f9..d6f1ccb 100644 --- a/order.go +++ b/order.go @@ -23,6 +23,9 @@ func (e *Entity) MainAction(g *Game, destination physics.Point, entityAtDestinat return } if e.Move.IsEnabled { + if e.Order.IsEnabled { + e.Order.Value = nil + } physics.StartMove(&e.Move, e.Position, destination, moveMap) return } -- cgit v1.3