aboutsummaryrefslogtreecommitdiff
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-15 23:52:21 +0200
commitc0ce40217b209b89dc189b7cb426e927b02a55ca (patch)
tree43ac6f77b9e9932c2f34d5a74a0d8b46eb497cb7
parent7c21912cd4dfb9302d082d0bc885395e019fbce0 (diff)
downloadmuhqs-game-c0ce40217b209b89dc189b7cb426e927b02a55ca.tar.gz
muhqs-game-c0ce40217b209b89dc189b7cb426e927b02a55ca.zip
do not show wrong and misleading reachable tiles
-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()
}