Add alliance renewal action to Radial Menu#3095
Add alliance renewal action to Radial Menu#3095deshack wants to merge 2 commits intoopenfrontio:mainfrom
Conversation
WalkthroughThis pull request adds alliance extension capability to the game. It introduces validation methods to check extension eligibility, updates the radial menu UI to display the extension option conditionally, creates event handlers to emit extension intents, and adds necessary interface signatures across the core game logic and client layers. Changes
Sequence DiagramsequenceDiagram
participant UI as Radial Menu
participant Handler as PlayerActionHandler
participant Game as GameRunner
participant Player as PlayerImpl
participant Alliance as AllianceImpl
participant Events as Event System
UI->>Player: canExtendAlliance(other)
Player->>Alliance: allianceWith(other)
Player->>Alliance: expiresAt()
Player->>Player: Validate: alive, allied, in window
Player-->>UI: canExtendAlliance: boolean
UI->>UI: Show extend element if canExtendAlliance
UI->>Handler: handleExtendAlliance(recipient)
Handler->>Events: Emit SendAllianceExtensionIntentEvent
Events->>Game: Process event
Game->>Alliance: agreedToExtend(player)
Alliance-->>Game: Agreement status
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Suggestion by tryout33:
|
Description:
The following PR replaces the (disabled) alliance request button with an alliance extension/renewal button when the alliance with the target player is expiring.
The extend button is hidden after the player agrees to renew.
Asking for comments/guidance regarding icon and color.
Still WIP, we need to remove the renewal message from the EventsDisplay upon agreement via Radial Menu.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
deshack_82603