mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Fixed idiotic bug that caused the game to crash =(
This commit is contained in:
parent
d12b665e83
commit
4c4abb452c
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.game"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 49
|
||||
versionName "2.1.0"
|
||||
versionCode 52
|
||||
versionName "2.1.2"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -84,6 +84,7 @@ class UnitAutomation{
|
||||
val closestCityWithoutUnit = reachableCitiesWithoutUnits
|
||||
.minBy { unit.movementAlgs().getShortestPath(it.getCenterTile()).size }!!
|
||||
unit.movementAlgs().headTowards(closestCityWithoutUnit.getCenterTile())
|
||||
return
|
||||
}
|
||||
|
||||
if (unit.health < 80) {
|
||||
|
@ -88,6 +88,7 @@ class CityInfo {
|
||||
// we need to check which other cities exist globally and name accordingly
|
||||
val allExistingCityNames = civInfo.gameInfo.civilizations.flatMap { it.cities }.map { it.name }.toHashSet()
|
||||
name = civInfo.getCivilization().cities.first { !allExistingCityNames.contains(it) }
|
||||
|
||||
this.location = cityLocation
|
||||
civInfo.cities.add(this)
|
||||
if(civInfo == civInfo.gameInfo.getPlayerCivilization())
|
||||
@ -135,7 +136,7 @@ class CityInfo {
|
||||
|
||||
|
||||
internal fun getMaxHealth(): Int {
|
||||
return 200 // add more later when walls citadl etc.
|
||||
return 200 // add more later when walls citadel etc.
|
||||
}
|
||||
|
||||
override fun toString(): String {return name} // for debug
|
||||
|
@ -27,7 +27,7 @@ class CivStatsTable(val screen: WorldScreen) : Table() {
|
||||
background = civBackground.tint(Color(0x004085e0))
|
||||
|
||||
val resourceTable = Table()
|
||||
resourceTable.defaults().pad(10f)
|
||||
resourceTable.defaults().pad(5f)
|
||||
val revealedStrategicResources = GameBasics.TileResources.values
|
||||
.filter { it.resourceType== ResourceType.Strategic} // && civInfo.tech.isResearched(it.revealedBy!!) }
|
||||
for(resource in revealedStrategicResources){
|
||||
|
Loading…
Reference in New Issue
Block a user