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

Fixed Multiple StratCon Bugs #5698

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Jan 8, 2025

  • Stopped scenarios regenerating when reinforcements were applied.
  • Stopped Patrol forces failing to generate scenarios if they land on top of an enemy facility
  • Cleaned up some leftover code from prior to 50.02
  • Ensured scenario objective time limits are recalculated when recalculating objectives

Fix #5636, #5697, #5603

Simplified and streamlined logic for reinforcing and committing primary forces in Stratcon scenarios. Consolidated redundant functionality, improved code consistency, and ensured proper initialization of scenario dates and states.
Consolidated static import usage for finalizeScenario and updated its calls to ensure better clarity and prevent redundant re-finalization. Added a check to avoid re-finalizing already finalized scenarios within Stratcon operations.
Revised patrol logic to clarify conditions for relocating scenarios and auto-assigning lances. Replaced "isRecon" with "isPatrol" for better readability and adjusted related condition checks. Streamlined scenario generation by migrating patrols to unoccupied adjacent coordinates when not targeting facilities.
@IllianiCBT IllianiCBT added Bug StratCon Bugs relating strictly to StratCon labels Jan 8, 2025
@IllianiCBT IllianiCBT self-assigned this Jan 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.03%. Comparing base (4cf3be1) to head (e59dc64).
Report is 74 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5698   +/-   ##
=========================================
  Coverage     10.02%   10.03%           
- Complexity     6068     6072    +4     
=========================================
  Files          1074     1074           
  Lines        141641   141634    -7     
  Branches      20645    20644    -1     
=========================================
+ Hits          14206    14215    +9     
+ Misses       126063   126053   -10     
+ Partials       1372     1366    -6     

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

Implemented scaling of scenario objective time limits based on unit counts in AtBDynamicScenario. Updated references and imports to use consolidated methods from AtBDynamicScenarioFactory. Made scaleObjectiveTimeLimits method public for broader accessibility.
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

Looks good.

@Sleet01 Sleet01 merged commit ed132d4 into MegaMek:master Jan 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug StratCon Bugs relating strictly to StratCon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Jan 3/4th NI - Forces Regenerating whenever units are deployed
3 participants