Skip to content

Commit

Permalink
Hurt prisoners that are not incapacitated and are set to release when…
Browse files Browse the repository at this point in the history
… healthy should now be brought food, thanks MaxIssaKitsune for the detailed report!
  • Loading branch information
emipa606 committed Aug 1, 2022
1 parent bd68475 commit 254174e
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 10 deletions.
Binary file modified 1.3/Assemblies/CustomPrisonerInteractions.dll
Binary file not shown.
27 changes: 27 additions & 0 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,37 @@ This mod instead adds an option-button for the Convert and the Release-choice so
The other difference is that this mod enables you to select options per prisoner. So you can for example select to release a hurt prisoner without waiting for them to be healthy without changing any global options.
There is also options in the mod-settings if you want to change what option is set by default.

The mod adds an option for Releasing prisoners:
Release when healthy - will wait to release the prisoner until they are considered healthy

It also adds the following options for the Convert option
[list]
[*]Recruit after
[*]Lower resistance first
[*]Lower resistance first, Recruit after
[*]Enslave after
[*]Lower will first
[*]Lower will first, Enslave after
[*]Release after
[*]Lower resistance first, Release after
[/list]

You can use this mod without owning Ideology, as it will still show for the release-option.

If you have suggestions for more options, please leave a comment and Ill see if I can add them to the mod.

[url=https://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=2841412975]Chinese translation[/url] by Chiwei

This mod replaces the following mods
[list]
[*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2702584632]Convert Then Recruit[/url]
[*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2705395014]Convert Then Enslave[/url]
[*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2838846353]Convert Then Release[/url]
[*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2506029522]Release When Healthy[/url]
[/list]

NOTICE: If any of your current prisoners have any of the custom interactions added by the above mods, please change these to the ”No action” setting before switching to this mod as the game will have trouble showing the prisoner tab if the selected saved action is missing.

[table]
[tr]
[td][url=https://invite.gg/Mlie][img]https://i.imgur.com/zdzzBrc.png[/img][/url][/td]
Expand Down
3 changes: 3 additions & 0 deletions About/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog for CustomPrisonerInteractions

1.3.1 - Hurt prisoners that are not incapacitated and are set to release when healthy should now be brought food, thanks MaxIssaKitsune for the detailed report!


1.3.0 - First publish

6 changes: 3 additions & 3 deletions About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>CustomPrisonerInteractions</identifier>
<version>1.3.0</version>
<version>1.3.1</version>
<dependencies />
<incompatibleWith />
<loadBefore />
<loadAfter />
<manifestUri>https://raw.githubusercontent.com/emipa606/CustomPrisonerInteractions/master/About/Manifest.xml</manifestUri>
<downloadUri>https://github.com/emipa606/CustomPrisonerInteractions/releases</downloadUri>
</Manifest>
</Manifest>
6 changes: 1 addition & 5 deletions About/ModSync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModSyncNinjaData>
<ID>74b7df5b-73c0-4825-884b-61df997d22b7</ID>
<ModName>Custom Prisoner Interactions</ModName>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>emipa606</Owner>
Expand All @@ -12,7 +12,3 @@
<Branch>master</Branch>
</Host>
</ModSyncNinjaData>




1 change: 1 addition & 0 deletions About/PublishedFileId.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2841231775
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,41 @@ This mod instead adds an option-button for the Convert and the Release-choice so
The other difference is that this mod enables you to select options per prisoner. So you can for example select to release a hurt prisoner without waiting for them to be healthy without changing any global options.
There is also options in the mod-settings if you want to change what option is set by default.

The mod adds an option for Releasing prisoners:
Release when healthy - will wait to release the prisoner until they are considered healthy

It also adds the following options for the Convert option


- Recruit after
- Lower resistance first
- Lower resistance first, Recruit after
- Enslave after
- Lower will first
- Lower will first, Enslave after
- Release after
- Lower resistance first, Release after



You can use this mod without owning Ideology, as it will still show for the release-option.

If you have suggestions for more options, please leave a comment and Ill see if I can add them to the mod.

https://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=2841412975]Chinese translation by Chiwei

This mod replaces the following mods


- https://steamcommunity.com/sharedfiles/filedetails/?id=2702584632]Convert Then Recruit
- https://steamcommunity.com/sharedfiles/filedetails/?id=2705395014]Convert Then Enslave
- https://steamcommunity.com/sharedfiles/filedetails/?id=2838846353]Convert Then Release
- https://steamcommunity.com/sharedfiles/filedetails/?id=2506029522]Release When Healthy



NOTICE: If any of your current prisoners have any of the custom interactions added by the above mods, please change these to the ”No action” setting before switching to this mod as the game will have trouble showing the prisoner tab if the selected saved action is missing.

![Image](https://i.imgur.com/O0IIlYj.png)

Since modding is just a hobby for me I expect no donations to keep modding. If you still want to show your support you can gift me anything from my https://store.steampowered.com/wishlist/id/Mlie]Wishlist or buy me a cup of tea.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<DebugType>None</DebugType>
<LangVersion>latest</LangVersion>
<FileVersion>1.3.0</FileVersion>
<FileVersion>1.3.1</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref">
Expand All @@ -18,6 +18,6 @@
<Version>*</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Mlie_Rimworld_VersionFromManifest" Version="*" />
<PackageReference Include="Mlie_Rimworld_VersionFromManifest" Version="*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using HarmonyLib;
using RimWorld;
using Verse;

namespace CustomPrisonerInteractions;

[HarmonyPatch(typeof(Pawn_GuestTracker), "CanBeBroughtFood", MethodType.Getter)]
public static class Pawn_GuestTracker_CanBeBroughtFood
{
public static void Postfix(Pawn_GuestTracker __instance, Pawn ___pawn, ref bool __result)
{
if (__result)
{
return;
}

if (__instance.interactionMode != PrisonerInteractionModeDefOf.Release)
{
return;
}

var extraInterractionsTracker = ___pawn.Map.GetExtraInteractionsTracker();
if (extraInterractionsTracker == null || !extraInterractionsTracker.Has(___pawn))
{
return;
}

__result = extraInterractionsTracker[___pawn] == CustomPrisonerInteractions.ExtraMode.ReleaseWhenHealthy;
}
}

0 comments on commit 254174e

Please sign in to comment.