-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* RC some npr fixes * Ver up * Add dlls Co-authored-by: Hazzer <[email protected]>
- Loading branch information
Showing
7 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ public enum Version | |
v1_1_2, | ||
v1_1_3, | ||
v1_1_4, | ||
v1_1_5 | ||
v1_1_5, | ||
v1_1_6 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Source/HarmonyPatches/Patches_NPR/ListerBuildingsRepairable_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using HarmonyLib; | ||
using RimWorld; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Verse; | ||
|
||
namespace PrisonLabor.HarmonyPatches.Patches_NPR | ||
{ | ||
[HarmonyPatch(typeof(WorkGiver_Repair))] | ||
[HarmonyPatch("ShouldSkip")] | ||
[HarmonyPatch(new[] { typeof(Pawn), typeof(bool) })] | ||
class ListerBuildingsRepairable_Patch | ||
{ | ||
|
||
static bool Prefix(ref bool __result, Pawn pawn, bool forced) | ||
{ | ||
if(pawn.Faction == null && pawn.IsPrisonerOfColony) | ||
{ | ||
__result = pawn.Map.listerBuildingsRepairable.RepairableBuildings(Faction.OfPlayer).Count == 0; | ||
return false; | ||
} | ||
return true; | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters