check whether the city has been a puppet in "Pick construction" action. (#7963)

This commit is contained in:
nacro711072
2022-10-27 15:05:33 +08:00
committed by GitHub
parent 731e9f5815
commit ef1c81bef7

View File

@ -672,10 +672,16 @@ class WorldScreen(
viewingCiv.shouldGoToDueUnit() ->
NextTurnAction("Next unit", Color.LIGHT_GRAY) { switchToNextUnit() }
viewingCiv.cities.any { it.cityConstructions.currentConstructionFromQueue == "" } ->
viewingCiv.cities.any {
!it.isPuppet &&
it.cityConstructions.currentConstructionFromQueue == ""
} ->
NextTurnAction("Pick construction", Color.CORAL) {
val cityWithNoProductionSet = viewingCiv.cities
.firstOrNull { it.cityConstructions.currentConstructionFromQueue == "" }
.firstOrNull {
!it.isPuppet &&
it.cityConstructions.currentConstructionFromQueue == ""
}
if (cityWithNoProductionSet != null) game.pushScreen(
CityScreen(cityWithNoProductionSet)
)