mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 21:35:14 -04:00
Avoid addGreatPerson exception.
This commit is contained in:
parent
2575ffd01f
commit
0e77d5b044
@ -350,11 +350,15 @@ class CivilizationInfo {
|
||||
city.endTurn()
|
||||
}
|
||||
|
||||
val greatPerson = greatPeople.getNewGreatPerson()
|
||||
if (greatPerson != null) {
|
||||
addGreatPerson(greatPerson)
|
||||
//if no city available, addGreatPerson will throw exception
|
||||
if (!cities.isNotEmpty()) {
|
||||
val greatPerson = greatPeople.getNewGreatPerson()
|
||||
if (greatPerson != null) {
|
||||
addGreatPerson(greatPerson)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
goldenAges.endTurn(happiness)
|
||||
getCivUnits().forEach { it.endTurn() }
|
||||
diplomacy.values.forEach{it.nextTurn()}
|
||||
|
Loading…
x
Reference in New Issue
Block a user