Planet sector metadata

This commit is contained in:
Anuken
2020-02-14 20:08:07 -05:00
parent 7f56cdc1e9
commit 024f2d62e2
12 changed files with 173 additions and 15 deletions

View File

@@ -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));
}

View File

@@ -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)];
}
}