v1.4.0: made aquarium rooms more fair
This commit is contained in:
@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha;
|
||||
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 AquariumRoom extends StandardRoom {
|
||||
|
||||
@@ -43,6 +44,16 @@ public class AquariumRoom extends StandardRoom {
|
||||
return new float[]{3, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceItem(Point p, Level l) {
|
||||
return super.canPlaceItem(p, l) && l.map[l.pointToCell(p)] != Terrain.WATER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceCharacter(Point p, Level l) {
|
||||
return super.canPlaceCharacter(p, l) && l.map[l.pointToCell(p)] != Terrain.WATER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paint(Level level) {
|
||||
Painter.fill( level, this, Terrain.WALL );
|
||||
|
||||
Reference in New Issue
Block a user