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

Prevent StratCon from Pulling in Player DropShips, when Option is Disabled #5046

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MekHQ/data/scenariotemplates/Deep Raid Defense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
<forceAlignment>1</forceAlignment>
<forceMultiplier>1.0</forceMultiplier>
<forceName>DropShip</forceName>
<generationMethod>3</generationMethod>
<generationMethod>4</generationMethod>
<generationOrder>1</generationOrder>
<maxWeightClass>4</maxWeightClass>
<minWeightClass>0</minWeightClass>
Expand Down
2 changes: 1 addition & 1 deletion MekHQ/data/scenariotemplates/Isolated DropShip Defense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
<forceAlignment>1</forceAlignment>
<forceMultiplier>1.0</forceMultiplier>
<forceName>DropShip</forceName>
<generationMethod>3</generationMethod>
<generationMethod>4</generationMethod>
<generationOrder>3</generationOrder>
<maxWeightClass>4</maxWeightClass>
<minWeightClass>0</minWeightClass>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<forceAlignment>1</forceAlignment>
<forceMultiplier>1.0</forceMultiplier>
<forceName>DropShip</forceName>
<generationMethod>3</generationMethod>
<generationMethod>4</generationMethod>
<generationOrder>4</generationOrder>
<maxWeightClass>4</maxWeightClass>
<minWeightClass>1</minWeightClass>
Expand Down
2 changes: 1 addition & 1 deletion MekHQ/data/scenariotemplates/Space Blockade Run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<forceAlignment>1</forceAlignment>
<forceMultiplier>1.0</forceMultiplier>
<forceName>DropShip</forceName>
<generationMethod>3</generationMethod>
<generationMethod>4</generationMethod>
<generationOrder>4</generationOrder>
<maxWeightClass>4</maxWeightClass>
<minWeightClass>1</minWeightClass>
Expand Down
4 changes: 4 additions & 0 deletions MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ private static void swapInPlayerUnits(StratconScenario scenario, Campaign campai
}

for (Unit unit : potentialUnits) {
if ((sft.getAllowedUnitType() == 11) && (!campaign.getCampaignOptions().isUseDropShips())) {
continue;
}

// if it's the right type of unit and is around
if (forceCompositionMatchesDeclaredUnitType(unit.getEntity().getUnitType(),
sft.getAllowedUnitType(), false) &&
Expand Down