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-01-27 16:43:50 +0100
commit2f01274717d62e59e4bf3b4426a2ec6a76ffac11 (patch)
treef9d23ba18ba91ad366936a94bb36b0a6214fa49c /go/client
parentedc4efbe42a94660d9d530b61c5963c298bd3597 (diff)
downloadmuhqs-game-2f01274717d62e59e4bf3b4426a2ec6a76ffac11.tar.gz
muhqs-game-2f01274717d62e59e4bf3b4426a2ec6a76ffac11.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) {