Avoid future tech blocking ending turn.
This commit is contained in:
parent
9eb9176b2a
commit
0bbcc39eca
1 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@ import com.unciv.logic.civilization.CivilizationInfo
|
|||
import com.unciv.logic.civilization.diplomacy.DiplomaticIncident
|
||||
import com.unciv.logic.civilization.diplomacy.DiplomaticIncidentType
|
||||
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
|
||||
import com.unciv.models.gamebasics.GameBasics
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.gamebasics.unit.UnitType
|
||||
|
@ -191,9 +192,12 @@ class WorldScreen : CameraStageBaseScreen() {
|
|||
|
||||
private fun updateTechButton(civInfo: CivilizationInfo) {
|
||||
techButton.isVisible = civInfo.cities.isNotEmpty()
|
||||
|
||||
techButton.clearChildren()
|
||||
|
||||
val researchableTechs = GameBasics.Technologies.values.filter { !civInfo.tech.isResearched(it.name) && civInfo.tech.canBeResearched(it.name) }
|
||||
if (civInfo.tech.currentTechnology() == null && researchableTechs.isEmpty())
|
||||
civInfo.tech.techsToResearch.add("Future Tech")
|
||||
|
||||
if (civInfo.tech.currentTechnology() == null) {
|
||||
val buttonPic = Table()
|
||||
buttonPic.background = ImageGetter.getDrawable("OtherIcons/civTableBackground.png")
|
||||
|
|
Loading…
Reference in a new issue