diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-16 13:49:35 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:50:10 +0200 |
| commit | c0ab1110429be3a2a1664084469952ea082961c1 (patch) | |
| tree | bcae87c712282f960c2687f7bd1a3eef00938009 /go/client | |
| parent | 5fcc4eb5420e202b54ec060bcda478ff5ccf3b5e (diff) | |
| download | muhqs-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.go | 4 |
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) { |
