diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 3e051df09..9d3874833 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -452,7 +452,7 @@ public abstract class RegularLevel extends Level { public int fallCell( boolean fallIntoPit ) { if (fallIntoPit) { for (Room room : rooms) { - if (room instanceof PitRoom || room.legacyType.equals("PIT")) { + if (room instanceof PitRoom) { int result; do { result = pointToCell(room.random()); @@ -482,9 +482,9 @@ public abstract class RegularLevel extends Level { rooms = new ArrayList<>( (Collection) ((Collection) bundle.getCollection( "rooms" )) ); for (Room r : rooms) { r.onLevelLoad( this ); - if (r instanceof EntranceRoom || r.legacyType.equals("ENTRANCE")){ + if (r instanceof EntranceRoom ){ roomEntrance = r; - } else if (r instanceof ExitRoom || r.legacyType.equals("EXIT")){ + } else if (r instanceof ExitRoom ){ roomExit = r; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/Room.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/Room.java index a2f014962..db6e7b723 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/Room.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/Room.java @@ -345,16 +345,12 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable { return edges; } - public String legacyType = "NULL"; - @Override public void storeInBundle( Bundle bundle ) { bundle.put( "left", left ); bundle.put( "top", top ); bundle.put( "right", right ); bundle.put( "bottom", bottom ); - if (!legacyType.equals("NULL")) - bundle.put( "type", legacyType ); } @Override @@ -363,11 +359,9 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable { top = bundle.getInt( "top" ); right = bundle.getInt( "right" ); bottom = bundle.getInt( "bottom" ); - if (bundle.contains( "type" )) - legacyType = bundle.getString( "type" ); } - //Note that currently connections and neighbours are not preserved on load + //FIXME currently connections and neighbours are not preserved on load public void onLevelLoad( Level level ){ //does nothing by default }