Removed shield breaker block

This commit is contained in:
Anuken
2022-09-04 16:32:13 -04:00
parent 19d26a0593
commit 08d5ca1912
11 changed files with 32 additions and 66 deletions

View File

@@ -1863,17 +1863,6 @@ public class Blocks{
consumePower(5f);
}};
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;
scaledHealth = 120f;
}};
//endregion
//region distribution

View File

@@ -19,7 +19,7 @@ public class LCategory implements Comparable<LCategory>{
operation = new LCategory("operation", Pal.logicOperations, Icon.settingsSmall),
control = new LCategory("control", Pal.logicControl, Icon.rotateSmall),
unit = new LCategory("unit", Pal.logicUnits, Icon.unitsSmall),
world = new LCategory("world", Pal.logicWorld, Icon.terminalSmall);
world = new LCategory("world", Pal.logicWorld, Icon.terrainSmall);
public final String name;
public final int id;

View File

@@ -1084,7 +1084,6 @@ public class LExecutor{
public int value;
public float curTime;
public double wait;
public long frameId;
public WaitI(int value){
@@ -1110,6 +1109,15 @@ public class LExecutor{
}
}
public static class StopI implements LInstruction{
@Override
public void run(LExecutor exec){
//skip back to self.
exec.var(varCounter).numval --;
}
}
//TODO inverse lookup
public static class LookupI implements LInstruction{
public int dest;

View File

@@ -675,7 +675,25 @@ public class LStatements{
@Override
public LCategory category(){
return LCategory.operation;
return LCategory.control;
}
}
@RegisterStatement("stop")
public static class StopStatement extends LStatement{
@Override
public void build(Table table){
}
@Override
public LInstruction build(LAssembler builder){
return new StopI();
}
@Override
public LCategory category(){
return LCategory.control;
}
}

View File

@@ -163,8 +163,6 @@ public class ClassMap{
classes.put("RadarBuild", mindustry.world.blocks.defense.Radar.RadarBuild.class);
classes.put("RegenProjector", mindustry.world.blocks.defense.RegenProjector.class);
classes.put("RegenProjectorBuild", mindustry.world.blocks.defense.RegenProjector.RegenProjectorBuild.class);
classes.put("ShieldBreaker", mindustry.world.blocks.defense.ShieldBreaker.class);
classes.put("ShieldBreakerBuild", mindustry.world.blocks.defense.ShieldBreaker.ShieldBreakerBuild.class);
classes.put("ShieldWall", mindustry.world.blocks.defense.ShieldWall.class);
classes.put("ShieldWallBuild", mindustry.world.blocks.defense.ShieldWall.ShieldWallBuild.class);
classes.put("ShockMine", mindustry.world.blocks.defense.ShockMine.class);

View File

@@ -241,7 +241,7 @@ public class CustomRulesDialog extends BaseDialog{
t.button("@rules.anyenv", style, () -> {
//unlocalized for now
ui.showInfo("[accent]'Any' environment, or 'mixed tech', is no longer allowed.[]\n\nReasoning: Serpulo and Erekir tech were never meant to be used in the same map. They are not compatible.\nI have received far too many complains in this regard.");
ui.showInfo("[accent]'Any' environment, or 'mixed tech', is no longer allowed.[]\n\nReasoning: Serpulo and Erekir tech were never meant to be used in the same map. They are not compatible or remotely balanced.\nI have received far too many complains in this regard.");
//rules.env = Vars.defaultEnv;
//rules.hiddenBuildItems.clear();

View File

@@ -1,47 +0,0 @@
package mindustry.world.blocks.defense;
import arc.math.*;
import mindustry.*;
import mindustry.content.*;
import mindustry.entities.*;
import mindustry.gen.*;
import mindustry.world.*;
public class ShieldBreaker extends Block{
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
public boolean canBreak(Tile tile){
return Vars.state.isEditor();
}
public class ShieldBreakerBuild extends Building{
@Override
public void updateTile(){
if(Mathf.equal(efficiency, 1f)){
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();
}
}
}
}