v0.9.1: added a bit of chaos to larger tunnel/hall rooms with many doors
This commit is contained in:
@@ -76,6 +76,14 @@ public class TunnelRoom extends ConnectionRoom {
|
||||
Painter.drawLine( level, mid, end, floor );
|
||||
}
|
||||
|
||||
//fill in an extra diagonal tile at center randomly if we're a larger room with many connections
|
||||
if (width() >= 7 && height() >= 7 && connected.size() > 4 && c.square() == 0){
|
||||
Point p = new Point(c.left, c.top);
|
||||
p.x += Random.Int(2) == 0 ? 1 : -1;
|
||||
p.y += Random.Int(2) == 0 ? 1 : -1;
|
||||
Painter.set(level, p, floor);
|
||||
}
|
||||
|
||||
for (Door door : connected.values()) {
|
||||
door.set( Door.Type.TUNNEL );
|
||||
}
|
||||
|
||||
@@ -90,6 +90,14 @@ public class HallwayRoom extends StandardRoom {
|
||||
|
||||
}
|
||||
|
||||
//fill in an extra diagonal tile at center randomly if we're a larger room with many connections
|
||||
if (width() >= 7 && height() >= 7 && connected.size() > 4 && c.square() == 0){
|
||||
Point p = new Point(c.left, c.top);
|
||||
p.x += Random.Int(2) == 0 ? 1 : -1;
|
||||
p.y += Random.Int(2) == 0 ? 1 : -1;
|
||||
Painter.set(level, p, Terrain.EMPTY_SP);
|
||||
}
|
||||
|
||||
for (Door door : connected.values()) {
|
||||
door.set( Door.Type.REGULAR );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user