Logic fixes / Bigger erekir sectors

This commit is contained in:
Anuken
2022-02-13 11:09:27 -05:00
parent 3039a404eb
commit d72153c67a
15 changed files with 147 additions and 31 deletions
@@ -34,7 +34,6 @@ public class LogicBlock extends Block{
public int maxInstructionScale = 5;
public int instructionsPerTick = 1;
public float range = 8 * 10;
public boolean privileged;
public LogicBlock(String name){
super(name);
@@ -535,7 +534,7 @@ public class LogicBlock extends Block{
}
public boolean validLink(Building other){
return other != null && other.isValid() && (privileged || (other.team == team && other.within(this, range + other.block.size*tilesize/2f))) && !(other instanceof ConstructBuild);
return other != null && other.isValid() && (privileged || (!other.block.privileged && other.team == team && other.within(this, range + other.block.size*tilesize/2f))) && !(other instanceof ConstructBuild);
}
@Override
@@ -33,6 +33,22 @@ public class MemoryBlock extends Block{
return false;
}
@Override
public boolean collide(Bullet other){
return !privileged;
}
@Override
public boolean displayable(){
return !privileged;
}
@Override
public void damage(float damage){
if(privileged) return;
super.damage(damage);
}
@Override
public void write(Writes write){
super.write(write);