diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 53532fdba9..44aa449427 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -549,3 +549,4 @@ 63143=armored-duct|block-armored-duct-ui 63142=anthicus|unit-anthicus-ui 63141=anthicus-missile|unit-anthicus-missile-ui +63140=shield-breaker|block-shield-breaker-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 4942751fab..534e2a396b 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 9651026dad..84a8b11f8d 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1782,12 +1782,14 @@ public class Blocks{ consumePower(5f); }}; - shieldBreaker = new BaseShield("shield-breaker"){{ + shieldBreaker = new ShieldBreaker("shield-breaker"){{ requirements(Category.effect, BuildVisibility.editorOnly, with()); size = 5; + toDestroy = new Block[]{Blocks.shieldProjector, Blocks.largeShieldProjector}; consumeItem(Items.tungsten, 100); + itemCapacity = 100; }}; //endregion diff --git a/core/src/mindustry/world/blocks/defense/BaseShield.java b/core/src/mindustry/world/blocks/defense/BaseShield.java index 7ec122c19a..fc9605d63b 100644 --- a/core/src/mindustry/world/blocks/defense/BaseShield.java +++ b/core/src/mindustry/world/blocks/defense/BaseShield.java @@ -58,6 +58,7 @@ public class BaseShield extends Block{ hasPower = true; update = solid = true; + rebuildable = false; } @Override diff --git a/core/src/mindustry/world/blocks/defense/ShieldBreaker.java b/core/src/mindustry/world/blocks/defense/ShieldBreaker.java index b0cda79ded..0368f1557e 100644 --- a/core/src/mindustry/world/blocks/defense/ShieldBreaker.java +++ b/core/src/mindustry/world/blocks/defense/ShieldBreaker.java @@ -1,7 +1,6 @@ package mindustry.world.blocks.defense; import arc.math.*; -import arc.util.*; import mindustry.*; import mindustry.content.*; import mindustry.entities.*; @@ -9,13 +8,14 @@ import mindustry.gen.*; import mindustry.world.*; public class ShieldBreaker extends Block{ - public @Nullable Block toDestroy; + public Block[] toDestroy = {}; public Effect effect = Fx.shockwave, breakEffect = Fx.reactorExplosion, selfKillEffect = Fx.massiveExplosion; public ShieldBreaker(String name){ super(name); solid = update = true; + rebuildable = false; } @Override @@ -28,19 +28,19 @@ public class ShieldBreaker extends Block{ @Override public void updateTile(){ if(Mathf.equal(efficiency, 1f)){ - if(toDestroy != null){ - effect.at(this); - for(var other : Vars.state.teams.active){ - if(team != other.team){ - other.getBuildings(toDestroy).copy().each(b -> { + effect.at(this); + for(var other : Vars.state.teams.active){ + if(team != other.team){ + for(var block : toDestroy){ + other.getBuildings(block).copy().each(b -> { breakEffect.at(b); b.kill(); }); } } - selfKillEffect.at(this); - kill(); } + selfKillEffect.at(this); + kill(); } } }