mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-17 03:25:54 +07:00
Fix erroneous relationship decay notification (#7564)
Whenever your relationship resting point as well as the relationship score for city states is at the exact value of 30 or 60, a notification is shown that the relationship is about to degrade, even though it can and will not. This fixes said issue by changing the comparison operators of the current influence and the resting point in getCityStateInfluenceDegrade() and getCityStateInfluenceRecovery() to the correct ones, respectively <= and >=.
This commit is contained in:
parent
6a943bb46f
commit
6054b32f92
@ -260,7 +260,7 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCityStateInfluenceDegrade(): Float {
|
private fun getCityStateInfluenceDegrade(): Float {
|
||||||
if (getInfluence() < getCityStateInfluenceRestingPoint())
|
if (getInfluence() <= getCityStateInfluenceRestingPoint())
|
||||||
return 0f
|
return 0f
|
||||||
|
|
||||||
val decrement = when {
|
val decrement = when {
|
||||||
@ -288,7 +288,7 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCityStateInfluenceRecovery(): Float {
|
private fun getCityStateInfluenceRecovery(): Float {
|
||||||
if (getInfluence() > getCityStateInfluenceRestingPoint())
|
if (getInfluence() >= getCityStateInfluenceRestingPoint())
|
||||||
return 0f
|
return 0f
|
||||||
|
|
||||||
val increment = 1f // sic: personality does not matter here
|
val increment = 1f // sic: personality does not matter here
|
||||||
|
Loading…
x
Reference in New Issue
Block a user