aboutsummaryrefslogtreecommitdiff
path: root/go/client
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-19 15:36:10 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:40 +0200
commit790706dbf1e797607dfb6c6717ab863a9e4cb5ca (patch)
tree1c31d30048fa0de6dd605aa6e242a7c0977cd2f1 /go/client
parentb584b8442ca46e0aa71509ab6bc567e242c629bc (diff)
downloadmuhqs-game-790706dbf1e797607dfb6c6717ab863a9e4cb5ca.tar.gz
muhqs-game-790706dbf1e797607dfb6c6717ab863a9e4cb5ca.zip
add simlpe plain text log handler and consider loglevel from the env
Diffstat (limited to 'go/client')
-rw-r--r--go/client/game.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/go/client/game.go b/go/client/game.go
index caf73933..3dacd209 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -3,13 +3,14 @@ package main
import (
"fmt"
"image/color"
- "log"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"muhq.space/muhqs-game/go/activities"
+ "muhq.space/muhqs-game/go/assets"
"muhq.space/muhqs-game/go/game"
+ "muhq.space/muhqs-game/go/log"
"muhq.space/muhqs-game/go/ui"
"muhq.space/muhqs-game/go/utils"
)
@@ -544,7 +545,7 @@ func (g *Game) handlePlayerNotifications() {
// FIXME
}
for n.Valid() {
- log.Println("Received", n)
+ log.Debug("Received", "notification", n)
switch n.Notification {
case game.PriorityNotification:
g.hasPriority = true
@@ -616,13 +617,14 @@ func (g *Game) progressPlayAction(a *game.PlayAction) {
g.addCancelablePrompt(a, fmt.Sprintf("Select targets to play %v", a.Card.Name))
g.handLayer.HighlightCard(a.Card, ui.HighlightSelectionColor)
} else {
+ log.Debug("No targets or no selection allowed", "action", a)
g.declareAction(a)
}
}
func (g *Game) handleSelection(obj any, x, y int) {
if obj == nil {
- log.Printf("No object found at cursor position (%d, %d)\n", x, y)
+ log.Debug("No object found at cursor", "cursor", game.Position{x, y})
return
}