Skip to content

Commit

Permalink
0.9.9
Browse files Browse the repository at this point in the history
- added sub-tabs in "Work" Tab and "Assign" Tab for "Colonists" and "Prisoners"
- added renaming Prisoners for imprisonment time (pawns will restore old names after releasing)
  • Loading branch information
Aviuz committed Nov 2, 2018
1 parent 57dd787 commit 3dd2972
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 8 deletions.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>Prison Labor</name>
<author>Avius</author>
<targetVersion>1.0.0</targetVersion>
<description>Version 0.9.8
<description>Version 0.9.9

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.
4 changes: 4 additions & 0 deletions Languages/English/Keyed/Keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,8 @@
<PrisonLabor_EnableRevoltsDesc>When enabled revolts will sometimes occur instead of vanilla incidents</PrisonLabor_EnableRevoltsDesc>
<PrisonLabor_LaborAreaWarning>Labor area isn't required to make prisoners work.\n\nThis area forbids colonists from working.\n\nIt's for situations where you don't want colonists to work in certain area. Prisoners will work anywhere they can enter.</PrisonLabor_LaborAreaWarning>
<PrisonLabor_DontShowAgain>Don't show again</PrisonLabor_DontShowAgain>

<PrisonLabor_ColonyOnlyShort>Everyone</PrisonLabor_ColonyOnlyShort>
<PrisonLabor_ColonistsOnlyShort>Colonists</PrisonLabor_ColonistsOnlyShort>
<PrisonLabor_PrisonersOnlyShort>Prisoners</PrisonLabor_PrisonersOnlyShort>
</LanguageData>
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-0.9.8-orange.svg?style=flat" alt="v0.9.8" />
<img src="https://img.shields.io/badge/version-0.9.9-orange.svg?style=flat" alt="v0.9.9" />
</a>
</p>

Expand Down
2 changes: 1 addition & 1 deletion Source/HarmonyPatches/Patch_RenamePrisoners.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static IEnumerable<CodeInstruction> Transpiler(ILGenerator gen, MethodBase mBase

foreach (var instr in instructions)
{
if (HPatcher.IsFragment(opCodes, operands, instr, ref step, nameof(Patch_RenamePrisoners) + nameof(EnableRenamingPrisoners), true))
if (HPatcher.IsFragment(opCodes, operands, instr, ref step, nameof(Patch_RenamePrisoners) + nameof(EnableRenamingPrisoners)))
{
yield return new CodeInstruction(OpCodes.Call, typeof(EnableRenamingPrisoners).GetMethod(nameof(IsColonistOrPrisonerOfColony)));
}
Expand Down
81 changes: 80 additions & 1 deletion Source/NewsDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ internal class NewsDialog : Window
public static bool news_0_9_0 = false;
public static bool news_0_9_1 = false;
public static bool news_0_9_2 = false;
public static bool news_0_9_9 = false;

// Fields
private string[] titles;
Expand All @@ -53,7 +54,85 @@ public void Init()
// [img] ... [/img] for image (inside name of file)
// [gap] for gap

// TODO 0.9.3
// 0.9.9
if (news_0_9_9 || showAll)
{
titlesList.Add("Prison Labor Beta v0.9.8");
string[] itemsArray =
{
"added sub-tabs in \"Work\" Tab and \"Assign\" Tab for \"Colonists\" and \"Prisoners\"",
"added renaming Prisoners for imprisonment time (pawns will restore old names after releasing)",
};
itemsList.Add(itemsArray);
}

// 0.9.8
if (showAll)
{
titlesList.Add("Prison Labor Beta v0.9.8");
string[] itemsArray =
{
"fixed SeedsPlease compatibility",
};
itemsList.Add(itemsArray);
}

// 0.9.7
if (showAll)
{
titlesList.Add("Prison Labor Beta v0.9.7");
string[] itemsArray =
{
"added warning message before placing labor area for the first time",
};
itemsList.Add(itemsArray);
}

// 0.9.6
if (showAll)
{
titlesList.Add("Prison Labor Beta v0.9.6");
string[] itemsArray =
{
"updated to RimWorld 1.0",
};
itemsList.Add(itemsArray);
}

// 0.9.5
if (showAll)
{
titlesList.Add("Prison Labor Beta v0.9.5");
string[] itemsArray =
{
"updated to RimWorld Beta 19",
};
itemsList.Add(itemsArray);
}

// 0.9.4
if (showAll)
{
titlesList.Add("Prison Labor Beta v0.9.4");
string[] itemsArray =
{
"disabled Warden and Jailor types of work for prisoner labor, it should fix bug, where jailors do not warden inside labor area",
};
itemsList.Add(itemsArray);
}

// 0.9.3
if (showAll)
{
titlesList.Add("Prison Labor Beta v0.9.3");
string[] itemsArray =
{
"fixed compatibility with No Water no Life",
"fixed compatibility with Dubs Bad Hygiene Mod",
"fixed error with loading old saves",
};
itemsList.Add(itemsArray);
}

// 0.9.2
if (news_0_9_2 || showAll)
Expand Down
3 changes: 2 additions & 1 deletion Source/PrefsData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public enum Version
v0_9_4,
v0_9_5,
v0_9_6,
v0_9_8
v0_9_8,
v0_9_9
}

[Flags]
Expand Down
1 change: 0 additions & 1 deletion Source/PrisonLabor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
<Compile Include="HarmonyPatches\Patch_RemoveHediffIfDisabled.cs" />
<Compile Include="HarmonyPatches\Patch_RemoveLaborAreaIfDisabled.cs" />
<Compile Include="HarmonyPatches\Patch_RenamePrisoners.cs" />
<Compile Include="HarmonyPatches\Patch_ResetWorktableWhenRecruited.cs" />
<Compile Include="HarmonyPatches\Patch_ReservedByPrisoner.cs" />
<Compile Include="HarmonyPatches\Patch_RespectReservation.cs" />
<Compile Include="HarmonyPatches\Patch_RestrainsPatch.cs" />
Expand Down
9 changes: 7 additions & 2 deletions Source/VersionUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace PrisonLabor
{
class VersionUtility
{
public const Version versionNumber = Version.v0_9_8;
public const string versionString = "0.9.8";
public const Version versionNumber = Version.v0_9_9;
public const string versionString = "0.9.9";

public static void CheckVersion()
{
Expand Down Expand Up @@ -79,6 +79,11 @@ public static void CheckVersion()
{
CompatibilityPatches.OlderVersions.Pre_v0_9_4();
}
if (PrisonLaborPrefs.LastVersion < Version.v0_9_9)
{
NewsDialog.news_0_9_9 = true;
NewsDialog.autoShow = true;
}

PrisonLaborPrefs.Version = versionNumber;
PrisonLaborPrefs.Save();
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Changelog:
- fixed blurred effect on settings window
0.9.9
- added sub-tabs in "Work" Tab and "Assign" Tab for "Colonists" and "Prisoners"
- added renaming Prisoners for imprisonment time (pawns will restore old names after releasing)
0.9.8
- fixed SeedsPlease compatibility
0.9.7
Expand Down

0 comments on commit 3dd2972

Please sign in to comment.