v0.9.1: tweaked grass/water/trap placement logic for room merges

This commit is contained in:
Evan Debenham 2020-10-21 13:24:01 -04:00
parent ac8a79ee54
commit 1298ab426c
2 changed files with 6 additions and 6 deletions

View File

@ -265,7 +265,7 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable {
//whether or not a painter can make its own modifications to a specific point
public boolean canPlaceWater(Point p){
return inside(p);
return true;
}
public final ArrayList<Point> waterPlaceablePoints(){
@ -281,7 +281,7 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable {
//whether or not a painter can make place grass at a specific point
public boolean canPlaceGrass(Point p){
return inside(p);
return true;
}
public final ArrayList<Point> grassPlaceablePoints(){
@ -297,7 +297,7 @@ public abstract class Room extends Rect implements Graph.Node, Bundlable {
//whether or not a painter can place a trap at a specific point
public boolean canPlaceTrap(Point p){
return inside(p);
return true;
}
public final ArrayList<Point> trapPlaceablePoints(){

View File

@ -83,17 +83,17 @@ public class BurnedRoom extends PatchRoom {
@Override
public boolean canPlaceWater(Point p) {
return super.canPlaceWater(p) && !patch[xyToPatchCoords(p.x, p.y)];
return !inside(p) || !patch[xyToPatchCoords(p.x, p.y)];
}
@Override
public boolean canPlaceGrass(Point p) {
return super.canPlaceGrass(p) && !patch[xyToPatchCoords(p.x, p.y)];
return !inside(p) || !patch[xyToPatchCoords(p.x, p.y)];
}
@Override
public boolean canPlaceTrap(Point p) {
return super.canPlaceTrap(p) && !patch[xyToPatchCoords(p.x, p.y)];
return !inside(p) || !patch[xyToPatchCoords(p.x, p.y)];
}
}