Skip to content

Commit

Permalink
Merge pull request #4344 from IllianiCBT/turnover_deathInService
Browse files Browse the repository at this point in the history
Update Payout Calculation for KIA Personnel
  • Loading branch information
IllianiCBT authored Jul 7, 2024
2 parents 696c960 + 40f3897 commit f1281a6
Showing 1 changed file with 12 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,27 +456,17 @@ private static int getManagementSkillModifier(Person person) {
* @return the management skill modifier for the commander
*/
private static int getCommanderManagementSkill(PersonnelRole role) {
switch (Profession.getProfessionFromPersonnelRole(role)) {
case AEROSPACE:
return asfCommanderModifier;
case VEHICLE:
return vehicleCrewCommanderModifier;
case INFANTRY:
return infantryCommanderModifier;
case NAVAL:
return navalCommanderModifier;
case TECH:
return techCommanderModifier;
case MEDICAL:
return medicalCommanderModifier;
case ADMINISTRATOR:
return administrationCommanderModifier;
case MECHWARRIOR:
return mechWarriorCommanderModifier;
case CIVILIAN:
return 0;
}
return 0;
return switch (Profession.getProfessionFromPersonnelRole(role)) {
case AEROSPACE -> asfCommanderModifier;
case VEHICLE -> vehicleCrewCommanderModifier;
case INFANTRY -> infantryCommanderModifier;
case NAVAL -> navalCommanderModifier;
case TECH -> techCommanderModifier;
case MEDICAL -> medicalCommanderModifier;
case ADMINISTRATOR -> administrationCommanderModifier;
case MECHWARRIOR -> mechWarriorCommanderModifier;
case CIVILIAN -> 0;
};
}

/**
Expand Down Expand Up @@ -1062,7 +1052,7 @@ private void calculatePayout(final Campaign campaign, final Person person, final

// person was killed
if (killed) {
payoutAmount = getPayoutOrBonusValue(campaign, person);
payoutAmount = getPayoutOrBonusValue(campaign, person).multipliedBy(campaign.getCampaignOptions().getPayoutRetirementMultiplier());
// person was sacked
} else if (sacked) {
payoutAmount = Money.of(0);
Expand Down

0 comments on commit f1281a6

Please sign in to comment.