Skip to content

Commit

Permalink
implement #188
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffierThanThou committed Oct 25, 2022
1 parent 6a11893 commit 877e9ef
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public static bool Prefix(Pawn_WorkSettings __instance) {
// lowest priority non-emergency job
int maxEmergPrio = allWorkgivers
.Where( wg => !wg.def.emergency )
.Min( wg => pawn.GetPriority( wg.def, -1 ) );
.Select( wg => pawn.GetPriority( wg.def, -1))
.DefaultIfEmpty(int.MaxValue)
.Min();

// create lists of workgivers
normalWorkgivers = allWorkgivers
Expand Down

0 comments on commit 877e9ef

Please sign in to comment.