Internal changes for surface-less floors

This commit is contained in:
Anuken
2020-10-08 14:44:02 -04:00
parent 6aa1144429
commit f14d631ff9
11 changed files with 21 additions and 13 deletions

View File

@@ -26,7 +26,7 @@ public class EditorTile extends Tile{
if(type instanceof OverlayFloor){
//don't place on liquids
if(!floor.isLiquid){
if(floor.hasSurface()){
setOverlayID(type.id);
}
return;

View File

@@ -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().isLiquid;
tester = t -> t.overlay() == dest && t.floor().hasSurface();
setter = t -> t.setOverlay(editor.drawBlock);
}else if(editor.drawBlock.isFloor()){
Block dest = tile.floor();

View File

@@ -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().isLiquid ? 0 : ore.id;
this.ore = !floor.asFloor().hasSurface() ? 0 : ore.id;
this.team = (byte)team.id;
}