Allowed enemy spawns on water
This commit is contained in:
@@ -26,7 +26,7 @@ public class EditorTile extends Tile{
|
||||
|
||||
if(type instanceof OverlayFloor){
|
||||
//don't place on liquids
|
||||
if(floor.hasSurface()){
|
||||
if(floor.hasSurface() || !type.needsSurface){
|
||||
setOverlayID(type.id);
|
||||
}
|
||||
return;
|
||||
@@ -75,7 +75,7 @@ public class EditorTile extends Tile{
|
||||
return;
|
||||
}
|
||||
|
||||
if(floor.isLiquid) return;
|
||||
if(!floor.hasSurface() && overlay.asFloor().needsSurface) return;
|
||||
if(overlay() == overlay) return;
|
||||
op(OpType.overlay, this.overlay.id);
|
||||
super.setOverlay(overlay);
|
||||
|
||||
@@ -118,7 +118,7 @@ public enum EditorTool{
|
||||
if(editor.drawBlock.isOverlay()){
|
||||
Block dest = tile.overlay();
|
||||
if(dest == editor.drawBlock) return;
|
||||
tester = t -> t.overlay() == dest && t.floor().hasSurface();
|
||||
tester = t -> t.overlay() == dest && (t.floor().hasSurface() || !t.floor().needsSurface);
|
||||
setter = t -> t.setOverlay(editor.drawBlock);
|
||||
}else if(editor.drawBlock.isFloor()){
|
||||
Block dest = tile.floor();
|
||||
|
||||
@@ -417,7 +417,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
public void set(Block floor, Block wall, Block ore, Team team){
|
||||
this.floor = floor.id;
|
||||
this.block = wall.id;
|
||||
this.ore = !floor.asFloor().hasSurface() ? 0 : ore.id;
|
||||
this.ore = (!floor.asFloor().hasSurface() && ore.asFloor().needsSurface) ? 0 : ore.id;
|
||||
this.team = (byte)team.id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user