v0.6.2: adjusted weak floor room logic to prevent well visual clipping
This commit is contained in:
parent
50566234c7
commit
f67a2e561f
|
@ -41,34 +41,30 @@ public class WeakFloorRoom extends SpecialRoom {
|
|||
Door door = entrance();
|
||||
door.set( Door.Type.REGULAR );
|
||||
|
||||
if (door.x == left) {
|
||||
for (int i=top + 1; i < bottom; i++) {
|
||||
Painter.drawInside( level, this, new Point( left, i ), Random.IntRange( 1, width() - 3 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
} else if (door.x == right) {
|
||||
for (int i=top + 1; i < bottom; i++) {
|
||||
Painter.drawInside( level, this, new Point( right, i ), Random.IntRange( 1, width() - 3 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
} else if (door.y == top) {
|
||||
for (int i=left + 1; i < right; i++) {
|
||||
Painter.drawInside( level, this, new Point( i, top ), Random.IntRange( 1, height() - 3 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
} else if (door.y == bottom) {
|
||||
for (int i=left + 1; i < right; i++) {
|
||||
Painter.drawInside( level, this, new Point( i, bottom ), Random.IntRange( 1, height() - 3 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
}
|
||||
|
||||
Point well = null;
|
||||
|
||||
if (door.x == left) {
|
||||
for (int i=top + 1; i < bottom; i++) {
|
||||
Painter.drawInside( level, this, new Point( left, i ), Random.IntRange( 1, width() - 4 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
well = new Point( right-1, Random.Int( 2 ) == 0 ? top + 2 : bottom - 1 );
|
||||
} else if (door.x == right) {
|
||||
for (int i=top + 1; i < bottom; i++) {
|
||||
Painter.drawInside( level, this, new Point( right, i ), Random.IntRange( 1, width() - 4 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
well = new Point( left+1, Random.Int( 2 ) == 0 ? top + 2 : bottom - 1 );
|
||||
} else if (door.y == top) {
|
||||
for (int i=left + 1; i < right; i++) {
|
||||
Painter.drawInside( level, this, new Point( i, top ), Random.IntRange( 1, height() - 4 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
well = new Point( Random.Int( 2 ) == 0 ? left + 1 : right - 1, bottom-1 );
|
||||
} else if (door.y == bottom) {
|
||||
for (int i=left + 1; i < right; i++) {
|
||||
Painter.drawInside( level, this, new Point( i, bottom ), Random.IntRange( 1, height() - 4 ), Terrain.EMPTY_SP );
|
||||
}
|
||||
well = new Point( Random.Int( 2 ) == 0 ? left + 1 : right - 1, top+2 );
|
||||
}
|
||||
|
||||
Painter.set(level, well, Terrain.CHASM);
|
||||
CustomTiledVisual vis = new HiddenWell();
|
||||
vis.pos(well.x, well.y);
|
||||
|
|
Loading…
Reference in New Issue
Block a user