refactor: consistent isActive() guard on tutorial onCommand; tidy App imports

This commit is contained in:
2026-06-01 21:59:07 +02:00
parent c315d3f4b7
commit 236ed0a180
2 changed files with 3 additions and 3 deletions

View File

@@ -22,14 +22,14 @@ import thb.jeanluc.adventure.game.Game;
import thb.jeanluc.adventure.game.GameContext;
import thb.jeanluc.adventure.game.GameSession;
import thb.jeanluc.adventure.game.TutorialGuide;
import thb.jeanluc.adventure.loader.TutorialLoader;
import thb.jeanluc.adventure.model.Tutorial;
import thb.jeanluc.adventure.io.ConsoleIO;
import thb.jeanluc.adventure.io.GameIO;
import thb.jeanluc.adventure.io.text.Banner;
import thb.jeanluc.adventure.loader.TutorialLoader;
import thb.jeanluc.adventure.loader.WorldLoader;
import thb.jeanluc.adventure.menu.MainMenu;
import thb.jeanluc.adventure.menu.SettingsMenu;
import thb.jeanluc.adventure.model.Tutorial;
import thb.jeanluc.adventure.save.SaveException;
import thb.jeanluc.adventure.save.SaveService;
import thb.jeanluc.adventure.save.SaveSlotInfo;

View File

@@ -73,7 +73,7 @@ public class Game {
if (ctx.getSession().getTurn() % 10 == 0) {
ctx.save();
}
if (tutorialGuide != null) {
if (tutorialGuide != null && tutorialGuide.isActive()) {
tutorialGuide.onCommand(ctx, parsed);
}
}