Skip to content

Commit

Permalink
Some npr removal (#183)
Browse files Browse the repository at this point in the history
* RC some npr fixes

* Ver up

* Add dlls

Co-authored-by: Hazzer <[email protected]>
  • Loading branch information
Hazzer and Hazzer authored Jun 11, 2020
1 parent c97daf9 commit fcc4fb6
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 5 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.5
<description>Version 1.1.6

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.5-orange.svg?style=flat" alt="v1.1.5" />
<img src="https://img.shields.io/badge/version-1.1.6-orange.svg?style=flat" alt="v1.1.6" />
</a>
</p>

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 @@ -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
}
}
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_5;
public const string versionString = "1.1.5";
public const Version versionNumber = Version.v1_1_6;
public const string versionString = "1.1.6";

public static Version VersionOfSaveFile { get; set; }

Expand Down
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;

}
}
}
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Changelog:
1.1.6
- removed patching for mod SeedsPlease. Potientialy should work with PL without issue. (Not tested)
- added more checks to NPR exceptions
1.1.5
- remove wealth tracker from prisioners mining
- updated part releated with seed please (no tested)
Expand Down

0 comments on commit fcc4fb6

Please sign in to comment.