Conduit padCorners

This commit is contained in:
Anuken 2023-06-19 10:28:54 -04:00
parent 509a6a28b5
commit 5c178c20a1
3 changed files with 5 additions and 2 deletions

Binary file not shown.

View file

@ -50,7 +50,8 @@ public class ControlPathfinder{
costLegs = (team, tile) ->
PathTile.legSolid(tile) ? impassable : 1 +
(PathTile.deep(tile) ? 6000 : 0),
(PathTile.deep(tile) ? 6000 : 0) +
(PathTile.solid(tile) ? 2 : 0),
costNaval = (team, tile) ->
//impassable same-team neutral block, or non-liquid

View file

@ -38,6 +38,8 @@ public class Conduit extends LiquidBlock implements Autotiler{
/** indices: [rotation] [fluid type] [frame] */
public TextureRegion[][][] rotateRegions;
/** If true, the liquid region is padded at corners, so it doesn't stick out. */
public boolean padCorners = true;
public boolean leaks = true;
public @Nullable Block junctionReplacement, bridgeReplacement, rotBridgeReplacement;
@ -188,7 +190,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
int wrapRot = (rotation + offset) % 4;
TextureRegion liquidr = bits == 1 ? rotateRegions[wrapRot][gas][frame] : renderer.fluidFrames[gas][frame];
if(bits == 1){
if(bits == 1 && padCorners){
ox = rotateOffsets[wrapRot][0];
oy = rotateOffsets[wrapRot][1];
}