Skip to content

Allow ending relations while over diplomatic capacity - #101

Merged
Drefvelin merged 1 commit into
mainfrom
fix/end-relations-over-capacity
Oct 2, 2026
Merged

Drefvelin merged 1 commit into
mainfrom
fix/end-relations-over-capacity

Conversation

@Drefvelin

Copy link
Copy Markdown
Contributor

Summary

  • Ending or cheapening a diplomatic relation no longer requires spare capacity, so a nation over the cap can release a subject or break an alliance.
  • A change that spends more capacity is still refused unless the increase fits in what is free. The same rule applies to attitudes, trade agreements, and treaties.
  • Clearing a treaty was already allowed and stays that way.

Test plan

  • Nation over diplomatic capacity can set a relation to None (release a subject, end an alliance)
  • The other nation being over capacity does not block that break
  • Forming a new alliance or subject while over capacity is still refused
  • A cheaper attitude can be selected while over capacity; a more expensive one cannot
  • RelationManagerCapacityGateTest passes
  • Dev build workflow on this pull request succeeds

Made with Cursor

A zero-cost break was compared to free capacity, so a nation already over the cap could not release a subject or drop an alliance.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 53022a3d-547d-4ecb-a76c-c59dc56cf70c

📥 Commits

Reviewing files that changed from the base of the PR and between cb3462d and 00ce606.

📒 Files selected for processing (4)
  • src/main/java/net/tfminecraft/simplefactions/managers/RelationManager.java
  • src/main/java/net/tfminecraft/simplefactions/managers/inventory/RelationCreator.java
  • src/main/java/net/tfminecraft/simplefactions/managers/inventory/RelationView.java
  • src/test/java/net/tfminecraft/simplefactions/managers/RelationManagerCapacityGateTest.java
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@Drefvelin
Drefvelin merged commit f01c9db into main Oct 2, 2026
1 of 2 checks passed
@Drefvelin
Drefvelin deleted the fix/end-relations-over-capacity branch October 2, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant