diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 7d5419a912..4e1e4a5c29 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -47,8 +47,8 @@ public class Logic implements ApplicationListener{ //blocks that get broken are appended to the team's broken block queue Tile tile = event.tile; Block block = tile.block(); - //skip null entities or nukes, for obvious reasons; also skip client since they can't modify these requests - if(tile.entity == null || tile.block() instanceof NuclearReactor || net.client()) return; + //skip null entities or un-rebuildables, for obvious reasons; also skip client since they can't modify these requests + if(tile.entity == null || !tile.block().rebuildable || net.client()) return; if(block instanceof BuildBlock){ diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 9bec4cd0f6..a0294013ad 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -55,6 +55,8 @@ public class Block extends BlockStorage{ public boolean rotate; /** whether you can break this with rightclick */ public boolean breakable; + /** whether to add this block to brokenblocks */ + public boolean rebuildable = true; /** whether this floor can be placed on. */ public boolean placeableOn = true; /** whether this block has insulating properties. */ diff --git a/core/src/mindustry/world/blocks/defense/ShockMine.java b/core/src/mindustry/world/blocks/defense/ShockMine.java index 4a2381e8ed..61864556b8 100644 --- a/core/src/mindustry/world/blocks/defense/ShockMine.java +++ b/core/src/mindustry/world/blocks/defense/ShockMine.java @@ -26,6 +26,7 @@ public class ShockMine extends Block{ solid = false; targetable = false; layer = Layer.overlay; + rebuildable = false; } @Override diff --git a/core/src/mindustry/world/blocks/power/NuclearReactor.java b/core/src/mindustry/world/blocks/power/NuclearReactor.java index 31f95f10a6..b583b3cfdf 100644 --- a/core/src/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/mindustry/world/blocks/power/NuclearReactor.java @@ -46,6 +46,7 @@ public class NuclearReactor extends PowerGenerator{ hasItems = true; hasLiquids = true; entityType = NuclearReactorEntity::new; + rebuildable = false; } @Override