Tiles outside the 3rd ring of a city can no longer be "worked" in the screen (before they could be chosen but didn't provide yields)

This commit is contained in:
Yair Morgenstern 2018-07-16 09:43:36 +03:00
parent 43ef42be5f
commit ce7cb2ce17

View File

@ -197,10 +197,14 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
update()
}
if (tileInfo.getCity()!=city) {
val tilesInRange = city.getTilesInRange()
if (tileInfo.getCity()!=city) { // outside of city
group.setColor(0f, 0f, 0f, 0.3f)
group.yieldGroup.isVisible = false
} else if (!tileInfo.isCityCenter()) {
} else if(tileInfo !in tilesInRange){ // within city but not close enough to be workable
group.yieldGroup.isVisible = false
}
else if (!tileInfo.isCityCenter()) { // workable
group.addPopulationIcon()
group.populationImage!!.addClickListener {
if (!tileInfo.isWorked() && cityInfo.population.getFreePopulation() > 0)