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

Briefing Room: Print Sheets now prints sheets for all units in AtB #2884

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

Windchild292
Copy link
Contributor

This has been raised on Discord a few times recently, so I've added it. I also cleaned up the code for the method and fixed any IDE warnings (protected makes no sense in a final class and unnecessary toString usages being the primary two).

To review: I put a comment over the actual functionality change, which was supposed to be in its own commit.

@Windchild292 Windchild292 added (RFE) Enhancement Requests for Enhancement, new features or implementations AtB labels Sep 25, 2021
@Windchild292 Windchild292 self-assigned this Sep 25, 2021
Comment on lines +556 to +562
if (scenario instanceof AtBScenario) {
// Also print off allied sheets and all bot force sheets
chosen.addAll(((AtBScenario) scenario).getAlliesPlayer());
chosen.addAll(((AtBScenario) scenario).getBotForces().stream()
.flatMap(botForce -> botForce.getEntityList().stream())
.collect(Collectors.toList()));
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the new functionality, where we also print off Player controlled allies and any bot force units

@codecov
Copy link

codecov bot commented Sep 25, 2021

Codecov Report

Merging #2884 (7f65503) into master (929e3d3) will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2884      +/-   ##
============================================
+ Coverage     10.62%   10.64%   +0.01%     
- Complexity     3876     3891      +15     
============================================
  Files           721      721              
  Lines        100582   100582              
  Branches      16425    16424       -1     
============================================
+ Hits          10683    10703      +20     
+ Misses        88508    88501       -7     
+ Partials       1391     1378      -13     
Impacted Files Coverage Δ
MekHQ/src/mekhq/campaign/mission/AtBScenario.java 0.00% <0.00%> (ø)
MekHQ/src/mekhq/gui/BriefingTab.java 0.00% <0.00%> (ø)
MekHQ/src/mekhq/campaign/universe/Systems.java 41.43% <0.00%> (-0.80%) ⬇️
MekHQ/src/mekhq/campaign/Campaign.java 11.98% <0.00%> (+0.05%) ⬆️
MekHQ/src/mekhq/campaign/mission/AtBContract.java 19.28% <0.00%> (+0.29%) ⬆️
MekHQ/src/mekhq/campaign/universe/Faction.java 66.02% <0.00%> (+0.64%) ⬆️
...ekHQ/src/mekhq/campaign/market/ContractMarket.java 59.80% <0.00%> (+1.19%) ⬆️
...ekhq/campaign/universe/RandomFactionGenerator.java 58.16% <0.00%> (+1.99%) ⬆️
MekHQ/src/mekhq/campaign/JumpPath.java 46.96% <0.00%> (+9.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 929e3d3...7f65503. Read the comment docs.

@Windchild292 Windchild292 merged commit d2088e4 into MegaMek:master Sep 29, 2021
@Windchild292 Windchild292 deleted the dev_Windchild_PrintSheets branch September 29, 2021 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AtB Bug (RFE) Enhancement Requests for Enhancement, new features or implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants