diff --git a/core/src/mindustry/maps/planet/TODOPlanetGenerator.java b/core/src/mindustry/maps/planet/TODOPlanetGenerator.java index 2880ddac27..ffeeb825a3 100644 --- a/core/src/mindustry/maps/planet/TODOPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/TODOPlanetGenerator.java @@ -125,7 +125,7 @@ public class TODOPlanetGenerator extends PlanetGenerator{ float constraint = 1.3f; float radius = width / 2f / Mathf.sqrt3; - int rooms = rand.random(2, 5)/* - 1*/; + int rooms = rand.random(2, 5) - 1; Array array = new Array<>(); for(int i = 0; i < rooms; i++){ @@ -139,6 +139,8 @@ public class TODOPlanetGenerator extends PlanetGenerator{ //check positions on the map to place the player spawn. this needs to be in the corner of the map Room spawn = null; + Array enemies = new Array<>(); + int enemySpawns = rand.chance(0.3) ? 2 : 1; int offset = rand.nextInt(360); float length = width/2.55f - rand.random(13, 23); int angleStep = 5; @@ -162,6 +164,15 @@ public class TODOPlanetGenerator extends PlanetGenerator{ if(waterTiles <= 4 || (i + angleStep >= 360)){ array.add(spawn = new Room(cx, cy, rand.random(8, 15))); + + for(int j = 0; j < enemySpawns; j++){ + float enemyOffset = rand.range(60f); + Tmp.v1.set(cx - width/2, cy - height/2).rotate(180f + enemyOffset).add(width/2, height/2); + Room espawn = new Room((int)Tmp.v1.x, (int)Tmp.v1.y, rand.random(8, 15)); + array.add(espawn); + enemies.add(espawn); + } + break; } } @@ -186,9 +197,9 @@ public class TODOPlanetGenerator extends PlanetGenerator{ ores(ores); - Room target = spawn; - Room furthest = array.max(r -> Mathf.dst(r.x, r.y, target.x, target.y)); - tiles.getn(furthest.x, furthest.y).setOverlay(Blocks.spawn); + for(Room espawn : enemies){ + tiles.getn(espawn.x, espawn.y).setOverlay(Blocks.spawn); + } trimDark(); diff --git a/gradle.properties b/gradle.properties index e4c388296b..5875b3b243 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=ff7229bd2071e3fabb9bdc0b18ef6ca90e3200f7 +archash=c1e97cab1dd143cf49d3c694a6a2e150f742e291 diff --git a/tools/src/mindustry/tools/SectorDataGenerator.java b/tools/src/mindustry/tools/SectorDataGenerator.java index ba1909b8f9..d76a24752c 100644 --- a/tools/src/mindustry/tools/SectorDataGenerator.java +++ b/tools/src/mindustry/tools/SectorDataGenerator.java @@ -95,12 +95,12 @@ public class SectorDataGenerator{ } if(waterFloors / totalFloors >= 0.6f){ - Log.info("Sector {0} has {1}/{2} water -> naval", sector.id, waterFloors, totalFloors); + Log.debug("Sector {0} has {1}/{2} water -> naval", sector.id, waterFloors, totalFloors); } //naval sector guaranteed if(nearTiles > 4){ - Log.info("Sector {0} has {1} water tiles at {2} {3} -> naval", sector.id, nearTiles, cx, cy); + Log.debug("Sector {0} has {1} water tiles at {2} {3} -> naval", sector.id, nearTiles, cx, cy); waterFloors = totalFloors; }