Unlock tweaks
This commit is contained in:
Binary file not shown.
@@ -88,6 +88,8 @@ public class Planet extends UnlockableContent{
|
|||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sectors.random().unlocked = true;
|
||||||
}else{
|
}else{
|
||||||
sectors = new Array<>();
|
sectors = new Array<>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class Sector{
|
|||||||
public final SectorData data;
|
public final SectorData data;
|
||||||
|
|
||||||
public @Nullable SaveSlot save;
|
public @Nullable SaveSlot save;
|
||||||
|
public boolean unlocked;
|
||||||
|
|
||||||
//TODO implement a dynamic (?) launch period
|
//TODO implement a dynamic (?) launch period
|
||||||
public int launchPeriod = 10;
|
public int launchPeriod = 10;
|
||||||
@@ -35,7 +36,7 @@ public class Sector{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean locked(){
|
public boolean locked(){
|
||||||
return true;
|
return !unlocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return light dot product in the range [0, 1]. */
|
/** @return light dot product in the range [0, 1]. */
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ public class PlanetDialog extends FloatingDialog{
|
|||||||
batch.proj().mul(planet.getTransform(mat));
|
batch.proj().mul(planet.getTransform(mat));
|
||||||
|
|
||||||
for(Sector sec : planet.sectors){
|
for(Sector sec : planet.sectors){
|
||||||
if(sec.save == null){
|
if(sec.locked()){
|
||||||
draw(sec, shadowColor, -0.001f);
|
draw(sec, shadowColor, -0.001f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ public class SectorDataGenerator{
|
|||||||
|
|
||||||
//50% water -> naval attribute
|
//50% water -> naval attribute
|
||||||
//TODO also select sectors with water spawns
|
//TODO also select sectors with water spawns
|
||||||
if((float)waterFloors / totalFloors >= 0.5f){
|
if((float)waterFloors / totalFloors >= 0.6f){
|
||||||
Log.info("Floor percentage for sector {0} : {1}", sector.id, (int)((float)waterFloors / totalFloors * 100));
|
|
||||||
data.attributes |= (1 << SectorAttribute.naval.ordinal());
|
data.attributes |= (1 << SectorAttribute.naval.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user