Skip to content

Commit

Permalink
Fixed release when healthy alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
emipa606 committed May 27, 2024
1 parent fd2fd5e commit cb5ccaa
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
Binary file modified 1.5/Assemblies/CustomPrisonerInteractions.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ Since modding is just a hobby for me I expect no donations to keep modding. If y
[/list]

[url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2841231775][img]https://img.shields.io/github/v/release/emipa606/CustomPrisonerInteractions?label=latest%20version&amp;style=plastic&amp;labelColor=0070cd&amp;color=white[/img][/url]</description>
<modVersion IgnoreIfNoMatchingField="True">1.5.2</modVersion>
<modVersion IgnoreIfNoMatchingField="True">1.5.3</modVersion>
</ModMetaData>
3 changes: 3 additions & 0 deletions About/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for CustomPrisonerInteractions

1.5.3 - Fixed release when healthy alternatives


1.5.2 - Fix for the latest rimworld-patch that renamed a fieldname


Expand Down
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>CustomPrisonerInteractions</identifier>
<version>1.5.2</version>
<version>1.5.3</version>
<dependencies />
<incompatibleWith />
<loadBefore />
Expand Down
2 changes: 1 addition & 1 deletion 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.5.2</Version>
<Version>1.5.3</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>emipa606</Owner>
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.5.2</FileVersion>
<FileVersion>1.5.3</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ and not CustomPrisonerInteractions.ExtraMode.ReleaseWhenAbleToWalk
return true;
}

if (extraInteractionsTracker[pawn2] is CustomPrisonerInteractions.ExtraMode.ReleaseWhenHealthy &&
!HealthAIUtility.ShouldSeekMedicalRest(pawn2))
if (extraInteractionsTracker[pawn2] is CustomPrisonerInteractions.ExtraMode.ReleaseWhenHealthy)
{
return true;
return !HealthAIUtility.ShouldSeekMedicalRest(pawn2) &&
!pawn2.health.hediffSet.HasNaturallyHealingInjury() &&
!pawn2.health.hediffSet.HasTendedAndHealingInjury();
}

if (extraInteractionsTracker[pawn2] is CustomPrisonerInteractions.ExtraMode.ReleaseWhenAbleToWalk &&
!pawn2.Downed)
if (extraInteractionsTracker[pawn2] is CustomPrisonerInteractions.ExtraMode.ReleaseWhenAbleToWalk)
{
return true;
return !pawn2.Downed;
}

return pawn2.guilt is not { IsGuilty: true };
Expand Down

0 comments on commit cb5ccaa

Please sign in to comment.