From e4ea5685ba51aa675f6cb197b390741419e55e53 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 14 Jan 2015 23:16:13 -0500 Subject: [PATCH] v0.2.3d: further tweaks, now actually fixes blacksmith bug --- .../shatteredpixeldungeon/levels/CavesLevel.java | 4 ++-- .../shatteredpixeldungeon/levels/CityLevel.java | 4 +++- .../shatteredpixeldungeon/levels/PrisonLevel.java | 4 +++- .../shatteredpixeldungeon/levels/RegularLevel.java | 7 +++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java index 555e5241d..bfe593be3 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java @@ -59,8 +59,8 @@ public class CavesLevel extends RegularLevel { } @Override - protected boolean build() { - if (!super.build()) return false; + protected boolean assignRoomType() { + super.assignRoomType(); if (!Blacksmith.Quest.spawn( rooms ) && Dungeon.depth == 14) return false; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java index 0fd7c886e..26c7e655f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/CityLevel.java @@ -54,7 +54,7 @@ public class CityLevel extends RegularLevel { } @Override - protected void assignRoomType() { + protected boolean assignRoomType() { super.assignRoomType(); for (Room r : rooms) { @@ -62,6 +62,8 @@ public class CityLevel extends RegularLevel { r.type = Type.PASSAGE; } } + + return true; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java index 504340edf..5e55a1878 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonLevel.java @@ -55,7 +55,7 @@ public class PrisonLevel extends RegularLevel { } @Override - protected void assignRoomType() { + protected boolean assignRoomType() { super.assignRoomType(); for (Room r : rooms) { @@ -63,6 +63,8 @@ public class PrisonLevel extends RegularLevel { r.type = Type.PASSAGE; } } + + return true; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index c75fdcdbe..c277ce0e3 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -148,7 +148,8 @@ public abstract class RegularLevel extends Level { //sorry warden, no lucky sungrass or blandfruit seeds for you! specials.remove( Room.Type.GARDEN ); } - assignRoomType(); + if (!assignRoomType()) + return false; paint(); paintWater(); @@ -178,7 +179,7 @@ public abstract class RegularLevel extends Level { return true; } - protected void assignRoomType() { + protected boolean assignRoomType() { int specialRooms = 0; @@ -266,6 +267,8 @@ public abstract class RegularLevel extends Level { count++; } } + + return true; } protected void paintWater() {