Skip to content

Added 'None' Generation Method to ScenarioForceTemplate#5966

Merged
HammerGS merged 1 commit intoMegaMek:masterfrom
IllianiBird:emptyBotForceGeneration
Feb 6, 2025
Merged

Added 'None' Generation Method to ScenarioForceTemplate#5966
HammerGS merged 1 commit intoMegaMek:masterfrom
IllianiBird:emptyBotForceGeneration

Conversation

@IllianiBird
Copy link
Collaborator

  • Implemented a 'None' option in ForceGenerationMethod to allow bot forces where no units are generated, enabling more flexible scenario templates.
  • Adjusted AtBDynamicScenarioFactory to account for this method in force generation logic.

This resolves a situation where we need to have all objective-significant Bot Forces generated when the scenario is created. However, if we want the Bot Force to have specific units and not random ones, we then need to remove the already generated ones. By using this method, we're able to generate an empty force during scenario creation which can then be populated later.

This will be used by the upcoming prisoner rework.

- Implemented a 'None' option in `ForceGenerationMethod` to allow bot forces where no units are generated, enabling more flexible scenario templates.
- Adjusted `AtBDynamicScenarioFactory` to account for this method in force generation logic.

This resolves a situation where we need to have all objective-significant Bot Forces generated when the scenario is created. However, if we want the Bot Force to have specific units and not random ones, we then need to remove the already generated ones. By using this method, we're able to generate an empty force during scenario creation which can then be populated later.

This will be used by the upcoming prisoner rework.
@IllianiBird IllianiBird added the Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature label Feb 3, 2025
@IllianiBird IllianiBird self-assigned this Feb 3, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.35%. Comparing base (cd323b0) to head (ce3652b).
Report is 86 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5966      +/-   ##
============================================
- Coverage     10.35%   10.35%   -0.01%     
+ Complexity     6171     6167       -4     
============================================
  Files          1039     1039              
  Lines        139359   139363       +4     
  Branches      20639    20641       +2     
============================================
- Hits          14437    14430       -7     
- Misses       123493   123501       +8     
- Partials       1429     1432       +3     

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

@HammerGS HammerGS merged commit 50b639d into MegaMek:master Feb 6, 2025
4 checks passed
@IllianiBird IllianiBird deleted the emptyBotForceGeneration branch March 23, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants