Conduit bridge fixes
This commit is contained in:
@@ -1441,6 +1441,8 @@ public class Blocks implements ContentList{
|
|||||||
requirements(Category.liquid, with(Items.graphite, 4, Items.beryllium, 8));
|
requirements(Category.liquid, with(Items.graphite, 4, Items.beryllium, 8));
|
||||||
range = 4;
|
range = 4;
|
||||||
hasPower = false;
|
hasPower = false;
|
||||||
|
|
||||||
|
((Conduit)reinforcedConduit).rotBridgeReplacement = this;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
reinforcedLiquidRouter = new LiquidRouter("reinforced-liquid-router"){{
|
reinforcedLiquidRouter = new LiquidRouter("reinforced-liquid-router"){{
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class Placement{
|
|||||||
plans.set(result);
|
plans.set(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void calculateDuctBridges(Seq<BuildPlan> plans, DuctBridge bridge){
|
public static void calculateBridges(Seq<BuildPlan> plans, DirectionBridge bridge){
|
||||||
if(isSidePlace(plans)) return;
|
if(isSidePlace(plans)) return;
|
||||||
|
|
||||||
//check for orthogonal placement + unlocked state
|
//check for orthogonal placement + unlocked state
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class Duct extends Block implements Autotiler{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlePlacementLine(Seq<BuildPlan> plans){
|
public void handlePlacementLine(Seq<BuildPlan> plans){
|
||||||
Placement.calculateDuctBridges(plans, (DuctBridge)Blocks.ductBridge);
|
Placement.calculateBridges(plans, (DuctBridge)Blocks.ductBridge);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DuctBuild extends Building{
|
public class DuctBuild extends Building{
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
public @Load("@-cap") TextureRegion capRegion;
|
public @Load("@-cap") TextureRegion capRegion;
|
||||||
|
|
||||||
public boolean leaks = true;
|
public boolean leaks = true;
|
||||||
public @Nullable Block junctionReplacement, bridgeReplacement;
|
public @Nullable Block junctionReplacement, bridgeReplacement, rotBridgeReplacement;
|
||||||
|
|
||||||
public Conduit(String name){
|
public Conduit(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -87,7 +87,11 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
public void handlePlacementLine(Seq<BuildPlan> plans){
|
public void handlePlacementLine(Seq<BuildPlan> plans){
|
||||||
if(bridgeReplacement == null) return;
|
if(bridgeReplacement == null) return;
|
||||||
|
|
||||||
Placement.calculateBridges(plans, (ItemBridge)bridgeReplacement);
|
if(rotBridgeReplacement instanceof DirectionBridge duct){
|
||||||
|
Placement.calculateBridges(plans, duct);
|
||||||
|
}else{
|
||||||
|
Placement.calculateBridges(plans, (ItemBridge)bridgeReplacement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user