mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Automated spectator in multiplayer games does nothing
This commit is contained in:
@ -33,6 +33,7 @@ object NextTurnAutomation {
|
|||||||
/** Top-level AI turn task list */
|
/** Top-level AI turn task list */
|
||||||
fun automateCivMoves(civInfo: Civilization) {
|
fun automateCivMoves(civInfo: Civilization) {
|
||||||
if (civInfo.isBarbarian()) return BarbarianAutomation(civInfo).automate()
|
if (civInfo.isBarbarian()) return BarbarianAutomation(civInfo).automate()
|
||||||
|
if (civInfo.isSpectator()) return // When there's a spectator in multiplayer games, it's processed automatically, but shouldn't be able to actually do anything
|
||||||
|
|
||||||
respondToPopupAlerts(civInfo)
|
respondToPopupAlerts(civInfo)
|
||||||
TradeAutomation.respondToTradeRequests(civInfo)
|
TradeAutomation.respondToTradeRequests(civInfo)
|
||||||
@ -152,7 +153,7 @@ object NextTurnAutomation {
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
// The more we have invested into the city-state the more the alliance is worth
|
// The more we have invested into the city-state the more the alliance is worth
|
||||||
val ourInfluence = if (civInfo.knows(cityState))
|
val ourInfluence = if (civInfo.knows(cityState))
|
||||||
cityState.getDiplomacyManager(civInfo).getInfluence().toInt()
|
cityState.getDiplomacyManager(civInfo).getInfluence().toInt()
|
||||||
else 0
|
else 0
|
||||||
value += ourInfluence / 10
|
value += ourInfluence / 10
|
||||||
|
@ -98,7 +98,7 @@ class TileImprovement : RulesetStatsObject() {
|
|||||||
return when (filter) {
|
return when (filter) {
|
||||||
name -> true
|
name -> true
|
||||||
"All" -> true
|
"All" -> true
|
||||||
"Improvement" -> true // For situations involing tileFilter
|
"Improvement" -> true // For situations involving tileFilter
|
||||||
"All Road" -> isRoad()
|
"All Road" -> isRoad()
|
||||||
"Great Improvement", "Great" -> isGreatImprovement()
|
"Great Improvement", "Great" -> isGreatImprovement()
|
||||||
in uniqueMap -> true
|
in uniqueMap -> true
|
||||||
|
Reference in New Issue
Block a user