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));
|
||||
range = 4;
|
||||
hasPower = false;
|
||||
|
||||
((Conduit)reinforcedConduit).rotBridgeReplacement = this;
|
||||
}};
|
||||
|
||||
reinforcedLiquidRouter = new LiquidRouter("reinforced-liquid-router"){{
|
||||
|
||||
@@ -175,7 +175,7 @@ public class Placement{
|
||||
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;
|
||||
|
||||
//check for orthogonal placement + unlocked state
|
||||
|
||||
@@ -75,7 +75,7 @@ public class Duct extends Block implements Autotiler{
|
||||
|
||||
@Override
|
||||
public void handlePlacementLine(Seq<BuildPlan> plans){
|
||||
Placement.calculateDuctBridges(plans, (DuctBridge)Blocks.ductBridge);
|
||||
Placement.calculateBridges(plans, (DuctBridge)Blocks.ductBridge);
|
||||
}
|
||||
|
||||
public class DuctBuild extends Building{
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
||||
public @Load("@-cap") TextureRegion capRegion;
|
||||
|
||||
public boolean leaks = true;
|
||||
public @Nullable Block junctionReplacement, bridgeReplacement;
|
||||
public @Nullable Block junctionReplacement, bridgeReplacement, rotBridgeReplacement;
|
||||
|
||||
public Conduit(String name){
|
||||
super(name);
|
||||
@@ -87,7 +87,11 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
||||
public void handlePlacementLine(Seq<BuildPlan> plans){
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user