diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index c91a3fcb7f..046b2128cb 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -80,6 +80,8 @@ public class Rules{ public Seq weather = new Seq<>(1); /** Blocks that cannot be placed. */ public ObjectSet bannedBlocks = new ObjectSet<>(); + /** Reveals blocks normally hidden by build visibility */ + public ObjectSet revealedBlocks = new ObjectSet<>(); /** Unlocked content names. Only used in multiplayer when the campaign is enabled. */ public ObjectSet researched = new ObjectSet<>(); /** Whether ambient lighting is enabled. */ diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 1f8db5bd97..0f42b15b89 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -522,7 +522,7 @@ public class Block extends UnlockableContent{ } public boolean isVisible(){ - return buildVisibility.visible() && !isHidden(); + return (buildVisibility.visible() || state.rules.revealedBlocks.contains(this)) && !isHidden(); } public boolean isPlaceable(){ @@ -718,7 +718,7 @@ public class Block extends UnlockableContent{ @Override public boolean isHidden(){ - return !buildVisibility.visible(); + return !buildVisibility.visible() && !state.rules.revealedBlocks.contains(this); } @Override