From 8865a196f87efe3a28a485f9fb01146bd1ac819f Mon Sep 17 00:00:00 2001 From: Urban Modig Date: Sat, 6 Sep 2025 20:26:56 +0200 Subject: [PATCH] Added logging --- src/main/java/se/urmo/game/entities/ghost/Ghost.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/se/urmo/game/entities/ghost/Ghost.java b/src/main/java/se/urmo/game/entities/ghost/Ghost.java index fb5b5af..6b841e6 100644 --- a/src/main/java/se/urmo/game/entities/ghost/Ghost.java +++ b/src/main/java/se/urmo/game/entities/ghost/Ghost.java @@ -97,7 +97,10 @@ public class Ghost extends BaseAnimated { public void setMode(GhostMode mode) { GhostMode currentMode = currentMode(); if (currentMode == null || mode.ordinal() < currentMode.ordinal()) { // only if new mode has higher prio + log.debug("Mode changed to {}", mode); currentState = states.get(mode); + } else { + log.debug("Mode not changed to {}, current mode is {}", mode, currentMode); } } @@ -106,6 +109,7 @@ public class Ghost extends BaseAnimated { * This bypasses the priority system since the state itself is requesting the change */ public void requestModeChange(GhostMode mode) { + log.debug("Requested mode change to {}", mode); currentState = states.get(mode); }