Added T3 logic processor
This commit is contained in:
@@ -237,7 +237,7 @@ public abstract class Turret extends Block{
|
||||
canShoot = unit.isShooting();
|
||||
}else if(logicControlled()){ //logic behavior
|
||||
canShoot = logicShooting;
|
||||
}else{ //default AI behavior
|
||||
}else if(peekAmmo() != null){ //default AI behavior
|
||||
BulletType type = peekAmmo();
|
||||
float speed = type.speed;
|
||||
//slow bullets never intersect
|
||||
|
||||
@@ -17,6 +17,7 @@ import mindustry.logic.LExecutor.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.BuildBlock.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.zip.*;
|
||||
@@ -113,6 +114,14 @@ public class LogicBlock extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
stats.add(BlockStat.linkRange, range / 8, StatUnit.blocks);
|
||||
stats.add(BlockStat.instructions, instructionsPerTick * 60, StatUnit.perSecond);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
Drawf.circles(x*tilesize + offset, y*tilesize + offset, range);
|
||||
@@ -340,7 +349,7 @@ public class LogicBlock extends Block{
|
||||
updateCode();
|
||||
}
|
||||
|
||||
accumulator += edelta() * instructionsPerTick;
|
||||
accumulator += edelta() * instructionsPerTick * (consValid() ? 1 : 0);
|
||||
|
||||
if(accumulator > maxInstructionScale * instructionsPerTick) accumulator = maxInstructionScale * instructionsPerTick;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user