diff --git a/android/assets/game.atlas b/android/assets/game.atlas index cc5f2942be..c64b00d720 100644 --- a/android/assets/game.atlas +++ b/android/assets/game.atlas @@ -690,6 +690,20 @@ ImprovementIcons/Quarry orig: 100, 100 offset: 0, 0 index: -1 +ImprovementIcons/Railroad + rotate: false + xy: 1836, 821 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +OtherIcons/Railroad + rotate: false + xy: 1836, 821 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 ImprovementIcons/Road rotate: false xy: 245, 506 @@ -767,20 +781,6 @@ OtherIcons/Pentagon orig: 100, 100 offset: 0, 0 index: -1 -OtherIcons/Railroad - rotate: false - xy: 1836, 821 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 -ImprovementIcons/Railroad - rotate: false - xy: 1836, 821 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 OtherIcons/Shield rotate: false xy: 386, 609 diff --git a/android/build.gradle b/android/build.gradle index 01ba036856..ec82d7d45c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 28 - versionCode 179 - versionName "2.10.15" + versionCode 180 + versionName "2.10.16" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/logic/map/RandomMapGenerator.kt b/core/src/com/unciv/logic/map/RandomMapGenerator.kt index ef24a13519..b7d49b003e 100644 --- a/core/src/com/unciv/logic/map/RandomMapGenerator.kt +++ b/core/src/com/unciv/logic/map/RandomMapGenerator.kt @@ -28,7 +28,7 @@ class PerlinNoiseRandomMapGenerator:SeedRandomMapGenerator(){ setWaterTiles(mapToReturn) - for(tile in mapToReturn.values) randomizeTile(tile) + for(tile in mapToReturn.values) randomizeTile(tile,mapToReturn) return mapToReturn } @@ -41,7 +41,7 @@ class PerlinNoiseRandomMapGenerator:SeedRandomMapGenerator(){ + Perlin.noise(vector.x*ratio*2,vector.y*ratio*2,mapRandomSeed)/2 + Perlin.noise(vector.x*ratio*4,vector.y*ratio*4,mapRandomSeed)/4 when { -// height>0.4 -> tile.baseTerrain = "Hill" + height>0.8 -> tile.baseTerrain = "Mountain" height>0 -> tile.baseTerrain = "" // we'll leave this to the area division else -> tile.baseTerrain = "Ocean" } @@ -127,10 +127,9 @@ open class SeedRandomMapGenerator : RandomMapGenerator() { divideIntoAreas(6, waterPercent, map) val mapToReturn = HashMap() - for (entry in map){ - randomizeTile(entry.value) - mapToReturn[entry.key.toString()] = entry.value - } + + for (entry in map) mapToReturn[entry.key.toString()] = entry.value + for (entry in map) randomizeTile(entry.value, mapToReturn) setWaterTiles(mapToReturn) return mapToReturn @@ -139,7 +138,7 @@ open class SeedRandomMapGenerator : RandomMapGenerator() { fun divideIntoAreas(averageTilesPerArea: Int, waterPercent: Float, map: HashMap) { val areas = ArrayList() - val terrains = GameBasics.Terrains.values.filter { it.type === TerrainType.Land && it.name != "Lakes" } + val terrains = GameBasics.Terrains.values.filter { it.type === TerrainType.Land && it.name != "Lakes" && it.name != "Mountain" } while(map.values.any { it.baseTerrain=="" }) // the world could be split into lots off tiny islands, and every island deserves land types { @@ -277,24 +276,29 @@ open class RandomMapGenerator { } - private fun hasWaterTile(map: HashMap, vector: Vector2): Boolean { + private fun hasLandTile(map: HashMap, vector: Vector2): Boolean { return map.containsKey(vector.toString()) && map[vector.toString()]!!.getBaseTerrain().type == TerrainType.Land } fun setWaterTiles(map: HashMap) { for (tile in map.values.filter { it.baseTerrain == "Ocean" }) { - if (HexMath().getVectorsInDistance(tile.position,2).any { hasWaterTile(map,it) }) { + if (HexMath().getVectorsInDistance(tile.position,2).any { hasLandTile(map,it) }) { tile.baseTerrain = "Coast" tile.setTransients() } } } - fun randomizeTile(tileInfo: TileInfo){ + fun randomizeTile(tileInfo: TileInfo, map: HashMap){ if(tileInfo.getBaseTerrain().type==TerrainType.Land && Math.random()<0.05f){ tileInfo.baseTerrain = "Mountain" tileInfo.setTransients() } + if(tileInfo.getBaseTerrain().type==TerrainType.Land && Math.random()<0.05f + && HexMath().getVectorsInDistance(tileInfo.position,1).all { hasLandTile(map,it) }){ + tileInfo.baseTerrain = "Lakes" + tileInfo.setTransients() + } addRandomTerrainFeature(tileInfo) addRandomResourceToTile(tileInfo) maybeAddAncientRuins(tileInfo)