Fixed a bug where if enemy civ constructed the Oracle, you would get a popup screen to choose a free policy which wouldn't go away

This commit is contained in:
Yair Morgenstern 2018-05-11 10:41:13 +03:00
parent ec760e660f
commit a0f5e190fc

View File

@ -178,7 +178,9 @@ class Building : NamedStats(), IConstruction, ICivilopedia {
if (providesFreeBuilding != null && !construction.builtBuildings.contains(providesFreeBuilding!!))
construction.builtBuildings.add(providesFreeBuilding!!)
when (unique) {
"ApolloProgram" -> UnCivGame.Current.screen = VictoryScreen()
"ApolloProgram" ->
if(construction.cityInfo.civInfo.isPlayerCivilization())
UnCivGame.Current.screen = VictoryScreen()
"EmpireEntersGoldenAge" -> civInfo.goldenAges.enterGoldenAge()
"FreeGreatArtistAppears" -> civInfo.addGreatPerson("Great Artist")
"WorkerConstruction" -> {
@ -187,7 +189,8 @@ class Building : NamedStats(), IConstruction, ICivilopedia {
}
"FreeSocialPolicy" -> {
civInfo.policies.freePolicies++
UnCivGame.Current.screen = PolicyPickerScreen(civInfo)
if(construction.cityInfo.civInfo.isPlayerCivilization())
UnCivGame.Current.screen = PolicyPickerScreen(civInfo)
}
}