diff --git a/.gitignore b/.gitignore
index 1976a72..3a2b88f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -301,9 +301,3 @@ __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
diff --git a/1.3/Assemblies/RJW_patch_Autopsy.dll b/1.3/Assemblies/RJW_patch_Autopsy.dll
index e8120a4..d9df314 100644
Binary files a/1.3/Assemblies/RJW_patch_Autopsy.dll and b/1.3/Assemblies/RJW_patch_Autopsy.dll differ
diff --git a/About/Manifest.xml b/About/Manifest.xml
index 38134a3..0c1a845 100644
--- a/About/Manifest.xml
+++ b/About/Manifest.xml
@@ -2,5 +2,5 @@
RJW patch - Harvest Organs Post Mortem
- 4943.0.1.3
+ 4943.0.1.4
\ No newline at end of file
diff --git a/Assemblies/RJW_patch_Autopsy.dll b/Assemblies/RJW_patch_Autopsy.dll
index afe9774..d9df314 100644
Binary files a/Assemblies/RJW_patch_Autopsy.dll and b/Assemblies/RJW_patch_Autopsy.dll differ
diff --git a/Source/RJW_patch_Autopsy.sln b/Source/RJW_patch_Autopsy.sln
index fb9c555..62fd520 100644
--- a/Source/RJW_patch_Autopsy.sln
+++ b/Source/RJW_patch_Autopsy.sln
@@ -1,10 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31911.196
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RJW_patch_Autopsy", "RJW_patch_Autopsy\RJW_patch_Autopsy.csproj", "{F17C6B3F-BA9D-4133-A201-1265A64BCB71}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RimJobWorld.Main", "..\..\rjw-base\1.3\Source\RimJobWorld.Main.csproj", "{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autopsy", "..\..\RimwoldAutopsy\Source\Autopsy\Autopsy.csproj", "{CDD2AF9A-353D-4313-A9EF-517BF4547D3A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +19,14 @@ Global
{F17C6B3F-BA9D-4133-A201-1265A64BCB71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F17C6B3F-BA9D-4133-A201-1265A64BCB71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F17C6B3F-BA9D-4133-A201-1265A64BCB71}.Release|Any CPU.Build.0 = Release|Any CPU
+ {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CDD2AF9A-353D-4313-A9EF-517BF4547D3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CDD2AF9A-353D-4313-A9EF-517BF4547D3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CDD2AF9A-353D-4313-A9EF-517BF4547D3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CDD2AF9A-353D-4313-A9EF-517BF4547D3A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs b/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs
index ae87c4d..a11bf78 100644
--- a/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs
+++ b/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs
@@ -8,12 +8,22 @@ using HarmonyLib;
namespace RJW_patch_Autopsy
{
- [HarmonyPatch(typeof(NewMedicalRecipesUtility), "TraverseBody")]
+ [HarmonyPatch(typeof(NewMedicalRecipesUtility), nameof(NewMedicalRecipesUtility.TraverseBody))]
public static class NewMedicalRecipesUtilityPatch
{
+ private const bool DO_LOG = false;
+
+ private static void log(String message)
+ {
+ if (DO_LOG)
+ {
+ Log.Message(message);
+ }
+ }
+
[HarmonyPostfix]
- public static void AddRjwParts(RecipeInfo recipeInfo, Corpse corpse, float skillChance,
- ref IEnumerable __result)
+ public static IEnumerable AddRjwParts(IEnumerable __result, RecipeInfo recipeInfo, Corpse corpse,
+ float skillChance)
{
/*//Collect vanilla parts
var core = corpse.InnerPawn.RaceProps.body.corePart;
@@ -36,7 +46,7 @@ namespace RJW_patch_Autopsy
NewMedicalRecipesUtility.DamageHarvested(corpse.InnerPawn, part);
*/
var results = __result.ToList();
- Log.Message($"Collected {results.Count} vanilla parts");
+ log($"Collected {results.Count} vanilla parts");
//Collect rjw rediffs
var rjwNaturalDiffs = (from x in corpse.InnerPawn.health.hediffSet.hediffs
@@ -46,7 +56,7 @@ namespace RJW_patch_Autopsy
where x is Hediff_PartBaseArtifical
select x).ToList();
- Log.Message($"Collected {rjwNaturalDiffs.Count} natural and {rjwArtificialDiffs.Count} artificial hediffs");
+ log($"Collected {rjwNaturalDiffs.Count} natural and {rjwArtificialDiffs.Count} artificial hediffs");
//Collect parts from hediffs rjw's surgery methods
var rjwNaturalThings = rjwNaturalDiffs.Select(hediff =>
@@ -62,7 +72,7 @@ namespace RJW_patch_Autopsy
return tmp;
}).ToList();
- Log.Message(
+ log(
$"Collected {rjwNaturalThings.Count} things from {rjwNaturalDiffs.Count} natural and {rjwArtificialThings.Count} things from {rjwArtificialDiffs.Count} artificial hediffs");
//Simulate success chance scaled with skill etc.
@@ -82,13 +92,13 @@ namespace RJW_patch_Autopsy
if (results.Count > recipeInfo.PartNumber)
{
var random = new Random();
- __result = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber);
- }
- else
- {
- __result = results;
+ results = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber).ToList();
}
+ foreach (var result in results)
+ {
+ yield return result;
+ }
// return false;
}
}
diff --git a/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs b/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs
index 62ae99e..648c1dc 100644
--- a/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs
+++ b/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs
@@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RJW_patch_Autopsy")]
-[assembly: AssemblyCopyright("©2021 Stardust3D")]
+[assembly: AssemblyCopyright("©2022 Stardust3D")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4943.0.1.3")]
-[assembly: AssemblyFileVersion("4943.0.1.3")]
\ No newline at end of file
+[assembly: AssemblyVersion("4943.0.1.4")]
+[assembly: AssemblyFileVersion("4943.0.1.4")]
\ No newline at end of file
diff --git a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.csproj b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.csproj
index b7550b7..da46f81 100644
--- a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.csproj
+++ b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.csproj
@@ -1,88 +1,94 @@
-
-
- Debug
- AnyCPU
- {F17C6B3F-BA9D-4133-A201-1265A64BCB71}
- Library
- Properties
- RJW_patch_Autopsy
- RJW_patch_Autopsy
- v4.8
- 512
-
-
-
-
- true
- portable
- false
- ..\..\Assemblies\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
-
-
- portable
- true
- ..\..\Assemblies\
-
-
- prompt
- 4
- false
- ..\..\Assemblies\RJW_patch_Autopsy.xml
- true
-
-
- true
-
-
- true
-
-
- false
-
-
-
- ..\packages\Lib.Harmony.2.2.0\lib\net48\0Harmony.dll
-
-
- ..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
- False
-
-
- ..\..\..\RimwoldAutopsy\1.3\Assemblies\Autopsy.dll
-
-
- ..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll
- False
-
-
- ..\..\..\rjw-base\1.3\Assemblies\RJW.dll
-
-
-
-
-
-
-
-
-
-
-
- About\About.xml
-
-
- About\Manifest.xml
-
-
-
-
-
-
+
+
+ Debug
+ AnyCPU
+ {F17C6B3F-BA9D-4133-A201-1265A64BCB71}
+ Library
+ Properties
+ RJW_patch_Autopsy
+ RJW_patch_Autopsy
+ v4.8
+ 512
+
+
+ RJW_patch_Autopsy.snk
+
+
+ true
+ portable
+ false
+ ..\..\Assemblies\
+ DEBUG;TRACE
+ prompt
+ 4
+ false
+
+
+
+
+ portable
+ true
+ ..\..\Assemblies\
+
+
+ prompt
+ 4
+ false
+ ..\..\Assemblies\RJW_patch_Autopsy.xml
+ true
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ ..\packages\Lib.Harmony.2.2.0\lib\net48\0Harmony.dll
+
+
+ ..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
+ False
+
+
+ ..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll
+ False
+
+
+
+
+
+
+
+
+
+
+
+ About\About.xml
+
+
+ About\Manifest.xml
+
+
+
+
+
+
+
+
+ {f17c6b3f-ba9d-4133-a201-1265a64bcb71}
+ Autopsy
+
+
+ {22f82fff-8bd4-4cee-9f22-c7da71281e72}
+ RimJobWorld.Main
+
+
+
\ No newline at end of file
diff --git a/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.snk b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.snk
new file mode 100644
index 0000000..f2804cb
Binary files /dev/null and b/Source/RJW_patch_Autopsy/RJW_patch_Autopsy.snk differ
diff --git a/Source/build.gradle.kts b/Source/build.gradle.kts
index ba76621..cc978e1 100644
--- a/Source/build.gradle.kts
+++ b/Source/build.gradle.kts
@@ -11,7 +11,7 @@ plugins {
//id("com.ullink.nunit") version "1.12"
}
-version = "4943.0.1.3"
+version = "4943.0.1.4"
val friendlyName = "rjw-patch-autopsy"
tasks.register("buildC#") {