v3.3.2: moved custom vault rooms into proper static class definitions
This prevents internal error spam when attempting to initialize these rooms when loading the vault tester area
This commit is contained in:
@@ -47,11 +47,7 @@ import java.util.ArrayList;
|
||||
|
||||
public class VaultLevel extends CityLevel {
|
||||
|
||||
@Override
|
||||
protected ArrayList<Room> initRooms() {
|
||||
ArrayList<Room> initRooms = new ArrayList<>();
|
||||
|
||||
initRooms.add(roomEntrance = new EntranceRoom(){
|
||||
public static class VaultEntrance extends EntranceRoom {
|
||||
@Override
|
||||
public int maxConnections(int direction) {
|
||||
if (direction == LEFT || direction == TOP) return 0;
|
||||
@@ -62,18 +58,16 @@ public class VaultLevel extends CityLevel {
|
||||
public boolean canMerge(Level l, Room other, Point p, int mergeTerrain) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (int i = 0; i < 23; i++){
|
||||
initRooms.add(new SegmentedRoom(){
|
||||
public static class VaultSegmentedRoom extends SegmentedRoom {
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{1, 0, 0};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initRooms.add(new RegionDecoLineRoom(){
|
||||
public static class VaultRegionDecoLineRoom extends RegionDecoLineRoom{
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{0, 0, 1};
|
||||
@@ -89,11 +83,28 @@ public class VaultLevel extends CityLevel {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceItem(Point p, Level l) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Room other, Point p, int mergeTerrain) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ArrayList<Room> initRooms() {
|
||||
ArrayList<Room> initRooms = new ArrayList<>();
|
||||
|
||||
initRooms.add(roomEntrance = new VaultEntrance());
|
||||
|
||||
for (int i = 0; i < 23; i++){
|
||||
initRooms.add(new VaultSegmentedRoom());
|
||||
}
|
||||
|
||||
initRooms.add(new VaultRegionDecoLineRoom());
|
||||
|
||||
return initRooms;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user