Skip to content

Commit

Permalink
Fix for Quarry (#187)
Browse files Browse the repository at this point in the history
Co-authored-by: Hazzer <[email protected]>
  • Loading branch information
Hazzer and Hazzer authored Jun 14, 2020
1 parent fcc4fb6 commit fcaa7bf
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</li>
</modDependencies>

<description>Version 1.1.6
<description>Version 1.1.7

This mod force prisoners to work. To enable this feature prisoners must have "Force to work" option checked ("Prisoner" tab). Prison labor needs management that consist:
- Motivation - prisoners need to be motivated by presence of colonists. Wardens have new job - supervising prisoners. Low motivation can lead to revolts.
Expand Down
Binary file modified Assemblies/PrisonLabor.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>
<p align="center">
<a href="https://github.com/Aviuz/PrisonLabor/releases">
<img src="https://img.shields.io/badge/version-1.1.6-orange.svg?style=flat" alt="v1.1.6" />
<img src="https://img.shields.io/badge/version-1.1.7-orange.svg?style=flat" alt="v1.1.7" />
</a>
</p>

Expand Down
2 changes: 1 addition & 1 deletion Source/CompatibilityPatches/Quarry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static Job postfix_Job(Job __result, Pawn pawn, Thing t, bool forced)
{
WorkTypeDef workDef = DefDatabase<WorkTypeDef>.GetNamed("QuarryMining");

if (__result != null && pawn.Faction.IsPlayer && !pawn.IsPrisonerOfColony && PrisonLaborUtility.IsDisabledByLabor(__result.targetA.Cell, pawn, workDef))
if (__result != null && !pawn.IsPrisonerOfColony && pawn.Faction != null && pawn.Faction.IsPlayer && PrisonLaborUtility.IsDisabledByLabor(__result.targetA.Cell, pawn, workDef))
{
return null;
}
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Meta/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public enum Version
v1_1_3,
v1_1_4,
v1_1_5,
v1_1_6
v1_1_6,
v1_1_7
}
}
4 changes: 2 additions & 2 deletions Source/Core/Meta/VersionUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace PrisonLabor.Core.Meta
{
class VersionUtility
{
public const Version versionNumber = Version.v1_1_6;
public const string versionString = "1.1.6";
public const Version versionNumber = Version.v1_1_7;
public const string versionString = "1.1.7";

public static Version VersionOfSaveFile { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Changelog:
1.1.7
- fix for NPR in quarry patches
1.1.6
- removed patching for mod SeedsPlease. Potientialy should work with PL without issue. (Not tested)
- added more checks to NPR exceptions
Expand Down

0 comments on commit fcaa7bf

Please sign in to comment.