mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-04 22:50:50 +07:00
Desert now a constant
This commit is contained in:
parent
894ec1ee6f
commit
384194c531
@ -13,6 +13,9 @@ class Constants{
|
||||
const val coast = "Coast"
|
||||
const val plains = "Plains"
|
||||
const val lakes = "Lakes"
|
||||
const val desert = "Desert"
|
||||
|
||||
|
||||
const val barbarianEncampment = "Barbarian encampment"
|
||||
const val ancientRuins = "Ancient ruins"
|
||||
|
||||
|
@ -188,7 +188,7 @@ class WorkerAutomation(val unit: MapUnit) {
|
||||
tile.terrainFeature == "Marsh" -> "Remove Marsh"
|
||||
tile.terrainFeature == Constants.forest -> "Lumber mill"
|
||||
tile.baseTerrain == Constants.hill -> "Mine"
|
||||
tile.baseTerrain in listOf("Grassland","Desert",Constants.plains) -> "Farm"
|
||||
tile.baseTerrain in listOf("Grassland",Constants.desert,Constants.plains) -> "Farm"
|
||||
tile.baseTerrain == "Tundra" -> "Trading post"
|
||||
else -> throw Exception("No improvement found for "+tile.baseTerrain)
|
||||
}
|
||||
|
@ -201,14 +201,14 @@ class CelluarAutomataRandomMapGenerator(): SeedRandomMapGenerator() {
|
||||
//change grassland to desert or tundra based on y
|
||||
if (abs(getLatitude(tile.position)) < maxLatitude * 0.1) {
|
||||
if (terrain == "Grassland" || terrain == "Tundra")
|
||||
terrain = "Desert"
|
||||
terrain = Constants.desert
|
||||
} else if (abs(getLatitude(tile.position)) > maxLatitude * 0.7) {
|
||||
if (terrain == "Grassland" || terrain == Constants.plains || terrain == "Desert" || terrain == Constants.ocean) {
|
||||
if (terrain == "Grassland" || terrain == Constants.plains || terrain == Constants.desert || terrain == Constants.ocean) {
|
||||
terrain = "Tundra"
|
||||
}
|
||||
} else {
|
||||
if (terrain == "Tundra") terrain = Constants.plains
|
||||
else if (terrain == "Desert") terrain = "Grassland"
|
||||
else if (terrain == Constants.desert) terrain = "Grassland"
|
||||
}
|
||||
|
||||
val area = Area(terrain)
|
||||
|
@ -229,7 +229,7 @@ class Building : NamedStats(), IConstruction{
|
||||
if (construction.isBuilt(name)) return "Already built"
|
||||
|
||||
if ("Must be next to desert" in uniques
|
||||
&& !construction.cityInfo.getCenterTile().getTilesInDistance(1).any { it.baseTerrain == "Desert" })
|
||||
&& !construction.cityInfo.getCenterTile().getTilesInDistance(1).any { it.baseTerrain == Constants.desert })
|
||||
return "Must be next to desert"
|
||||
|
||||
if ("Must be next to mountain" in uniques
|
||||
|
Loading…
Reference in New Issue
Block a user