v3.1.1: enemies and items can no longer spawn on plants in plants room

This commit is contained in:
Evan Debenham
2025-06-16 15:57:46 -04:00
parent b62c3f2951
commit 31d00683bc

View File

@@ -108,6 +108,16 @@ public class PlantsRoom extends StandardRoom {
} }
} }
@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 {