Skip to content

Commit 25eaacd

Browse files
committed
Under liquid brush
1 parent aceeb45 commit 25eaacd

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/testing/editor/PainterTool.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import mindustry.editor.*;
1010
import mindustry.game.*;
1111
import mindustry.world.*;
12+
import mindustry.world.blocks.environment.*;
1213

1314
import static testing.util.TUVars.*;
1415

@@ -53,7 +54,7 @@ public void touchedLine(int x1, int y1, int x2, int y2){
5354
});
5455
}
5556
},
56-
pencil(true, "replace", "square", "drawteams", "drawdata"){
57+
pencil(true, "replace", "square", "drawteams", "underliquid", "drawdata"){
5758
{
5859
edit = true;
5960
draggable = true;
@@ -74,7 +75,12 @@ public void touched(int x, int y){
7475
case 2 -> { //draw teams
7576
painter.drawCircle(x, y, painter.brushSize, data -> data.setTeam(painter.drawTeam));
7677
}
77-
case 3 -> { //draw data
78+
case 3 -> { //Draw under liquid
79+
if(!(painter.drawBlock instanceof Floor f && f.isLiquid)){
80+
painter.drawBlocks(x, y, false, true, tile -> tile.floor().isLiquid);
81+
}
82+
}
83+
case 4 -> { //draw data
7884
painter.drawData(x, y);
7985
}
8086
}

0 commit comments

Comments
 (0)