From 53cb093f9efcdea6d4bf7f56bf5a42ab579fc25d Mon Sep 17 00:00:00 2001 From: rwalters Date: Mon, 2 Jun 2025 10:24:50 -0400 Subject: [PATCH] (Adventure) Fix draft scene transition (#7666) * Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner) * Fixing a bug in which the transition screen's non-blocking of the start match button can be clicked multiple times, which results in a crash when the match ends --- forge-gui-mobile/src/forge/adventure/scene/EventScene.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/forge-gui-mobile/src/forge/adventure/scene/EventScene.java b/forge-gui-mobile/src/forge/adventure/scene/EventScene.java index 30950d89f10..1d6036eabb2 100644 --- a/forge-gui-mobile/src/forge/adventure/scene/EventScene.java +++ b/forge-gui-mobile/src/forge/adventure/scene/EventScene.java @@ -511,13 +511,11 @@ public class EventScene extends MenuScene implements IAfterMatch { if (match.p1 instanceof AdventureEventData.AdventureEventHuman) { humanMatch = match; - continue; } else if (match.p2 instanceof AdventureEventData.AdventureEventHuman) { AdventureEventData.AdventureEventParticipant placeholder = match.p1; match.p1 = match.p2; match.p2 = placeholder; humanMatch = match; - continue; } else { //Todo: Actually run match simulation here if (MyRandom.percentTrue(50)) { @@ -530,7 +528,6 @@ public class EventScene extends MenuScene implements IAfterMatch { match.winner = match.p2; } } - } if (humanMatch != null && humanMatch.round != currentEvent.currentRound) @@ -539,14 +536,16 @@ public class EventScene extends MenuScene implements IAfterMatch { DuelScene duelScene = DuelScene.instance(); EnemySprite enemy = humanMatch.p2.getSprite(); currentEvent.nextOpponent = humanMatch.p2; + advance.setDisabled(true); FThreads.invokeInEdtNowOrLater(() -> Forge.setTransitionScreen(new TransitionScreen(() -> { duelScene.initDuels(WorldStage.getInstance().getPlayerSprite(), enemy, false, currentEvent); + advance.setDisabled(false); Forge.switchScene(duelScene); }, Forge.takeScreenshot(), true, false, false, false, "", Current.player().avatar(), enemy.getAtlasPath(), Current.player().getName(), enemy.getName(), humanMatch.p1.getRecord(), humanMatch.p2.getRecord()))); } else { finishRound(); + advance.setDisabled(false); } - advance.setDisabled(false); } AdventureEventData.AdventureEventMatch humanMatch = null;