Skip to content

Commit

Permalink
add check for injuries that are not permanent before setting on_leave
Browse files Browse the repository at this point in the history
  • Loading branch information
DM0000 committed Jan 31, 2025
1 parent 1053561 commit be58194
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public static void processFatigueActions(Campaign campaign, Person person) {
}

if ((campaign.getCampaignOptions().getFatigueLeaveThreshold() != 0)
&& (effectiveFatigue >= campaign.getCampaignOptions().getFatigueLeaveThreshold())) {
&& (effectiveFatigue >= campaign.getCampaignOptions().getFatigueLeaveThreshold())
&& (person.getInjuries().isEmpty() || person.getInjuries().equals(person.getPermanentInjuries()))) {
person.changeStatus(campaign, campaign.getLocalDate(), PersonnelStatus.ON_LEAVE);
}
}
Expand Down

0 comments on commit be58194

Please sign in to comment.