aboutsummaryrefslogtreecommitdiff
path: root/go/client
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-16 13:49:35 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:50:10 +0200
commitc0ab1110429be3a2a1664084469952ea082961c1 (patch)
treebcae87c712282f960c2687f7bd1a3eef00938009 /go/client
parent5fcc4eb5420e202b54ec060bcda478ff5ccf3b5e (diff)
downloadmuhqs-game-c0ab1110429be3a2a1664084469952ea082961c1.tar.gz
muhqs-game-c0ab1110429be3a2a1664084469952ea082961c1.zip
client: use only the currently available actions in the action choice
Diffstat (limited to 'go/client')
-rw-r--r--go/client/game.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/go/client/game.go b/go/client/game.go
index b70c2b8f..abd68378 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -263,7 +263,7 @@ func (g *Game) addPermActionChoice(perm game.Permanent, x, y int) {
perms := []game.Permanent{perm}
for _, p := range perm.Pile() {
- if len(p.AvailActions()) > 0 {
+ if len(p.CurrentlyAvailActions()) > 0 {
perms = append(perms, p)
}
}
@@ -284,7 +284,7 @@ func (g *Game) addPermActionChoice(perm game.Permanent, x, y int) {
}
func (g *Game) addActionChoice(perm game.Permanent, x, y int) {
- actions := perm.AvailActions()
+ actions := perm.CurrentlyAvailActions()
if len(actions) > 0 {
g.selectedObject = perm
onClick := func(c *ui.Choice, x, y int) {