aboutsummaryrefslogtreecommitdiff
path: root/go/ui
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-15 22:24:17 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:38 +0200
commit338832f5fe67fc01ec41b130482cc771f26c6e41 (patch)
tree0cd3513645473b948562ab6a51ceaa36519ab577 /go/ui
parentd1d2243527ff2fb7fcbf67f96622e9bd5c279d89 (diff)
downloadmuhqs-game-338832f5fe67fc01ec41b130482cc771f26c6e41.tar.gz
muhqs-game-338832f5fe67fc01ec41b130482cc771f26c6e41.zip
do not show wrong and misleading reachable tiles
Diffstat (limited to 'go/ui')
-rw-r--r--go/ui/hoverable.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/go/ui/hoverable.go b/go/ui/hoverable.go
index 75c04fe8..af50d890 100644
--- a/go/ui/hoverable.go
+++ b/go/ui/hoverable.go
@@ -1,7 +1,6 @@
package ui
import (
- "golang.org/x/exp/slices"
"muhq.space/muhqs-game/go/game"
)
@@ -103,21 +102,11 @@ func (h *hoverPermInfo) init(mv *MapView, c *Collection) {
}
if unit, ok := obj.(*game.Unit); ok {
- reachableRange := unit.Attack.MaxRange() + unit.Movement.Range
movable := unit.MoveRangeTiles()
for _, t := range movable {
mv.AddHighlightTile(t, HighlightMovementColor)
}
- // TODO: only show actually reachable tiles
- attackable := game.TilesInRange(mv.gameState.Map(), perm, reachableRange)
- for _, t := range attackable {
- if slices.Contains(movable, t) {
- continue
- }
- mv.AddHighlightTile(t, HighlightAttackColor)
- }
-
h.reset = func() {
mv.ClearTileHighlights()
}