Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into history
Browse files Browse the repository at this point in the history
  • Loading branch information
IllianiCBT committed Jun 21, 2024
2 parents 0924dc4 + d21fce2 commit c6e6c50
Show file tree
Hide file tree
Showing 38 changed files with 473 additions and 126 deletions.
16 changes: 8 additions & 8 deletions MekHQ/data/universe/academies/Local Academies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<educationLevelMax>Early Childhood</educationLevelMax>
<ageMax>10</ageMax>
<qualification>General Education</qualification>
<curriculum>Bonus XP</curriculum>
<curriculum>XP</curriculum>
<qualificationStartYear>2300</qualificationStartYear>
<baseAcademicSkillLevel>1</baseAcademicSkillLevel>
</academy>
Expand All @@ -28,9 +28,9 @@
<ageMin>10</ageMin>
<ageMax>16</ageMax>
<qualification>General Education</qualification>
<curriculum>Bonus XP</curriculum>
<curriculum>XP</curriculum>
<qualificationStartYear>2300</qualificationStartYear>
<baseAcademicSkillLevel>1</baseAcademicSkillLevel>
<baseAcademicSkillLevel>0</baseAcademicSkillLevel>
</academy>
<academy>
<name>Preparatory School</name>
Expand All @@ -45,9 +45,9 @@
<ageMin>10</ageMin>
<ageMax>16</ageMax>
<qualification>General Education</qualification>
<curriculum>Bonus XP, Leadership</curriculum>
<curriculum>XP, Leadership</curriculum>
<qualificationStartYear>2300</qualificationStartYear>
<baseAcademicSkillLevel>1</baseAcademicSkillLevel>
<baseAcademicSkillLevel>0</baseAcademicSkillLevel>
</academy>
<academy>
<name>Military School</name>
Expand Down Expand Up @@ -105,9 +105,9 @@
<ageMin>16</ageMin>
<durationDays>150</durationDays>
<qualification>General Education</qualification>
<curriculum>Bonus XP</curriculum>
<curriculum>XP</curriculum>
<qualificationStartYear>2300</qualificationStartYear>
<baseAcademicSkillLevel>1</baseAcademicSkillLevel>
<baseAcademicSkillLevel>0</baseAcademicSkillLevel>
</academy>
<academy>
<name>Technical College</name>
Expand Down Expand Up @@ -229,7 +229,7 @@
<educationLevelMin>Early Childhood</educationLevelMin>
<educationLevelMax>Early Childhood</educationLevelMax>
<qualification>Reeducation &amp; Social Encouragement</qualification>
<curriculum>Bonus XP</curriculum>
<curriculum>XP</curriculum>
<qualificationStartYear>2300</qualificationStartYear>
<baseAcademicSkillLevel>1</baseAcademicSkillLevel>
</academy>
Expand Down
8 changes: 6 additions & 2 deletions MekHQ/data/universe/academies/Prestigious Academies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
<name>Addicks University</name>
<type>University</type>
<description>Located in the heart of the Inner Sphere, Addicks University is celebrated for its progressive liberal arts education, particularly in teacher training. The institution uniquely integrates its academic programs with community schools, allowing student teachers to gain invaluable hands-on experience.</description>
<factionDiscount>0</factionDiscount>
<isFactionRestricted>true</isFactionRestricted>
<locationSystem>Addicks</locationSystem>
<constructionYear>2400</constructionYear>
<destructionYear>2777</destructionYear>
Expand All @@ -34,6 +32,9 @@
<educationLevelMin>High School</educationLevelMin>
<educationLevelMax>College</educationLevelMax>
<ageMin>16</ageMin>
<qualification>Teaching Graduate</qualification>
<curriculum>Leadership</curriculum>
<qualificationStartYear>2300</qualificationStartYear>
<baseAcademicSkillLevel>0</baseAcademicSkillLevel>
</academy>
<academy>
Expand Down Expand Up @@ -1212,6 +1213,7 @@
<qualificationStartYear>2300</qualificationStartYear>
<qualification>Advanced Infantry Graduate</qualification>
<curriculum>Small Arms, Anti-Mech</curriculum>
<qualificationStartYear>2500</qualificationStartYear>
<baseAcademicSkillLevel>0</baseAcademicSkillLevel>
</academy>
<academy>
Expand Down Expand Up @@ -2355,6 +2357,7 @@
<qualificationStartYear>2300</qualificationStartYear>
<qualification>Advanced Infantry Graduate</qualification>
<curriculum>Small Arms, Anti-Mech</curriculum>
<qualificationStartYear>2500</qualificationStartYear>
<baseAcademicSkillLevel>-1</baseAcademicSkillLevel>
</academy>
<academy>
Expand Down Expand Up @@ -2459,6 +2462,7 @@
<qualificationStartYear>2300</qualificationStartYear>
<qualification>Advanced Infantry Graduate</qualification>
<curriculum>Small Arms, Anti-Mech, Artillery</curriculum>
<qualificationStartYear>2500</qualificationStartYear>
<baseAcademicSkillLevel>-1</baseAcademicSkillLevel>
</academy>
<academy>
Expand Down
4 changes: 4 additions & 0 deletions MekHQ/data/universe/factions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,8 @@ successor - unimplemented tag describing another faction code as the specified f
<faction>
<shortname>FC</shortname>
<fullname>Federated Commonwealth</fullname>
<altNamesByYear year='3028'>Federated Commonwealth Alliance</altNamesByYear>
<altNamesByYear year='3055'>Federated Commonwealth</altNamesByYear>
<alternativeFactionCodes>FS,LA</alternativeFactionCodes>
<startingPlanet>New Avalon</startingPlanet>
<eraMods>0,0,0,1,2,2,1,0,0</eraMods>
Expand All @@ -1110,6 +1112,8 @@ successor - unimplemented tag describing another faction code as the specified f
<layeredForceIconLogoFilename>Federated Commonwealth.png</layeredForceIconLogoFilename>
<colorRGB>248,212,44</colorRGB>
<tags>is,super,playable</tags>
<start>3028</start>
<end>3068</end>
</faction>
<faction>
<shortname>FVC</shortname>
Expand Down
4 changes: 4 additions & 0 deletions MekHQ/data/universe/planetary_systems/system_events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -932465,6 +932465,10 @@
<date>3064-01-05</date>
<faction source="canon">FC</faction>
</event>
<event>
<date>3063-01-01</date>
<faction source="noncanon">LA</faction>
</event>
<event>
<date>3070-01-01</date>
<population source="noncanon">5162011707</population>
Expand Down
Binary file modified MekHQ/docs/Personnel Modules/Awards Module.pdf
Binary file not shown.
Binary file modified MekHQ/docs/Personnel Modules/Turnover & Retention Module.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ chkUseEducationModule.toolTip=Enables the Education Module.

lblMaximumJumpCount.text=Maximum Jump Radius
lblMaximumJumpCount.toolTip=The maximum distance when searching for academies.
lblCurriculumXpRate.text=Bonus XP Rate
lblCurriculumXpRate.toolTip=Some curriculum award bonus xp (outside monthly random xp). This setting determines how much XP should be gained per education level.
chkUseReeducationCamps.text=Enable Reeducation Camp Faction Change
chkUseReeducationCamps.toolTip=Should reeducation camps change a students' origin faction to match the campaign faction?
chkShowIneligibleAcademies.text=Show Ineligible Academies
Expand Down Expand Up @@ -786,6 +788,8 @@ personnelMarketRandomRemovalTargetsPanel.title=Random & Dylan's Removal Targets
personnelMarketRandomRemovalTargetsPanel.toolTipText=An individual daily removal roll that is beneath the relevant target number will cause an appropriately skilled person to leave the personnel market.
lblPersonnelMarketDylansWeight.text=Dylan's Method Common Unit Type Weight
lblPersonnelMarketDylansWeight.toolTipText=<html>This is the weight between 0 and 1 used by Dylan's Method to create a person with a primary role based on the most common unit type within the force's hangar, <br>instead of creating a person with a randomly determined role.</html>
chkUsePersonnelHireHiringHallOnly.text=Hiring Halls Only
chkUsePersonnelHireHiringHallOnly.toolTipText=Enabling this option disables the personnel market outside of hiring halls.

# Unit Market
unitMarketPanel.title=Unit Market
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ lblEnemy.text=Enemy:
lblMissionType.text=Mission Type:
lblLocation.text=Location:
lblDistance.text= Days (Jumps) to Location:
lblAllyRating.text=Ally Dragoon Rating:
lblEnemyRating.text=Enemy Dragoon Rating:
lblAllyRating.text=Ally Experience & Equipment:
lblEnemyRating.text=Enemy Experience & Equipment:
lblStartDate.text=Start Date:
lblLength.text=Contract length (months):
lblOverhead.text=Overhead Compensation:
Expand Down
6 changes: 3 additions & 3 deletions MekHQ/resources/mekhq/resources/ContractViewPanel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ lblSalvageValueMerc.text=<html><nobr><b>Total Value Salvaged (Mercs):</b></nobr>
lblSalvageValueEmployer.text=<html><nobr><b>Total Value Salvaged (Employer):</b></nobr></html>
lblSalvagePct.text=<html><nobr><b>Salvage Percentage:</b></nobr></html>
lblSalvage.text=<html><nobr><b>Salvage Rights:</b></nobr></html>
exchange=Exchange
exchange=Exchange
none=None

lblEnemy.text=<html><nobr><b>Enemy:</b></nobr></html>
lblAllyRating.text=<html><nobr><b>Ally Dragoon Rating:</b></nobr></html>
lblEnemyRating.text=<html><nobr><b>Enemy Dragoon Rating:</b></nobr></html>
lblAllyRating.text=<html><nobr><b>Ally Experience & Equipment:</b></nobr></html>
lblEnemyRating.text=<html><nobr><b>Enemy Experience & Equipment:</b></nobr></html>
lblMorale.text=<html><nobr><b>Enemy Morale:</b></nobr></html>
lblScore.text=<html><nobr><b>Contract Score:</b></nobr></html>
lblBonusParts.text=<html><nobr><b>Bonus Parts:</b></nobr></html>
Expand Down
6 changes: 4 additions & 2 deletions MekHQ/resources/mekhq/resources/Education.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#### Tooltip Builder
curriculum.text=Curriculum:
educationLevel.text=Education Level:
xpBonus.text=d6
nothingToLearn.text=nothing to learn
tuition.text=Tuition:
duration.text=Duration:
Expand All @@ -28,6 +27,9 @@ typeInstitute.text=Institute
typeUniversity.text=University
typePolytechnic.text=Polytechnic
typeSchool.text=School
typeSchoolBoarding.text=Boarding School
typeFinishingSchool.text=Finishing School
typePreparatorySchool.text=Preparatory School

#### Academy Suffix
suffixTechnology.text=Technology
Expand Down Expand Up @@ -73,7 +75,7 @@ graduatedMasters.text=has completed their Master's Degree.
graduatedDoctorate.text=has completed their Doctorate.
bonusAdded.text=During their education or training, %s discovered a natural talent!
bonusXp.text=%s learned something new (+%s XP)
graduatedChild.text=has graduated from %s. Tomorrow, they will begin their journey back to the unit.
graduatedChild.text=graduated from %s. Tomorrow, they will begin their journey back to the unit.

#### Graduation Events (positive)
addressEncouragement.text=during which, the commencement address included words of encouragement
Expand Down
13 changes: 10 additions & 3 deletions MekHQ/resources/mekhq/resources/GUI.properties
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ NoCommanderNagDialog.text=The campaign is missing an assigned commander. Do you

### EndContractNagDialog Class
EndContractNagDialog.title=Contract Ended
EndContractNagDialog.text=A contract has concluded and needs resolution.
EndContractNagDialog.text=A contract has concluded and needs resolution. Do you really wish to advance the day?

### UnresolvedStratConContactsNagDialog Class
UnresolvedStratConContactsNagDialog.title=Unresolved StratCon Contacts
Expand All @@ -336,6 +336,10 @@ UnresolvedStratConContactsNagDialog.text=You have unresolved contacts on the Str
cargoCapacityNagDialog.title=Exceeded Cargo Capacity
cargoCapacityNagDialog.text=You have exceeded your available cargo capacity. Do you really wish to advance the day?

### FactionDestroyedNagDialog Class
InvalidFactionNagDialog.title=Invalid Faction
InvalidFactionNagDialog.text=Your campaign faction is invalid. Either it has not yet been created, or it has been destroyed.\n\nPlease pick a new faction in campaign options.\nAdvance day anyway?

#### Report Dialogs
### CargoReportDialog Class
CargoReportDialog.title=Cargo Report
Expand Down Expand Up @@ -713,6 +717,8 @@ optionOutstandingScenariosNag.text=Hide Outstanding Scenarios Nag
optionOutstandingScenariosNag.toolTipText=This allows you to ignore the daily warning for having unfinished scenarios on the current day.
optionCargoCapacityNag.text=Hide Exceeded Cargo Capacity Nag
optionCargoCapacityNag.toolTipText=This allows you to ignore the daily warning for having exceeded your available cargo capacity.
optionInvalidFactionNag.text=Hide Invalid Faction Nag
optionInvalidFactionNag.toolTipText=This allows you to ignore the daily warning for having an invalid faction.
## Miscellaneous Tab
miscellaneousTab.title=Miscellaneous Options
lblUserDir.text=User Files Directory:
Expand Down Expand Up @@ -1287,8 +1293,9 @@ chkFilterByPercentageOfCost.text=Show only units at
chkFilterByPercentageOfCost.toolTipText=Filter out units above the specified percentage of market value.
spnFilterByPercentageOfCost.toolTipText=Filter out units with market value above this percentage when the filter is enabled.
lblCostPercentageThreshold.text=% of market value or lower
### Black Market Panel
lblBlackMarketWarning.text=<html><b>Open Market & Mercenary Auction:</b> The public sale of units available to your campaign faction\
### Market Description Panel
lblMarketDescriptions.text=<html><b>Open Market:</b> The public sale of units available to your campaign faction\
<br><b>Mercenary Auction:</b> The sale of unwanted units sold through the MRBC (or the era-appropriate equivalent)\
<br><b>Employer Market:</b> Units or salvage no longer wanted by your employer\
<br><b>Factory Line:</b> Brand-new units fresh off the production line\
<br><b>Black Market:</b> Potentially brand-new units which come with the risk of being swindled</html>
Expand Down
4 changes: 2 additions & 2 deletions MekHQ/resources/mekhq/resources/NewContractDialog.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ checkMRBC.text=Pay MRBC Fee
checkSalvageExchange.text=Exchange Rights

lblEnemy.text=Enemy:
lblAllyRating.text=Ally Dragoon Rating:
lblEnemyRating.text=Enemy Dragoon Rating:
lblAllyRating.text=Ally Experience & Equipment:
lblEnemyRating.text=Enemy Experience & Equipment:
chkShowAllFactions.text=Show All Factions
chkShowAllPlanets.text=Show All Planets
lblDistance.text=Days (Jumps) to Location:
Expand Down
1 change: 1 addition & 0 deletions MekHQ/src/mekhq/MHQConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public final class MHQConstants extends SuiteConstants {
public static final String NAG_UNRESOLVED_STRATCON_CONTACTS = "nagUnresolvedStratConContacts";
public static final String NAG_OUTSTANDING_SCENARIOS = "nagOutstandingScenarios";
public static final String NAG_CARGO_CAPACITY = "nagCargoCapacity";
public static final String NAG_INVALID_FACTION = "nagInvalidFaction";
//endregion Nag Tab

//region Miscellaneous Options
Expand Down
16 changes: 16 additions & 0 deletions MekHQ/src/mekhq/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,12 @@ public Person newDependent(boolean baby) {
Gender.RANDOMIZE);
}

if (person.getAge(getLocalDate()) <= 16) {
person.setEduHighestEducation(EducationLevel.EARLY_CHILDHOOD);
} else {
person.setEduHighestEducation(EducationLevel.HIGH_SCHOOL);
}

return person;
}

Expand Down Expand Up @@ -1710,6 +1716,16 @@ public List<Person> getActivePersonnel() {
.collect(Collectors.toList());
}

/**
* Provides a filtered list of personnel including only active prisoners.
* @return a {@link Person} <code>List</code> containing all active personnel
*/
public List<Person> getCurrentPrisoners() {
return getPersonnel().stream()
.filter(p -> p.getPrisonerStatus().isCurrentPrisoner())
.collect(Collectors.toList());
}

/**
* Provides a filtered list of personnel including only Persons with the AWOL status.
* @return a {@link Person} <code>List</code> containing all active personnel
Expand Down
26 changes: 26 additions & 0 deletions MekHQ/src/mekhq/campaign/CampaignOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public static String getTransitUnitName(final int unit) {

// Education
private boolean useEducationModule;
private Integer curriculumXpRate;
private Integer maximumJumpCount;
private boolean useReeducationCamps;
private boolean enableLocalAcademies;
Expand Down Expand Up @@ -511,6 +512,7 @@ public static String getTransitUnitName(final int unit) {
private boolean personnelMarketReportRefresh;
private Map<SkillLevel, Integer> personnelMarketRandomRemovalTargets;
private double personnelMarketDylansWeight;
private boolean usePersonnelHireHiringHallOnly;

// Unit Market
private UnitMarketMethod unitMarketMethod;
Expand Down Expand Up @@ -893,6 +895,7 @@ public CampaignOptions() {

// Education
setUseEducationModule(true);
setCurriculumXpRate(3);
setMaximumJumpCount(5);
setUseReeducationCamps(true);
setEnableLocalAcademies(true);
Expand Down Expand Up @@ -1117,6 +1120,7 @@ public CampaignOptions() {
getPersonnelMarketRandomRemovalTargets().put(SkillLevel.HEROIC, 11);
getPersonnelMarketRandomRemovalTargets().put(SkillLevel.LEGENDARY, 11);
setPersonnelMarketDylansWeight(0.3);
setUsePersonnelHireHiringHallOnly(false);

// Unit Market
setUnitMarketMethod(UnitMarketMethod.NONE);
Expand Down Expand Up @@ -2687,6 +2691,14 @@ public void setUseEducationModule(boolean useEducationModule) {
this.useEducationModule = useEducationModule;
}

public Integer getCurriculumXpRate() {
return curriculumXpRate;
}

public void setCurriculumXpRate(final int curriculumXpRate) {
this.curriculumXpRate = curriculumXpRate;
}

public Integer getMaximumJumpCount() {
return maximumJumpCount;
}
Expand Down Expand Up @@ -3357,6 +3369,14 @@ public double getPersonnelMarketDylansWeight() {
public void setPersonnelMarketDylansWeight(final double personnelMarketDylansWeight) {
this.personnelMarketDylansWeight = personnelMarketDylansWeight;
}

public boolean isUsePersonnelHireHiringHallOnly() {
return usePersonnelHireHiringHallOnly;
}

public void setUsePersonnelHireHiringHallOnly(final boolean usePersonnelHireHiringHallOnly) {
this.usePersonnelHireHiringHallOnly = usePersonnelHireHiringHallOnly;
}
//endregion Personnel Market

//region Unit Market
Expand Down Expand Up @@ -4719,6 +4739,7 @@ public void writeToXml(final PrintWriter pw, int indent) {

//region Education
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "useEducationModule", isUseEducationModule());
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "curriculumXpRate", getCurriculumXpRate());
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "maximumJumpCount", getMaximumJumpCount());
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "useReeducationCamps", isUseReeducationCamps());
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "enableLocalAcademies", isEnableLocalAcademies());
Expand Down Expand Up @@ -4819,6 +4840,7 @@ public void writeToXml(final PrintWriter pw, int indent) {
}
MHQXMLUtility.writeSimpleXMLCloseTag(pw, --indent, "personnelMarketRandomRemovalTargets");
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "personnelMarketDylansWeight", getPersonnelMarketDylansWeight());
MHQXMLUtility.writeSimpleXMLTag(pw, indent, "usePersonnelHireHiringHallOnly", isUsePersonnelHireHiringHallOnly());
//endregion Personnel Market

//region Unit Market
Expand Down Expand Up @@ -5467,6 +5489,8 @@ public static CampaignOptions generateCampaignOptionsFromXml(Node wn, Version ve
//region Education
} else if (wn2.getNodeName().equalsIgnoreCase("useEducationModule")) {
retVal.setUseEducationModule(Boolean.parseBoolean(wn2.getTextContent().trim()));
} else if (wn2.getNodeName().equalsIgnoreCase("curriculumXpRate")) {
retVal.setCurriculumXpRate(Integer.parseInt(wn2.getTextContent().trim()));
} else if (wn2.getNodeName().equalsIgnoreCase("maximumJumpCount")) {
retVal.setMaximumJumpCount(Integer.parseInt(wn2.getTextContent().trim()));
} else if (wn2.getNodeName().equalsIgnoreCase("useReeducationCamps")) {
Expand Down Expand Up @@ -5770,6 +5794,8 @@ public static CampaignOptions generateCampaignOptionsFromXml(Node wn, Version ve
}
} else if (wn2.getNodeName().equalsIgnoreCase("personnelMarketDylansWeight")) {
retVal.setPersonnelMarketDylansWeight(Double.parseDouble(wn2.getTextContent().trim()));
} else if (wn2.getNodeName().equalsIgnoreCase("usePersonnelHireHiringHallOnly")) {
retVal.setUsePersonnelHireHiringHallOnly(Boolean.parseBoolean(wn2.getTextContent().trim()));
//endregion Personnel Market

//region Unit Market
Expand Down
1 change: 1 addition & 0 deletions MekHQ/src/mekhq/campaign/ResolveScenarioTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,7 @@ public void resolveScenario(ScenarioStatus resolution, String report) {
person.getHyperlinkedName()));
}

// prisoners should generate with lower than average loyalty, so only roll 2d6
person.generateLoyalty(Compute.d6(2));
} else {
continue;
Expand Down
Loading

0 comments on commit c6e6c50

Please sign in to comment.