Fixed world processors being targetable

This commit is contained in:
Anuken
2022-02-10 13:46:20 -05:00
parent 8f676cf6c3
commit dcfbd9b6e2
5 changed files with 14 additions and 4 deletions

View File

@@ -3816,6 +3816,7 @@ public class Blocks{
requirements(Category.logic, BuildVisibility.editorOnly, with());
//TODO customizable IPT
targetable = false;
instructionsPerTick = 8;
forceDark = true;
privileged = true;

View File

@@ -3140,7 +3140,7 @@ public class UnitTypes{
mineTier = 4;
buildSpeed = 0.8f;
drag = 0.08f;
speed = 5.3f;
speed = 5.4f;
rotateSpeed = 7f;
accel = 0.09f;
itemCapacity = 60;
@@ -3197,7 +3197,7 @@ public class UnitTypes{
mineTier = 4;
buildSpeed = 1.1f;
drag = 0.08f;
speed = 6.5f;
speed = 6.6f;
rotateSpeed = 8f;
accel = 0.09f;
itemCapacity = 90;
@@ -3266,7 +3266,7 @@ public class UnitTypes{
mineTier = 4;
buildSpeed = 1.4f;
drag = 0.08f;
speed = 7.3f;
speed = 7.4f;
rotateSpeed = 8f;
accel = 0.08f;
itemCapacity = 110;

View File

@@ -1264,6 +1264,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return items;
}
public boolean displayable(){
return true;
}
@Override
public void display(Table table){
//display the block stuff

View File

@@ -479,7 +479,7 @@ public class PlacementFragment extends Fragment{
Tile hoverTile = world.tileWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
if(hoverTile != null){
//if the tile has a building, display it
if(hoverTile.build != null){
if(hoverTile.build != null && hoverTile.build.displayable()){
hoverTile.build.updateFlow = true;
return hoverTile.build;
}

View File

@@ -381,6 +381,11 @@ public class LogicBlock extends Block{
return !privileged;
}
@Override
public boolean displayable(){
return accessible();
}
@Override
public void damage(float damage){
if(!privileged){