Bugfixes, cleanup / Created stub processor class

This commit is contained in:
Anuken
2020-03-17 11:51:33 -04:00
parent 08488857da
commit 0ed21a1d5f
6 changed files with 58 additions and 39 deletions
+4
View File
@@ -497,6 +497,10 @@ public class Tile implements Position{
other.entity = null;
}
other.block = Blocks.air;
//manually call changed event
other.updateOcclusion();
world.notifyChanged(other);
}
}
}
@@ -21,8 +21,7 @@ public class BurstTurret extends ItemTurret{
for(int i = 0; i < shots; i++){
Time.run(burstSpacing * i, () -> {
if(!(tile.entity instanceof TurretEntity) ||
!hasAmmo()) return;
if(!(tile.entity instanceof TurretEntity) || !hasAmmo()) return;
recoil = recoilAmount;
@@ -0,0 +1,37 @@
package mindustry.world.blocks.logic;
import arc.scene.ui.layout.*;
import arc.struct.*;
import mindustry.gen.*;
import mindustry.world.*;
public class ProcessorBlock extends Block{
public ProcessorBlock(String name){
super(name);
configurable = true;
}
public class ProcessorEntity extends TileEntity{
//all tiles in the block network - does not include itself
Array<Tilec> network = new Array<>();
@Override
public boolean onConfigureTileTapped(Tilec other){
if(other == this) return true;
if(!network.contains(other)){
network.add(other);
}else{
network.remove(other);
}
return false;
}
@Override
public void buildConfiguration(Table table){
super.buildConfiguration(table);
}
}
}