Planet sector metadata
This commit is contained in:
@@ -49,7 +49,7 @@ public class MapGenerator extends Generator{
|
||||
|
||||
for(Tile tile : tiles){
|
||||
if(tile.block() instanceof StorageBlock && !(tile.block() instanceof CoreBlock) && world.getSector() != null){
|
||||
for(Content content : world.getSector().resources){
|
||||
for(Content content : world.getSector().data.resources){
|
||||
if(content instanceof Item && Mathf.chance(0.3)){
|
||||
tile.entity.items().add((Item)content, Math.min(Mathf.random(500), tile.block().itemCapacity));
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ public class TestPlanetGenerator implements PlanetGenerator{
|
||||
height *= 1.2f;
|
||||
height = Mathf.clamp(height);
|
||||
|
||||
|
||||
return arr[Mathf.clamp((int)(temp * arr.length), 0, arr.length - 1)][Mathf.clamp((int)(height * arr[0].length), 0, arr[0].length - 1)];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user