mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Avoid addGreatPerson exception.
This commit is contained in:
parent
2575ffd01f
commit
0e77d5b044
@ -350,10 +350,14 @@ class CivilizationInfo {
|
||||
city.endTurn()
|
||||
}
|
||||
|
||||
//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() }
|
||||
|
Loading…
x
Reference in New Issue
Block a user