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

MHQ part of Fix 6240: era-illegal asf bombs #5337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 10 additions & 3 deletions MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,10 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac
break;
}

Game cGame = campaign.getGame();
TeamLoadOutGenerator tlg = new TeamLoadOutGenerator(cGame);
if (campaign.getCampaignOptions().isAutoConfigMunitions()) {
// Configure *all* generated units with appropriate munitions (for BV calcs)
Game cGame = campaign.getGame();
TeamLoadOutGenerator tlg = new TeamLoadOutGenerator(cGame);
ArrayList<Entity> arrayGeneratedLance = new ArrayList<>(generatedLance);
// bin fill ratio will be adjusted by the load out generator based on piracy and
// quality
Expand All @@ -743,7 +743,14 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac
tlg.reconfigureEntities(arrayGeneratedLance, factionCode, mt, rp);
} else {
// Load the fighters with bombs
TeamLoadOutGenerator.populateAeroBombs(generatedLance, campaign.getGameYear(), onGround, ownerBaseQuality, isPirate);
tlg.populateAeroBombs(
generatedLance,
campaign.getGameYear(),
onGround,
ownerBaseQuality,
isPirate,
faction.getShortName()
);
}
}

Expand Down
15 changes: 9 additions & 6 deletions MekHQ/src/mekhq/campaign/mission/AtBScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -1453,12 +1453,15 @@

// TODO: replace with TeamLoadoutGenerator call once 0.50.1 errata go in
boolean isAeroMap = getBoardType() == T_SPACE || getBoardType() == T_ATMOSPHERE;

TeamLoadOutGenerator.populateAeroBombs(aircraft,
campaign.getGameYear(),
!isAeroMap,
contract.getEnemyQuality(),
contract.getEnemy().isPirate());
TeamLoadOutGenerator tlg = new TeamLoadOutGenerator(campaign.getGame());
Dismissed Show dismissed Hide dismissed
tlg.populateAeroBombs(
aircraft,
campaign.getGameYear(),
!isAeroMap,
contract.getEnemyQuality(),
contract.getEnemy().isPirate(),
contract.getEnemy().getShortName()
);

BotForce bf = getEnemyBotForce(getContract(campaign), enemyHome, enemyHome, aircraft);
bf.setName(bf.getName() + " (Air Support)");
Expand Down
Loading