mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-15 04:14:44 +07:00
Fix auto assign production not working after a building is built (#10299)
* Fix auto assign production not working after a building is built * Fix issues in online multiplayer and remove validation in addbuiling
This commit is contained in:
parent
3eff519264
commit
e587f28a88
@ -387,6 +387,7 @@ class CityConstructions : IsPartOfGameInfoSerialization {
|
||||
if (construction.isBuildable(this))
|
||||
constructionQueue.add(constructionName)
|
||||
}
|
||||
chooseNextConstruction()
|
||||
}
|
||||
|
||||
private fun validateInProgressConstructions() {
|
||||
@ -523,8 +524,6 @@ class CityConstructions : IsPartOfGameInfoSerialization {
|
||||
|
||||
updateUniques()
|
||||
|
||||
validateConstructionQueue()
|
||||
|
||||
/** Support for [UniqueType.CreatesOneImprovement] */
|
||||
applyCreateOneImprovement(building)
|
||||
|
||||
@ -687,7 +686,6 @@ class CityConstructions : IsPartOfGameInfoSerialization {
|
||||
private fun removeCurrentConstruction() = removeFromQueue(0, true)
|
||||
|
||||
fun chooseNextConstruction() {
|
||||
validateConstructionQueue()
|
||||
if (!isQueueEmptyOrIdle()) {
|
||||
// If the USER set a perpetual construction, then keep it!
|
||||
if (getConstruction(currentConstructionFromQueue) !is PerpetualConstruction || currentConstructionIsUserSet) return
|
||||
|
@ -115,7 +115,6 @@ class CivConstructions : IsPartOfGameInfoSerialization {
|
||||
freeStatBuildingsProvided.addToMapOfSets(stat.name, city.id)
|
||||
addFreeBuilding(city.id, building.name)
|
||||
city.cityConstructions.constructionComplete(building)
|
||||
building.postBuildEvent(city.cityConstructions)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -401,4 +401,4 @@ suspend fun <T> attemptAction(
|
||||
|
||||
|
||||
fun GameInfoPreview.isUsersTurn() = getCivilization(currentPlayer).playerId == UncivGame.Current.settings.multiplayer.userId
|
||||
fun GameInfo.isUsersTurn() = getCivilization(currentPlayer).playerId == UncivGame.Current.settings.multiplayer.userId
|
||||
fun GameInfo.isUsersTurn() = currentPlayer.isNotEmpty() && getCivilization(currentPlayer).playerId == UncivGame.Current.settings.multiplayer.userId
|
||||
|
Loading…
Reference in New Issue
Block a user