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 14:46:14 +0200
commit0cec8f0b9705c29c115d4d97c504fc5f20985401 (patch)
tree52421179db0fb5c236da09723a18464589808088 /go/client
parentebd55f4c3bb8e07ea51273c9ffb46017c2bf2cd1 (diff)
downloadmuhqs-game-0cec8f0b9705c29c115d4d97c504fc5f20985401.tar.gz
muhqs-game-0cec8f0b9705c29c115d4d97c504fc5f20985401.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
}