Skip to content

Commit

Permalink
ignore borrowed animals
Browse files Browse the repository at this point in the history
so that we don't accidentally slaughter any Empire pets :D
  • Loading branch information
FluffierThanThou committed May 22, 2020
1 parent 12c8939 commit 548d9cd
Show file tree
Hide file tree
Showing 5 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 @@ -72,7 +72,7 @@ maarxx: Various fixes and improvements
rimpy-custom: Fix for Russian translation

<size=24>Version</size>
This is version 4.30.612, for RimWorld 1.1.2624.
This is version 4.30.615, for RimWorld 1.1.2624.

</description>
<supportedVersions>
Expand Down
Binary file modified Assemblies/Fluffy_ColonyManager.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 @@ -79,4 +79,4 @@ Show your appreciation by buying me a coffee (or contribute towards a nice singl
[![I Have a Black Dog](https://i.ibb.co/ss59Rwy/New-Project-2.png)](https://www.youtube.com/watch?v=XiCrniLQGYc)

# Version
This is version 4.30.612, for RimWorld 1.1.2624.
This is version 4.30.615, for RimWorld 1.1.2624.
9 changes: 6 additions & 3 deletions Source/Helpers/Livestock/Utilities_Livestock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ public static IEnumerable<Pawn> GetAll( this PawnKindDef pawnKind, Map map )

// if not, set up a cache
Func<IEnumerable<Pawn>> getter = () => map.mapPawns.AllPawns
.Where( p => p.RaceProps.Animal // is animal
&& !p.Dead // is alive
&& p.kindDef == pawnKind ); // is our managed pawnkind
.Where( p => p.RaceProps.Animal // is animal
&& !p.Dead // is alive
&& p.kindDef == pawnKind // is our managed pawnkind
&& !( p.Faction == Faction.OfPlayer &&
p.HasExtraHomeFaction()
) ); // was not borrowed to us

AllCache.Add( key, getter );
return getter();
Expand Down
2 changes: 1 addition & 1 deletion Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("4.0.0")]
[assembly: AssemblyFileVersion("4.30.612")]
[assembly: AssemblyFileVersion("4.30.615")]

0 comments on commit 548d9cd

Please sign in to comment.