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 @Override
public void load(){ public void load(){
sun = new Planet("sun", null, 4){{ sun = new Planet("sun", null, 4f){{
bloom = true; bloom = true;
accessible = false; 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(); generator = new SerpuloPlanetGenerator();
meshLoader = () -> new HexMesh(this, 6); meshLoader = () -> new HexMesh(this, 6);
cloudMeshLoader = () -> new MultiMesh( 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(){ public @Nullable Sector getLastSector(){
if(sectors.isEmpty()){ if(sectors.isEmpty()){
return null; return null;

View File

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