Skip to content

Commit 854a9fa

Browse files
committed
Fixed merge
1 parent 15981a4 commit 854a9fa

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

MekHQ/src/mekhq/campaign/Campaign.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4821,6 +4821,23 @@ public int getDeploymentDeficit(AtBContract contract) {
48214821
return Math.abs(Math.min(total, role));
48224822
}
48234823

4824+
/**
4825+
* Advances the campaign by one day, processing all daily events and updates.
4826+
*
4827+
* <p>This method delegates to {@link CampaignNewDayManager} to handle all new day processing,
4828+
* including personnel updates, contract management, financial transactions, maintenance tasks, and other
4829+
* time-dependent campaign events.</p>
4830+
*
4831+
* @return {@code true} if the new day processing completed successfully; {@code false} if it was cancelled or
4832+
* failed
4833+
*
4834+
* @see CampaignNewDayManager#newDay()
4835+
*/
4836+
public boolean newDay() {
4837+
CampaignNewDayManager manager = new CampaignNewDayManager(this);
4838+
return manager.newDay();
4839+
}
4840+
48244841
/**
48254842
* Computes the total rental fees for the campaign, including all rented hospital beds, kitchens, and holding
48264843
* cells.
@@ -4921,7 +4938,6 @@ public void checkForNewMercenaryOrganizationStartUp(boolean bypassStartYear, boo
49214938
}
49224939
}
49234940

4924-
49254941
/** Use {@link #refreshPersonnelMarkets(boolean)} instead */
49264942
@Deprecated(since = "0.50.07", forRemoval = true)
49274943
public void refreshPersonnelMarkets() {
@@ -4945,10 +4961,9 @@ public void refreshPersonnelMarkets() {
49454961
public void refreshPersonnelMarkets(boolean isCampaignStart) {
49464962
PersonnelMarketStyle marketStyle = campaignOptions.getPersonnelMarketStyle();
49474963
if (marketStyle == PERSONNEL_MARKET_DISABLED) {
4948-
getPersonnelMarket().generatePersonnelForDay(this);
4964+
personnelMarket.generatePersonnelForDay(this);
49494965
} else {
49504966
if (currentDay.getDayOfMonth() == 1) {
4951-
NewPersonnelMarket newPersonnelMarket = getNewPersonnelMarket();
49524967
newPersonnelMarket.gatherApplications();
49534968

49544969
if (newPersonnelMarket.getHasRarePersonnel()) {
@@ -4968,7 +4983,7 @@ public void refreshPersonnelMarkets(boolean isCampaignStart) {
49684983
}
49694984

49704985
ImmersiveDialogSimple dialog = new ImmersiveDialogSimple(this,
4971-
getSeniorAdminPerson(Campaign.AdministratorSpecialization.HR),
4986+
getSeniorAdminPerson(AdministratorSpecialization.HR),
49724987
null,
49734988
resources.getString("personnelMarket.rareProfession.inCharacter"),
49744989
buttons,

0 commit comments

Comments
 (0)