diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-08-03 20:49:24 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:08 +0200 |
| commit | 1e6bffa4ab5d6ebc99ba06db8fa17464a8ed55e6 (patch) | |
| tree | 7bd7a8b5e9428815e2e500a5525056dac88a080f | |
| parent | 34f56972535b8122e7d86762d532a601e917982b (diff) | |
| download | muhqs-game-1e6bffa4ab5d6ebc99ba06db8fa17464a8ed55e6.tar.gz muhqs-game-1e6bffa4ab5d6ebc99ba06db8fa17464a8ed55e6.zip | |
remove duplicate selectedObject assignments
The selected obj is assigned when creating an action choice therefore
it is not necessary to assign it additionally beforehand.
| -rw-r--r-- | go/client/game.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/go/client/game.go b/go/client/game.go index 9f440ceb..9c95deb2 100644 --- a/go/client/game.go +++ b/go/client/game.go @@ -210,7 +210,6 @@ func (g *Game) addPermActionChoice(perm game.Permanent, x, y int) { } if len(perms) > 1 { - g.selectedObject = perms onClick := func(c *ui.Choice, x, y int) { g.removeChoice() p := perms[c.GetChoosen(x, y)] @@ -218,7 +217,6 @@ func (g *Game) addPermActionChoice(perm game.Permanent, x, y int) { } g.addChoice(ui.NewChoice(x, y, utils.TypedSliceToInterfaceSlice(labels), onClick)) } else { - g.selectedObject = perms[0] g.addActionChoice(perms[0], x, y) } } |
