Fixed city-state alliance join war notification (#11541)

This commit is contained in:
Oskar Niesen 2024-05-04 13:03:12 -05:00 committed by GitHub
parent 5291c5b79a
commit 69b5e0c905
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,8 +82,8 @@ object DeclareWar {
WarType.DefensivePactWar, WarType.CityStateAllianceWar, WarType.JoinWar -> {
val allyCiv = declareWarReason.allyCiv!!
otherCiv.popupAlerts.add(PopupAlert(AlertType.WarDeclaration, civInfo.civName))
val agressor = if (declareWarReason.warType == WarType.JoinWar) civInfo else otherCiv
val defender = if (declareWarReason.warType == WarType.JoinWar) otherCiv else civInfo
val agressor = if (declareWarReason.warType == WarType.DefensivePactWar) otherCiv else civInfo
val defender = if (declareWarReason.warType == WarType.DefensivePactWar) civInfo else otherCiv
defender.addNotification("[${agressor.civName}] has joined [${allyCiv.civName}] in the war against us!",
NotificationCategory.Diplomacy, NotificationIcon.War, agressor.civName)