Skip to content

Commit

Permalink
Merge pull request #5296 from IllianiCBT/briefing_modifierNames
Browse files Browse the repository at this point in the history
Simplified Modifier Briefing Text in `AtBScenarioModifier`
  • Loading branch information
IllianiCBT authored Dec 12, 2024
2 parents 0559fcc + 3b9715f commit 97d8a43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
21 changes: 10 additions & 11 deletions MekHQ/src/mekhq/campaign/mission/atb/AtBScenarioModifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
*/
package mekhq.campaign.mission.atb;

import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.xml.namespace.QName;
import javax.xml.transform.Source;

import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.Marshaller;
Expand All @@ -47,6 +37,15 @@
import mekhq.campaign.mission.ScenarioObjective;
import mekhq.utilities.MHQXMLUtility;

import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* Data structure representing a scenario modifier for dynamic AtB scenarios
*
Expand Down Expand Up @@ -367,7 +366,7 @@ public void processModifier(AtBDynamicScenario scenario, Campaign campaign, Even
if (eventTiming == getEventTiming()) {
if ((getAdditionalBriefingText() != null) && !getAdditionalBriefingText().isBlank()) {
AtBScenarioModifierApplicator.appendScenarioBriefingText(scenario,
String.format("%s: %s", getModifierName(), getAdditionalBriefingText()));
getAdditionalBriefingText());
}

if (getForceDefinition() != null) {
Expand Down
5 changes: 2 additions & 3 deletions MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1582,9 +1582,8 @@ private static void applyFacilityModifiers(StratconScenario scenario, StratconTr
continue;
}

modifier.setAdditionalBriefingText(
"(from " + facility.getDisplayableName() + ") " +
modifier.getAdditionalBriefingText());
modifier.setAdditionalBriefingText('(' + facility.getDisplayableName() + ") "
+ modifier.getAdditionalBriefingText());
scenario.getBackingScenario().addScenarioModifier(modifier);
}
}
Expand Down

0 comments on commit 97d8a43

Please sign in to comment.