Add sensing of reconstructor config

This commit is contained in:
Anuken
2021-10-16 10:22:20 -04:00
parent 902f3695ee
commit bd329f57d6
3 changed files with 14 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ public class Planets implements ContentList{
@Override
public void load(){
sun = new Planet("sun", null, 4){{
sun = new Planet("sun", null, 4f){{
bloom = true;
accessible = false;
@@ -31,7 +31,7 @@ public class Planets implements ContentList{
);
}};
serpulo = new Planet("serpulo", sun, 1, 3){{
serpulo = new Planet("serpulo", sun, 1f, 3){{
generator = new SerpuloPlanetGenerator();
meshLoader = () -> new HexMesh(this, 6);
cloudMeshLoader = () -> new MultiMesh(

View File

@@ -132,6 +132,12 @@ public class Planet extends UnlockableContent{
}
}
/** @deprecated confusing parameter orer, use the other constructor instead */
@Deprecated
public Planet(String name, Planet parent, int sectorSize, float radius){
this(name, parent, radius, sectorSize);
}
public @Nullable Sector getLastSector(){
if(sectors.isEmpty()){
return null;

View File

@@ -185,6 +185,12 @@ public class Reconstructor extends UnitBlock{
Draw.rect(topRegion, x, y);
}
@Override
public Object senseObject(LAccess sensor){
if(sensor == LAccess.config) return unit();
return super.senseObject(sensor);
}
@Override
public void updateTile(){
boolean valid = false;