mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Fixed 'auto assign production' not working when changing from manual to auto assign
This commit is contained in:
@ -146,9 +146,9 @@ class CityConstructions {
|
|||||||
internal fun getConstruction(constructionName: String): IConstruction {
|
internal fun getConstruction(constructionName: String): IConstruction {
|
||||||
val gameBasics = cityInfo.getRuleset()
|
val gameBasics = cityInfo.getRuleset()
|
||||||
when {
|
when {
|
||||||
|
constructionName == "" -> return getConstruction("Nothing")
|
||||||
gameBasics.buildings.containsKey(constructionName) -> return gameBasics.buildings[constructionName]!!
|
gameBasics.buildings.containsKey(constructionName) -> return gameBasics.buildings[constructionName]!!
|
||||||
gameBasics.units.containsKey(constructionName) -> return gameBasics.units[constructionName]!!
|
gameBasics.units.containsKey(constructionName) -> return gameBasics.units[constructionName]!!
|
||||||
constructionName == "" -> return getConstruction("Nothing")
|
|
||||||
else -> {
|
else -> {
|
||||||
val special = PerpetualConstruction.perpetualConstructionsMap[constructionName]
|
val special = PerpetualConstruction.perpetualConstructionsMap[constructionName]
|
||||||
if (special != null) return special
|
if (special != null) return special
|
||||||
@ -358,8 +358,6 @@ class CityConstructions {
|
|||||||
private fun removeCurrentConstruction() = removeFromQueue(0,true)
|
private fun removeCurrentConstruction() = removeFromQueue(0,true)
|
||||||
|
|
||||||
fun chooseNextConstruction() {
|
fun chooseNextConstruction() {
|
||||||
if(currentConstructionIsUserSet) return
|
|
||||||
|
|
||||||
validateConstructionQueue()
|
validateConstructionQueue()
|
||||||
if (constructionQueue.isNotEmpty()) {
|
if (constructionQueue.isNotEmpty()) {
|
||||||
currentConstructionIsUserSet = true
|
currentConstructionIsUserSet = true
|
||||||
|
Reference in New Issue
Block a user