Skip to content

Commit 6be87fc

Browse files
alextdFluffierThanThou
authored andcommitted
fix mod conflict with Hospitality, perhaps any mod that makes non-colonists work. (#101)
GetVanillaPriority needs to check if workSettings have priorities, via EverWork.
1 parent 8006420 commit 6be87fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/Core/VanillaWorkSettings.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ public static class VanillaWorkSettings
1717

1818
public static int GetVanillaPriority( this Pawn pawn, WorkTypeDef worktype )
1919
{
20+
//public override float GetPriority(Pawn pawn)
21+
if (pawn.workSettings == null || !pawn.workSettings.EverWork)
22+
{
23+
return 0;
24+
}
25+
2026
if ( prioritiesFieldInfo == null )
2127
{
2228
prioritiesFieldInfo = typeof( Pawn_WorkSettings ).GetField( "priorities", AccessTools.all );

0 commit comments

Comments
 (0)