From 2f01274717d62e59e4bf3b4426a2ec6a76ffac11 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 16 Feb 2023 13:49:35 +0100 Subject: client: use only the currently available actions in the action choice --- go/client/game.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'go/client') 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) { -- cgit v1.2.3