10000 Fix: Fixed a Handful of Calls to Unsafe Faction Standing Getters by IllianiBird · Pull Request #7275 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Fixed a Handful of Calls to Unsafe Faction Standing Getters #7275

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

Merged
merged 2 commits into from
Jul 1, 2025
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
10000
4 changes: 2 additions & 2 deletions MekHQ/src/mekhq/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -5121,7 +5121,7 @@ private void processNewDayATB() {
String enemyFactionCode = contract.getEnemyCode();

boolean allowBatchalls = true;
if (campaignOptions.isUseFactionStandingBatchallRestrictions()) {
if (campaignOptions.isUseFactionStandingBatchallRestrictionsSafe()) {
double regard = factionStandings.getRegardForFaction(enemyFactionCode, true);
allowBatchalls = FactionStandingUtilities.isBatchallAllowed(regard);
}
Expand Down Expand Up @@ -7198,7 +7198,7 @@ public JumpPath calculateJumpPath(PlanetarySystem start, PlanetarySystem end, bo

// Skip systems where the campaign is outlawed
if (!skipAccessCheck
&& campaignOptions.isUseFactionStandingOutlawed()) {
&& campaignOptions.isUseFactionStandingOutlawedSafe()) {
boolean canAccessSystem = FactionStandingUtilities.canEnterTargetSystem(faction, factionStandings,
getCurrentSystem(), neighborSystem, currentDay, activeAtBContracts, factionHints);
if (!canAccessSystem) {
Expand Down
2 changes: 1 addition & 1 deletion MekHQ/src/mekhq/campaign/mission/AtBContract.java
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ private void updateEnemy(Campaign campaign, LocalDate today) {
FactionStandings factionStandings = campaign.getFactionStandings();

boolean allowBatchalls = true;
if (campaign.getCampaignOptions().isUseFactionStandingBatchallRestrictions()) {
if (campaign.getCampaignOptions().isUseFactionStandingBatchallRestrictionsSafe()) {
double regard = factionStandings.getRegardForFaction(faction.getShortName(), true);
allowBatchalls = FactionStandingUtilities.isBatchallAllowed(regard);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public PerformBatchall(Campaign campaign, Person clanOpponent, String enemyFacti
standingLevel = getFactionStandingLevel(campaign.getFactionStandings());
batchallVersion = randomInt(BATCHALL_OPTIONS_COUNT);

if (campaign.getCampaignOptions().isUseFactionStandingBatchallRestrictions()) {
if (campaign.getCampaignOptions().isUseFactionStandingBatchallRestrictionsSafe()) {
if (!standingLevel.isBatchallAllowed()) {
getBatchallStandingTooLowDialog();
isBatchallAccepted = false;
Expand Down
Loading
0