diff --git a/annotations/src/main/resources/revisions/BuilderUnitEntity/1.json b/annotations/src/main/resources/revisions/BuilderUnitEntity/1.json new file mode 100644 index 0000000000..23551d87ee --- /dev/null +++ b/annotations/src/main/resources/revisions/BuilderUnitEntity/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:drownTime,type:float,size:4},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:range,type:float,size:4},{name:rotation,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/LegsUnitEntity/1.json b/annotations/src/main/resources/revisions/LegsUnitEntity/1.json new file mode 100644 index 0000000000..8f4169f9d3 --- /dev/null +++ b/annotations/src/main/resources/revisions/LegsUnitEntity/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:baseRotation,type:float,size:4},{name:drownTime,type:float,size:4},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:range,type:float,size:4},{name:rotation,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/MinerUnitEntity/1.json b/annotations/src/main/resources/revisions/MinerUnitEntity/1.json new file mode 100644 index 0000000000..0321e5b69d --- /dev/null +++ b/annotations/src/main/resources/revisions/MinerUnitEntity/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:drownTime,type:float,size:4},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:range,type:float,size:4},{name:rotation,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/UnitEntity/1.json b/annotations/src/main/resources/revisions/UnitEntity/1.json new file mode 100644 index 0000000000..23551d87ee --- /dev/null +++ b/annotations/src/main/resources/revisions/UnitEntity/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:drownTime,type:float,size:4},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:range,type:float,size:4},{name:rotation,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/annotations/src/main/resources/revisions/UnitWaterMoveEntity/1.json b/annotations/src/main/resources/revisions/UnitWaterMoveEntity/1.json new file mode 100644 index 0000000000..23551d87ee --- /dev/null +++ b/annotations/src/main/resources/revisions/UnitWaterMoveEntity/1.json @@ -0,0 +1 @@ +{version:1,fields:[{name:drownTime,type:float,size:4},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:range,type:float,size:4},{name:rotation,type:float,size:4},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]} \ No newline at end of file diff --git a/core/assets/planets/TODO.dat b/core/assets/planets/TODO.dat index bc38622ff5..0c6f13e210 100644 Binary files a/core/assets/planets/TODO.dat and b/core/assets/planets/TODO.dat differ diff --git a/core/src/mindustry/maps/planet/TODOPlanetGenerator.java b/core/src/mindustry/maps/planet/TODOPlanetGenerator.java index ffeeb825a3..a2f518d404 100644 --- a/core/src/mindustry/maps/planet/TODOPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/TODOPlanetGenerator.java @@ -34,7 +34,6 @@ public class TODOPlanetGenerator extends PlanetGenerator{ {Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.ice, Blocks.iceSnow, Blocks.iceSnow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.ice, Blocks.ice, Blocks.ice} }; - Array ores = Array.with(Blocks.oreCopper, Blocks.oreLead, Blocks.oreCoal, Blocks.oreCopper); ObjectMap dec = ObjectMap.of( Blocks.sporeMoss, Blocks.sporeCluster, Blocks.moss, Blocks.sporeCluster @@ -195,7 +194,43 @@ public class TODOPlanetGenerator extends PlanetGenerator{ inverseFloodFill(tiles.getn(spawn.x, spawn.y)); - ores(ores); + Array ores = Array.with(Blocks.oreCopper, Blocks.oreLead); + float poles = Math.abs(sector.tile.v.y); + float nmag = 0.5f; + float scl = 1f; + float addscl = 1.3f; + + if(noise.octaveNoise3D(2, 0.5, scl, sector.tile.v.x, sector.tile.v.y, sector.tile.v.z)*nmag + poles > 0.25f*addscl){ + ores.add(Blocks.oreCoal); + } + + if(noise.octaveNoise3D(2, 0.5, scl, sector.tile.v.x + 1, sector.tile.v.y, sector.tile.v.z)*nmag + poles > 0.5f*addscl){ + ores.add(Blocks.oreTitanium); + } + + if(noise.octaveNoise3D(2, 0.5, scl, sector.tile.v.x + 2, sector.tile.v.y, sector.tile.v.z)*nmag + poles > 0.7f*addscl){ + ores.add(Blocks.oreThorium); + } + + FloatArray frequencies = new FloatArray(); + for(int i = 0; i < ores.size; i++){ + frequencies.add(rand.random(-0.05f, 0.05f)); + } + + pass((x, y) -> { + if(floor.asFloor().isLiquid) return; + + int offsetX = x - 4, offsetY = y + 23; + for(int i = ores.size - 1; i >= 0; i--){ + Block entry = ores.get(i); + float freq = frequencies.get(i); + if(Math.abs(0.5f - noise(offsetX, offsetY + i*999, 2, 0.7, (40 + i * 2))) > 0.26f && + Math.abs(0.5f - noise(offsetX, offsetY - i*999, 1, 1, (30 + i * 4))) > 0.37f + freq){ + ore = entry; + break; + } + } + }); for(Room espawn : enemies){ tiles.getn(espawn.x, espawn.y).setOverlay(Blocks.spawn);