v0.9.1: further improvements to room merging logic
This commit is contained in:
parent
5655cdff1c
commit
772da815d6
|
@ -29,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.CaveRoom;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTileSheet;
|
||||
import com.watabou.utils.Random;
|
||||
import com.watabou.utils.Rect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -43,25 +42,9 @@ public class CavesPainter extends RegularPainter {
|
|||
int[] map = level.map;
|
||||
|
||||
for (Room r : rooms) {
|
||||
if (r instanceof StandardRoom && ((StandardRoom) r).joinable) {
|
||||
for (Room n : r.neigbours) {
|
||||
if (n instanceof StandardRoom && ((StandardRoom) n).joinable && !r.connected.containsKey( n )) {
|
||||
Rect i = r.intersect( n );
|
||||
if (i.left == i.right && i.bottom - i.top >= 3) {
|
||||
|
||||
i.top++;
|
||||
i.right++;
|
||||
|
||||
Painter.fill( level, i.left, i.top, 1, i.height(), Terrain.CHASM );
|
||||
|
||||
} else if (i.top == i.bottom && i.right - i.left >= 3) {
|
||||
|
||||
i.left++;
|
||||
i.bottom++;
|
||||
|
||||
Painter.fill( level, i.left, i.top, i.width(), 1, Terrain.CHASM );
|
||||
}
|
||||
}
|
||||
for (Room n : r.neigbours) {
|
||||
if (!r.connected.containsKey( n )) {
|
||||
mergeRooms(level, r, n, null, Terrain.CHASM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.painters;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Random;
|
||||
import com.watabou.utils.Rect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -65,25 +63,9 @@ public class HallsPainter extends RegularPainter {
|
|||
}
|
||||
|
||||
for (Room r : rooms) {
|
||||
if (r instanceof StandardRoom && ((StandardRoom) r).joinable) {
|
||||
for (Room n : r.neigbours) {
|
||||
if (n instanceof StandardRoom && ((StandardRoom) n).joinable && !r.connected.containsKey( n )) {
|
||||
Rect i = r.intersect( n );
|
||||
if (i.left == i.right && i.bottom - i.top >= 3) {
|
||||
|
||||
i.top++;
|
||||
i.right++;
|
||||
|
||||
Painter.fill( level, i.left, i.top, 1, i.height(), Terrain.CHASM );
|
||||
|
||||
} else if (i.top == i.bottom && i.right - i.left >= 3) {
|
||||
|
||||
i.left++;
|
||||
i.bottom++;
|
||||
|
||||
Painter.fill( level, i.left, i.top, i.width(), 1, Terrain.CHASM );
|
||||
}
|
||||
}
|
||||
for (Room n : r.neigbours) {
|
||||
if (!r.connected.containsKey( n )) {
|
||||
mergeRooms(level, r, n, null, Terrain.CHASM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,12 +177,18 @@ public abstract class RegularPainter extends Painter {
|
|||
hiddenDoorChance = (0.5f + hiddenDoorChance)/2f;
|
||||
}
|
||||
|
||||
roomMerges.clear();
|
||||
HashMap<Room, Room> roomMerges = new HashMap<>();
|
||||
|
||||
for (Room r : rooms) {
|
||||
for (Room n : r.connected.keySet()) {
|
||||
|
||||
if (joinRooms(l, r, n)) {
|
||||
|
||||
//normal sized rooms can be merged at most once. Large and Giant rooms can be merged many times
|
||||
if (roomMerges.get(r) == n || roomMerges.get(n) == r){
|
||||
continue;
|
||||
} else if (!roomMerges.containsKey(r) && !roomMerges.containsKey(n) &&
|
||||
mergeRooms(l, r, n, r.connected.get(n), Terrain.EMPTY)) {
|
||||
if (((StandardRoom) r).sizeCat == StandardRoom.SizeCategory.NORMAL) roomMerges.put(r, n);
|
||||
if (((StandardRoom) n).sizeCat == StandardRoom.SizeCategory.NORMAL) roomMerges.put(n, r);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -237,51 +243,60 @@ public abstract class RegularPainter extends Painter {
|
|||
}
|
||||
}
|
||||
|
||||
private HashMap<Room, Room> roomMerges = new HashMap<>();
|
||||
|
||||
protected boolean joinRooms( Level l, Room r, Room n ) {
|
||||
protected boolean mergeRooms( Level l, Room r, Room n, Point start, int mergeTerrain){
|
||||
|
||||
if (!(r instanceof StandardRoom) || !((StandardRoom) r).joinable
|
||||
|| !(n instanceof StandardRoom) || !((StandardRoom) n).joinable) {
|
||||
Rect intersect = r.intersect( n );
|
||||
if (intersect.left == intersect.right) {
|
||||
|
||||
Rect merge = new Rect();
|
||||
merge.left = merge.right = intersect.left;
|
||||
merge.top = merge.bottom = start != null ? start.y : intersect.center().y;
|
||||
|
||||
Point p = new Point(merge.left, merge.top);
|
||||
while(merge.top > intersect.top && n.canMerge(l, p, mergeTerrain) && r.canMerge(l, p, mergeTerrain)) {
|
||||
merge.top--;
|
||||
p.y--;
|
||||
}
|
||||
p.y = merge.bottom;
|
||||
while(merge.bottom < intersect.bottom && n.canMerge(l, p, mergeTerrain) && r.canMerge(l, p, mergeTerrain)) {
|
||||
merge.bottom++;
|
||||
p.y++;
|
||||
}
|
||||
|
||||
if (merge.height() >= 3) {
|
||||
Painter.fill(l, merge.left, merge.top + 1, 1, merge.height()-1, mergeTerrain);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else if (intersect.top == intersect.bottom) {
|
||||
|
||||
Rect merge = new Rect();
|
||||
merge.left = merge.right = start != null ? start.x : intersect.center().x;
|
||||
merge.top = merge.bottom = intersect.top;
|
||||
|
||||
Point p = new Point(merge.left, merge.top);
|
||||
while(merge.left > intersect.left && n.canMerge(l, p, mergeTerrain) && r.canMerge(l, p, mergeTerrain)) {
|
||||
merge.left--;
|
||||
p.x--;
|
||||
}
|
||||
p.x = merge.right;
|
||||
while(merge.right < intersect.right && n.canMerge(l, p, mergeTerrain) && r.canMerge(l, p, mergeTerrain)) {
|
||||
merge.right++;
|
||||
p.x++;
|
||||
}
|
||||
|
||||
if (merge.width() >= 3) {
|
||||
Painter.fill(l, merge.left + 1, merge.top, merge.width()-1, 1, mergeTerrain);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (roomMerges.get(r) == n) return true;
|
||||
if (roomMerges.get(n) == r) return true;
|
||||
if (roomMerges.containsKey(r)) return false;
|
||||
if (roomMerges.containsKey(n)) return false;
|
||||
|
||||
//TODO maybe more limitations here, such as limiting maximum width/height for normal sized rooms?
|
||||
|
||||
Rect w = r.intersect( n );
|
||||
if (w.left == w.right) {
|
||||
|
||||
if (w.bottom - w.top < 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
w.top++;
|
||||
w.right++;
|
||||
|
||||
Painter.fill( l, w.left, w.top, 1, w.height(), Terrain.EMPTY );
|
||||
|
||||
} else {
|
||||
|
||||
if (w.right - w.left < 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
w.left++;
|
||||
w.bottom++;
|
||||
|
||||
Painter.fill( l, w.left, w.top, w.width(), 1, Terrain.EMPTY );
|
||||
}
|
||||
|
||||
//normal sized rooms can be merged at most once. Large and Giant rooms can be merged many times
|
||||
if (((StandardRoom) r).sizeCat == StandardRoom.SizeCategory.NORMAL) roomMerges.put(r, n);
|
||||
if (((StandardRoom) n).sizeCat == StandardRoom.SizeCategory.NORMAL) roomMerges.put(n, r);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void paintWater( Level l, ArrayList<Room> rooms ){
|
||||
|
|
|
@ -115,6 +115,20 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public Point pointInside(Point from, int n){
|
||||
Point step = new Point(from);
|
||||
if (from.x == left) {
|
||||
step.offset( +n, 0 );
|
||||
} else if (from.x == right) {
|
||||
step.offset( -n, 0 );
|
||||
} else if (from.y == top) {
|
||||
step.offset( 0, +n );
|
||||
} else if (from.y == bottom) {
|
||||
step.offset( 0, -n );
|
||||
}
|
||||
return step;
|
||||
}
|
||||
|
||||
//Width and height are increased by 1 because rooms are inclusive to their right and bottom sides
|
||||
@Override
|
||||
|
@ -223,6 +237,10 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable {
|
|||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain){
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean addNeigbour( Room other ) {
|
||||
if (neigbours.contains(other))
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.watabou.utils.Point;
|
||||
import com.watabou.utils.Rect;
|
||||
|
||||
public class BridgeRoom extends TunnelRoom {
|
||||
|
@ -52,4 +53,9 @@ public class BridgeRoom extends TunnelRoom {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return mergeTerrain == Terrain.CHASM;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.watabou.utils.Point;
|
||||
import com.watabou.utils.Rect;
|
||||
|
||||
public class RingBridgeRoom extends RingTunnelRoom {
|
||||
|
@ -49,4 +50,9 @@ public class RingBridgeRoom extends RingTunnelRoom {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return mergeTerrain == Terrain.CHASM;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.watabou.utils.Point;
|
||||
import com.watabou.utils.Rect;
|
||||
|
||||
public class WalkwayRoom extends PerimeterRoom {
|
||||
|
@ -52,4 +53,9 @@ public class WalkwayRoom extends PerimeterRoom {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return mergeTerrain == Terrain.CHASM;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,21 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRo
|
|||
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.Tilemap;
|
||||
import com.watabou.utils.Point;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public abstract class GooBossRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{0, 1, 0};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static GooBossRoom randomGooRoom(){
|
||||
switch (Random.Int(4)){
|
||||
case 0: default:
|
||||
|
|
|
@ -29,15 +29,17 @@ import com.watabou.utils.Point;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
public class BurnedRoom extends PatchRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{4, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
int cell = l.pointToCell(pointInside(p, 1));
|
||||
return l.map[cell] == Terrain.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Level level) {
|
||||
|
|
|
@ -27,10 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
|||
|
||||
public class CaveRoom extends PatchRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{4, 2, 1};
|
||||
|
|
|
@ -28,10 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
|||
|
||||
public class ChasmRoom extends PatchRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{4, 2, 1};
|
||||
|
|
|
@ -29,10 +29,6 @@ import com.watabou.utils.Rect;
|
|||
|
||||
public class CircleBasinRoom extends PatchRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() { return sizeCat.minDim+1; }
|
||||
public int minHeight() {
|
||||
|
|
|
@ -27,10 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
|||
|
||||
public class CirclePitRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
return Math.max(8, super.minWidth());
|
||||
|
|
|
@ -32,10 +32,6 @@ import com.watabou.utils.Point;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
public class EntranceRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
|
@ -47,6 +43,11 @@ public class EntranceRoom extends StandardRoom {
|
|||
return Math.max(super.minHeight(), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void paint( Level level ) {
|
||||
|
||||
Painter.fill( level, this, Terrain.WALL );
|
||||
|
|
|
@ -32,10 +32,6 @@ import com.watabou.utils.Rect;
|
|||
|
||||
public class HallwayRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
return Math.max(5, super.minWidth());
|
||||
|
@ -46,6 +42,11 @@ public class HallwayRoom extends StandardRoom {
|
|||
return Math.max(5, super.minHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//FIXME lots of copy-pasta from tunnel rooms here
|
||||
@Override
|
||||
public void paint(Level level) {
|
||||
|
|
|
@ -26,19 +26,22 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ExplosiveTrap;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Point;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class MinefieldRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{4, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
int cell = l.pointToCell(pointInside(p, 1));
|
||||
return l.map[cell] == Terrain.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Level level) {
|
||||
Painter.fill( level, this, Terrain.WALL );
|
||||
|
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
import com.watabou.utils.Point;
|
||||
|
||||
public class RuinsRoom extends PatchRoom {
|
||||
|
||||
|
@ -31,7 +32,12 @@ public class RuinsRoom extends PatchRoom {
|
|||
public float[] sizeCatProbs() {
|
||||
return new float[]{4, 2, 1};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Level level) {
|
||||
Painter.fill( level, this, Terrain.WALL );
|
||||
|
|
|
@ -31,10 +31,6 @@ import com.watabou.utils.Rect;
|
|||
//FIXME some copypasta from segmented room with changed constants in here, might want to externalize
|
||||
public class SegmentedLibraryRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] sizeCatProbs() {
|
||||
return new float[]{0, 3, 1};
|
||||
|
|
|
@ -30,10 +30,6 @@ import com.watabou.utils.Rect;
|
|||
|
||||
public class SegmentedRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
return Math.max(super.minWidth(), 7);
|
||||
|
@ -48,7 +44,7 @@ public class SegmentedRoom extends StandardRoom {
|
|||
public float[] sizeCatProbs() {
|
||||
return new float[]{9, 3, 1};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void paint( Level level ) {
|
||||
Painter.fill( level, this, Terrain.WALL );
|
||||
|
|
|
@ -36,10 +36,6 @@ import java.util.ArrayList;
|
|||
|
||||
public class SewerPipeRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
return Math.max(7, super.minWidth());
|
||||
|
@ -55,6 +51,11 @@ public class SewerPipeRoom extends StandardRoom {
|
|||
return new float[]{4, 2, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(Point p) {
|
||||
//refuses connections next to corners
|
||||
|
|
|
@ -27,10 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
|||
|
||||
public class SkullsRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
return Math.max(7, super.minWidth());
|
||||
|
|
|
@ -22,17 +22,16 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.watabou.utils.Point;
|
||||
import com.watabou.utils.Random;
|
||||
import com.watabou.utils.Reflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class StandardRoom extends Room {
|
||||
|
||||
//whether this room can be joined with other standard rooms
|
||||
//should usually be set to false by rooms that substantially alter terrain
|
||||
public boolean joinable = true;
|
||||
|
||||
public enum SizeCategory {
|
||||
|
||||
|
@ -101,7 +100,13 @@ public abstract class StandardRoom extends Room {
|
|||
@Override
|
||||
public int minHeight() { return sizeCat.minDim; }
|
||||
public int maxHeight() { return sizeCat.maxDim; }
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canMerge(Level l, Point p, int mergeTerrain) {
|
||||
int cell = l.pointToCell(pointInside(p, 1));
|
||||
return (Terrain.flags[l.map[cell]] & Terrain.SOLID) == 0;
|
||||
}
|
||||
|
||||
//FIXME this is a very messy way of handing variable standard rooms
|
||||
private static ArrayList<Class<?extends StandardRoom>> rooms = new ArrayList<>();
|
||||
static {
|
||||
|
|
|
@ -30,10 +30,6 @@ import com.watabou.utils.Point;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
public class StudyRoom extends StandardRoom {
|
||||
|
||||
{
|
||||
joinable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minWidth() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user