From 3e31ca13f8422831ddd1e0b13dc54cf766eef256 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 12 Sep 2024 16:01:27 -0400 Subject: [PATCH] v2.5.1: Fixed compass weirdness in prison boss level --- .../levels/PrisonBossLevel.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index 62d365823..ca18e0ddb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -209,6 +209,12 @@ public class PrisonBossLevel extends Level { for (Point p : startTorches){ Painter.set(this, p, Terrain.WALL_DECO); } + + //we set up the exit for consistently with other levels, even though it's in the walls + LevelTransition exit = new LevelTransition(this, pointToCell(levelExit), LevelTransition.Type.REGULAR_EXIT); + exit.right+=2; + exit.bottom+=3; + transitions.add(exit); } //area where items/chars are preserved when moving to the arena @@ -307,10 +313,13 @@ public class PrisonBossLevel extends Level { cell += width(); } - LevelTransition exit = new LevelTransition(this, pointToCell(levelExit), LevelTransition.Type.REGULAR_EXIT); - exit.right+=2; - exit.bottom+=3; - transitions.add(exit); + //pre-2.5.1 saves, if exit wasn't already added + if (exit() == entrance()) { + LevelTransition exit = new LevelTransition(this, pointToCell(levelExit), LevelTransition.Type.REGULAR_EXIT); + exit.right += 2; + exit.bottom += 3; + transitions.add(exit); + } } //keep track of removed items as the level is changed. Dump them back into the level at the end.