Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked Scenarios/Interception #5946

Merged
merged 15 commits into from
Feb 1, 2025
Merged

Conversation

DM0000
Copy link
Contributor

@DM0000 DM0000 commented Jan 31, 2025

Added linkedScenarioID to Scenario which points to next Scenario ID in chain. Defaults to 0(no link). Interception missions now generate on current day and link to scenario that they spawned from. The Interception must be completed before you are able to play original scenario.

If Interception scenario is a Victory and you clicked on the "Continue as Reinforcements" button on bottom of unit panel then the
force will be added to original scenario. *Currently doesn't check unit damage, I plan on adding individual unit selection in future.

Multiple Scenarios can have same linkedScenarioIDs.

Stepped away for a bit so had a large rebase that scrambled everything but it seems to be working now.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.28%. Comparing base (c8e806c) to head (3fc188d).
Report is 13 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5946      +/-   ##
============================================
- Coverage     10.28%   10.28%   -0.01%     
  Complexity     6132     6132              
============================================
  Files          1039     1039              
  Lines        139404   139404              
  Branches      20650    20650              
============================================
- Hits          14343    14341       -2     
+ Misses       123653   123647       -6     
- Partials       1408     1416       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@IllianiCBT IllianiCBT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really looking forward to this PR, but I have a lot of concerns. The biggest seems to be the mass reformatting of classes you've touched. This reformatting doesn't seem warranted or desirable.

I also have a functionality question:

  • I reinforce a scenario
  • The reinforcements get intercepted and a scenario is spawned

Is there anything stopping me from playing the original scenario before the interception? And if not, what happens if I do exactly that, then go back to handle the interception scenario - potentially then I could click to reinforce the (now completed) original scenario. How are we handling that?

MekHQ/src/mekhq/campaign/Campaign.java Outdated Show resolved Hide resolved
MekHQ/src/mekhq/campaign/Campaign.java Outdated Show resolved Hide resolved
MekHQ/src/mekhq/campaign/Campaign.java Outdated Show resolved Hide resolved
MekHQ/src/mekhq/campaign/Campaign.java Outdated Show resolved Hide resolved
@DM0000 DM0000 requested a review from IllianiCBT February 1, 2025 00:58
Copy link
Collaborator

@IllianiCBT IllianiCBT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HammerGS if you're agreeable, I would like this in 50.03. However, given how close we are to launch I leave it to your discretion.

Copy link
Collaborator

@rjhancock rjhancock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only requested change is the instance of one. Whitespace is just a nitpick.

MekHQ/src/mekhq/gui/BriefingTab.java Outdated Show resolved Hide resolved
@IllianiCBT
Copy link
Collaborator

If nobody else gets to this beforehand, I’ll have it merged before I go to bed.

@DM0000 DM0000 requested a review from rjhancock February 1, 2025 03:48
@IllianiCBT IllianiCBT merged commit a48d3b8 into MegaMek:master Feb 1, 2025
4 checks passed
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.

4 participants