From 99f51dd165ec057cf702225cd96dff4dbc50fba1 Mon Sep 17 00:00:00 2001 From: Kiousu Date: Sun, 11 Jan 2026 21:45:39 -0600 Subject: [PATCH] Add console command to reveal cave and dungeon names --- .../stage/ConsoleCommandInterpreter.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/forge-gui-mobile/src/forge/adventure/stage/ConsoleCommandInterpreter.java b/forge-gui-mobile/src/forge/adventure/stage/ConsoleCommandInterpreter.java index af094e54675..a424a73cb72 100644 --- a/forge-gui-mobile/src/forge/adventure/stage/ConsoleCommandInterpreter.java +++ b/forge-gui-mobile/src/forge/adventure/stage/ConsoleCommandInterpreter.java @@ -338,6 +338,27 @@ private ConsoleCommandInterpreter() { System.out.println("POI Names - Types\n" + String.join("\n", poiNames)); return "POI lists dumped to stdout."; }); + registerCommand(new String[]{"reveal", "caves", "dungeons"}, s -> { + WorldSave save = WorldSave.getCurrentSave(); + if (save == null || save.getWorld() == null) { + return "No world loaded."; + } + int revealed = 0; + for (PointOfInterest poi : save.getWorld().getAllPointOfInterest()) { + PointOfInterestData data = poi.getData(); + if (data == null || data.type == null) { + continue; + } + if (!"cave".equalsIgnoreCase(data.type) && !"dungeon".equalsIgnoreCase(data.type)) { + continue; + } + if (!save.getPointOfInterestChanges(poi.getID()).isVisited()) { + save.getPointOfInterestChanges(poi.getID()).visit(); + revealed++; + } + } + return "Revealed " + revealed + " cave/dungeon names on the map."; + }); registerCommand(new String[]{"setColorID"}, s -> { if (s.length < 1) return "Please specify color ID: Valid choices: B, G, R, U, W, C. Example:\n\"setColorID G\"";