v3.1.1: enemies and items can no longer spawn on plants in plants room
This commit is contained in:
@@ -107,7 +107,17 @@ public class PlantsRoom extends StandardRoom {
|
|||||||
door.set( Door.Type.REGULAR );
|
door.set( Door.Type.REGULAR );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlaceItem(Point p, Level l) {
|
||||||
|
return super.canPlaceItem(p, l) && l.plants.get(l.pointToCell(p)) == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlaceCharacter(Point p, Level l) {
|
||||||
|
return super.canPlaceCharacter(p, l) && l.plants.get(l.pointToCell(p)) == null;
|
||||||
|
}
|
||||||
|
|
||||||
private static Plant.Seed randomSeed(){
|
private static Plant.Seed randomSeed(){
|
||||||
Plant.Seed result;
|
Plant.Seed result;
|
||||||
do {
|
do {
|
||||||
|
|||||||
Reference in New Issue
Block a user