Can't choose to build unbuildable units =)

This commit is contained in:
Yair Morgenstern 2018-05-07 23:56:10 +03:00
parent 602532b721
commit 16ae62a29b

View File

@ -57,7 +57,7 @@ class ConstructionPickerScreen(val city: CityInfo) : PickerScreen() {
regularBuildings.addActor(productionTextButton)
}
for (unit in GameBasics.Units.values.filterNot { it.unbuildable }) {
for (unit in GameBasics.Units.values.filter { it.isBuildable(cityConstructions)}) {
units.addActor(getProductionButton(unit.name,
unit.name + "\r\n" + cityConstructions.turnsToConstruction(unit.name) + " turns",
unit.baseDescription, "Train " + unit.name))