diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index b649bd312c..88818b70f2 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -859,6 +859,10 @@ public class Block extends UnlockableContent implements Senseable{ return isVisible() && (!state.rules.bannedBlocks.contains(this) || state.rules.editor) && supportsEnv(state.rules.env); } + public boolean shouldConnect(Building build){ + return true; + } + /** @return whether this block supports a specific environment. */ public boolean supportsEnv(int env){ return (envEnabled & env) != 0 && (envDisabled & env) == 0 && (envRequired == 0 || (envRequired & env) == envRequired); diff --git a/core/src/mindustry/world/blocks/power/PowerNode.java b/core/src/mindustry/world/blocks/power/PowerNode.java index a47599bb18..1e76ef1867 100644 --- a/core/src/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/mindustry/world/blocks/power/PowerNode.java @@ -215,6 +215,7 @@ public class PowerNode extends PowerBlock{ overlaps(tile.x * tilesize + offset, tile.y * tilesize + offset, other.tile(), laserRange * tilesize) && other.team == team && !graphs.contains(other.power.graph) && !PowerNode.insulated(tile, other.tile) && + other.block.shouldConnect(other) && !(other instanceof PowerNodeBuild obuild && obuild.power.links.size >= ((PowerNode)obuild.block).maxNodes) && !Structs.contains(Edges.getEdges(size), p -> { //do not link to adjacent buildings var t = world.tile(tile.x + p.x, tile.y + p.y);