v3.2.0: blacksmith room can no longer be adjacent to exit room
This commit is contained in:
committed by
Evan Debenham
parent
90ac1e42dc
commit
ce17b1f52a
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.LevelTransition;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BurningTrap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -105,6 +106,15 @@ public class BlacksmithRoom extends StandardRoom {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(Room r) {
|
||||
if (r.isExit()){
|
||||
//prevents confusion where smith exit and floor exit are very close to each other.
|
||||
return false;
|
||||
}
|
||||
return super.canConnect(r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceCharacter(Point p, Level l) {
|
||||
if (l.map[l.pointToCell(p)] == Terrain.EXIT){
|
||||
|
||||
Reference in New Issue
Block a user