Merged current Anuke master into branch
This commit is contained in:
@@ -32,4 +32,13 @@ public class Map{
|
||||
public String getDisplayName(){
|
||||
return meta.tags.get("name", name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "Map{" +
|
||||
"name='" + name + '\'' +
|
||||
", custom=" + custom +
|
||||
", meta=" + meta +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,13 @@ public class MapMeta{
|
||||
public boolean hasOreGen(){
|
||||
return !tags.get("oregen", "0").equals("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "MapMeta{" +
|
||||
"tags=" + tags +
|
||||
", width=" + width +
|
||||
", height=" + height +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TutorialSector{
|
||||
new ItemMission(Items.copper, 100).setMessage("$tutorial.morecopper"),
|
||||
|
||||
new BlockMission(TurretBlocks.duo).setMessage("$tutorial.turret"),
|
||||
//TODO fill turret with items mission
|
||||
/
|
||||
//new BlockMission(ProductionBlocks.mechanicalDrill).setMessage("$tutorial.drillturret"),
|
||||
|
||||
// Create a wave mission which spawns the core at 60, 60 rather than in the center of the map
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Generation{
|
||||
return tiles[x][y];
|
||||
}
|
||||
|
||||
//TODO implement
|
||||
Item drillItem(int x, int y, Drill block){
|
||||
if(block.isMultiblock()){
|
||||
Item result = null;
|
||||
|
||||
@@ -172,6 +172,25 @@ public class WorldGenerator{
|
||||
|
||||
prepareTiles(tiles);
|
||||
|
||||
for(int x = 0; x < width; x++){
|
||||
for(int y = 0; y < height; y++){
|
||||
Tile tile = tiles[x][y];
|
||||
|
||||
byte elevation = tile.getElevation();
|
||||
|
||||
for(GridPoint2 point : Geometry.d4){
|
||||
if(!Structs.inBounds(x + point.x, y + point.y, width, height)) continue;
|
||||
if(tiles[x + point.x][y + point.y].getElevation() < elevation){
|
||||
|
||||
if(sim2.octaveNoise2D(1, 1, 1.0 / 8, x, y) > 0.8){
|
||||
tile.setElevation(-1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
world.setBlock(tiles[spawns.get(0).x][spawns.get(0).y], StorageBlocks.core, Team.blue);
|
||||
|
||||
if(state.mode.isPvp){
|
||||
|
||||
Reference in New Issue
Block a user