This commit is contained in:
Stardust3D 2022-01-22 15:02:58 +01:00
parent eeb61f1faa
commit 34522848ea
10 changed files with 135 additions and 126 deletions

6
.gitignore vendored
View File

@ -301,3 +301,9 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs
Assemblies/0Harmony.dll
Assemblies/0Harmony.xml
Assemblies/0MultiplayerAPI.dll
Assemblies/Autopsy.dll
Assemblies/RJW.dll
Assemblies/RJW_patch_Autopsy.xml

Binary file not shown.

View File

@ -7,7 +7,8 @@
<li>1.3</li>
</supportedVersions>
<packageId>Stardust3D.RJW.patch.Autopsy</packageId>
<description>This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.</description>
<description>This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.
</description>
<modDependencies>
<li>
<packageId>UnlimitedHugs.HugsLib</packageId>

Binary file not shown.

View File

@ -54,20 +54,20 @@ namespace RJW_patch_Autopsy
//rjwArtificialThings.Count(), rjwNaturalDiffs.Count(), rjwArtificialThings.Count(), rjwArtificialDiffs.Count()));
//Simulate success chance scaled with skill etc.
rjwNaturalThings.ToList().ForEach(t =>
rjwNaturalThings.ForEach(t =>
{
if (Rand.Chance(Math.Min(skillChance, recipeInfo.NaturalChance))) results.Add(t);
});
rjwArtificialThings.ToList().ForEach(t =>
rjwArtificialThings.ForEach(t =>
{
if (Rand.Chance(Math.Min(skillChance, recipeInfo.BionicChance))) results.Add(t);
});
//Remove all parts that were tried to harves from the corpse
rjwNaturalDiffs.ToList().ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
rjwArtificialDiffs.ToList().ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
//Remove all parts that were tried to harvest from the corpse
rjwNaturalDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
rjwArtificialDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
if (results.Count() > recipeInfo.PartNumber)
if (results.Count > recipeInfo.PartNumber)
{
var random = new Random();
__result = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber);

View File

@ -5,7 +5,9 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RJW patch - Harvest Organs Post Mortem")]
[assembly: AssemblyDescription("This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.")]
[assembly:
AssemblyDescription(
"This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RJW_patch_Autopsy")]

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.2.0" targetFramework="net48" />
<package id="Lib.Harmony" version="2.2.0" targetFramework="net48"/>
</packages>

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists