v0.6.0b: fixed further errors in mob spawning logic

This commit is contained in:
Evan Debenham 2017-06-11 04:18:11 -04:00
parent 4b038a1f66
commit 61f4a909c5

View File

@ -198,12 +198,13 @@ public abstract class RegularLevel extends Level {
ArrayList<Room> stdRooms = new ArrayList<>(); ArrayList<Room> stdRooms = new ArrayList<>();
for (Room room : rooms) { for (Room room : rooms) {
//pre-0.6.0 save compatibility if (room instanceof StandardRoom && room != roomEntrance) {
if ((room instanceof StandardRoom || room.legacyType.equals("STANDARD"))
&& room != roomEntrance) {
for (int i = 0; i < ((StandardRoom) room).sizeCat.roomValue; i++) { for (int i = 0; i < ((StandardRoom) room).sizeCat.roomValue; i++) {
stdRooms.add(room); stdRooms.add(room);
} }
//pre-0.6.0 save compatibility
} else if (room.legacyType.equals("STANDARD")){
stdRooms.add(room);
} }
} }
Random.shuffle(stdRooms); Random.shuffle(stdRooms);