chore: docstring what needs to be done to add a new demand

This commit is contained in:
yairm210 2025-06-17 15:41:22 +03:00
parent 2ba8ef12b8
commit 5ae80700ff
2 changed files with 10 additions and 1 deletions

View File

@ -2,11 +2,16 @@ package com.unciv.logic.civilization.diplomacy
import com.unciv.logic.civilization.AlertType
/** After creating the required flags, modifiers, and alert type, the only remaining work should be
* - Adding the new alerts in AlertPopup.kt
* - Triggering the violation (adding the violationOccurred flag) from somewhere in the code
*/
enum class Demand(
/** All these are set on the promisee, not the promiser */
val agreedToDemand: DiplomacyFlags,
val violationOccurred: DiplomacyFlags,
val willIgnoreViolation:DiplomacyFlags,
val willIgnoreViolation: DiplomacyFlags,
val refusedDiplomaticModifier: DiplomaticModifiers,
val betrayedPromiseDiplomacyMpodifier: DiplomaticModifiers,
val fulfilledPromiseDiplomacyModifier: DiplomaticModifiers,

View File

@ -94,12 +94,16 @@ class AlertPopup(
AlertType.WarDeclaration -> shouldOpen = addWarDeclaration()
AlertType.BorderConflict -> shouldOpen = addBorderConflict()
AlertType.TilesStolen -> shouldOpen = addTilesStolen()
// demands
AlertType.DemandToStopSettlingCitiesNear -> shouldOpen = addDemandToStopSettlingCitiesNear()
AlertType.CitySettledNearOtherCivDespiteOurPromise -> shouldOpen = addCitySettledNearOtherCivDespiteOurPromise()
AlertType.DemandToStopSpreadingReligion -> shouldOpen = addDemandToStopSpreadingReligion()
AlertType.ReligionSpreadDespiteOurPromise -> shouldOpen = addReligionSpreadDespiteOurPromise()
AlertType.DemandToStopSpyingOnUs -> shouldOpen = addDemandToStopSendingSpiesToUs()
AlertType.SpyingOnUsDespiteOurPromise -> shouldOpen = addSpyingOnUsDespiteOurPromise()
AlertType.DeclarationOfFriendship -> shouldOpen = addDeclarationOfFriendship()
AlertType.BulliedProtectedMinor, AlertType.AttackedProtectedMinor, AlertType.AttackedAllyMinor ->
shouldOpen = addBulliedOrAttackedProtectedOrAlliedMinor()