mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Resolved #8036 - resolved map latency when city-states exist
This commit is contained in:
parent
c20ffb03a3
commit
f3ce1c4dc5
@ -652,7 +652,14 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
||||
if (civInfo.isCityState()) return emptySequence()
|
||||
|
||||
return civInfo.getKnownCivs().asSequence().filter { it.isCityState() }
|
||||
.flatMap { getCityStateBonuses(it.cityStateType, it.getDiplomacyManager(civInfo).relationshipLevel(), uniqueType) }
|
||||
.flatMap {
|
||||
// We don't use DiplomacyManager.getRelationshipLevel for performance reasons - it tries to calculate getTributeWillingness which is heavy
|
||||
val relationshipLevel =
|
||||
if (it.getAllyCiv() == civInfo.civName) RelationshipLevel.Ally
|
||||
else if (it.getDiplomacyManager(civInfo).getInfluence() >= 30) RelationshipLevel.Friend
|
||||
else RelationshipLevel.Neutral
|
||||
getCityStateBonuses(it.cityStateType, relationshipLevel, uniqueType)
|
||||
}
|
||||
.filter { it.conditionalsApply(stateForConditionals) }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user