This commit is contained in:
Stardust3D 2022-01-22 15:02:58 +01:00
parent 513d762bb1
commit 930ca229ba
10 changed files with 135 additions and 126 deletions

6
.gitignore vendored
View file

@ -301,3 +301,9 @@ __pycache__/
*.btm.cs *.btm.cs
*.odx.cs *.odx.cs
*.xsd.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> <li>1.3</li>
</supportedVersions> </supportedVersions>
<packageId>Stardust3D.RJW.patch.Autopsy</packageId> <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> <modDependencies>
<li> <li>
<packageId>UnlimitedHugs.HugsLib</packageId> <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())); //rjwArtificialThings.Count(), rjwNaturalDiffs.Count(), rjwArtificialThings.Count(), rjwArtificialDiffs.Count()));
//Simulate success chance scaled with skill etc. //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); 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); if (Rand.Chance(Math.Min(skillChance, recipeInfo.BionicChance))) results.Add(t);
}); });
//Remove all parts that were tried to harves from the corpse //Remove all parts that were tried to harvest from the corpse
rjwNaturalDiffs.ToList().ForEach(d => corpse.InnerPawn.health.RemoveHediff(d)); rjwNaturalDiffs.ForEach(d => corpse.InnerPawn.health.RemoveHediff(d));
rjwArtificialDiffs.ToList().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(); var random = new Random();
__result = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber); __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 // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("RJW patch - Harvest Organs Post Mortem")] [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: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RJW_patch_Autopsy")] [assembly: AssemblyProduct("RJW_patch_Autopsy")]

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists