Skip to content

Commit eae060b

Browse files
authored
Merge pull request #4175 from IllianiCBT/turnover_flavorless
Removed Flavor Text from Breach of Contract Departure in Turnover and Retention Module
2 parents 531beeb + 556b8ce commit eae060b

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

MekHQ/resources/mekhq/resources/Campaign.properties

+1-3
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ LayeredForceIconLayer.LOGO.toolTipText=This tab contains canon faction logos tha
4242
anniversaryBirthday.text=%s is %s today!
4343

4444
#### Turnover and Retention
45-
turnoverBurnedOut.text=burnt out.
46-
turnoverPoached.text=was poached by another force.
4745
turnoverJointDeparture.text=departed with their spouse.
48-
turnoverJointDepartureChild.text=departed with their parent.
46+
turnoverJointDepartureChild.text=departed with a parent.
4947

5048
turnoverEmployeeTurnoverDialog.text=Employee Turnover
5149
turnoverPayoutDialog.text=Show Payout Dialog

MekHQ/src/mekhq/campaign/Campaign.java

+8-19
Original file line numberDiff line numberDiff line change
@@ -695,25 +695,14 @@ public boolean applyRetirement(Money totalPayout, Map<UUID, UUID> unitAssignment
695695

696696
if (!person.getStatus().isDead()) {
697697
if (isBreakingContract(person, getLocalDate(), getCampaignOptions().getServiceContractDuration())) {
698-
int roll = Compute.d6(1);
699-
700-
switch (roll) {
701-
case 1:
702-
getPerson(pid).changeStatus(this, getLocalDate(), PersonnelStatus.RESIGNED);
703-
break;
704-
case 2:
705-
case 3:
706-
addReport(getPerson(pid).getHyperlinkedFullTitle() + ' ' + resources.getString("turnoverPoached.text"));
707-
getPerson(pid).changeStatus(this, getLocalDate(), PersonnelStatus.RESIGNED);
708-
break;
709-
case 4:
710-
case 5:
711-
case 6:
712-
addReport(getPerson(pid).getHyperlinkedFullTitle() + ' ' + resources.getString("turnoverBurnedOut.text"));
713-
getPerson(pid).changeStatus(this, getLocalDate(), PersonnelStatus.RESIGNED);
714-
break;
715-
default:
716-
throw new IllegalStateException("Unexpected value in applyRetirement: " + roll);
698+
if (!getActiveContracts().isEmpty()) {
699+
int roll = Compute.randomInt(20);
700+
701+
if (roll == 0) {
702+
getPerson(pid).changeStatus(this, getLocalDate(), PersonnelStatus.DEFECTED);
703+
}
704+
} else {
705+
getPerson(pid).changeStatus(this, getLocalDate(), PersonnelStatus.RESIGNED);
717706
}
718707
} else if (person.getAge(getLocalDate()) >= 50) {
719708
getPerson(pid).changeStatus(this, getLocalDate(), PersonnelStatus.RETIRED);

0 commit comments

Comments
 (0)