diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-24 14:24:09 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-24 14:25:12 +0200 |
| commit | 2c8bbab70c690cdbb6201b79f3180b8552b53ae1 (patch) | |
| tree | 5a89d7c7334d3de2e7b41d95349af739a917d29f | |
| parent | 9f30f800443e6496bbba264a375c126cb26b1760 (diff) | |
fix: main move cancels orders
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | main.go | 1 | ||||
| -rw-r--r-- | order.go | 3 |
3 files changed, 3 insertions, 2 deletions
@@ -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 @@ -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) - } } } @@ -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 } |
