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 *.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

@ -1,33 +1,34 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ModMetaData> <ModMetaData>
<name>RJW patch - Harvest Organs Post Mortem</name> <name>RJW patch - Harvest Organs Post Mortem</name>
<author>Stardust3D</author> <author>Stardust3D</author>
<supportedVersions> <supportedVersions>
<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.
<modDependencies> </description>
<li> <modDependencies>
<packageId>UnlimitedHugs.HugsLib</packageId> <li>
<displayName>HugsLib</displayName> <packageId>UnlimitedHugs.HugsLib</packageId>
<steamWorkshopUrl>steam://url/CommunityFilePage/818773962</steamWorkshopUrl> <displayName>HugsLib</displayName>
</li> <steamWorkshopUrl>steam://url/CommunityFilePage/818773962</steamWorkshopUrl>
<li> </li>
<packageId>Smuffle.HarvestOrgansPostMortem</packageId> <li>
<displayName>HarvestOrgansPostMortem</displayName> <packageId>Smuffle.HarvestOrgansPostMortem</packageId>
<downloadUrl>https://github.com/DenJur/RimwoldAutopsy</downloadUrl> <displayName>HarvestOrgansPostMortem</displayName>
</li> <downloadUrl>https://github.com/DenJur/RimwoldAutopsy</downloadUrl>
<li> </li>
<packageId>rim.job.world</packageId> <li>
<displayName>RimJobWorld</displayName> <packageId>rim.job.world</packageId>
<downloadUrl>https://gitgud.io/Ed86/rjw</downloadUrl> <displayName>RimJobWorld</displayName>
</li> <downloadUrl>https://gitgud.io/Ed86/rjw</downloadUrl>
</modDependencies> </li>
<loadAfter> </modDependencies>
<li>UnlimitedHugs.HugsLib</li> <loadAfter>
<li>Smuffle.HarvestOrgansPostMortem</li> <li>UnlimitedHugs.HugsLib</li>
<!--<li>rim.job.world</li>--> <li>Smuffle.HarvestOrgansPostMortem</li>
</loadAfter> <!--<li>rim.job.world</li>-->
</loadAfter>
</ModMetaData> </ModMetaData>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest> <Manifest>
<identifier>RJW patch - Harvest Organs Post Mortem</identifier> <identifier>RJW patch - Harvest Organs Post Mortem</identifier>
<version>4943.0.1.3</version> <version>4943.0.1.3</version>
</Manifest> </Manifest>

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")]
@ -32,4 +34,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4943.0.1.3")] [assembly: AssemblyVersion("4943.0.1.3")]
[assembly: AssemblyFileVersion("4943.0.1.3")] [assembly: AssemblyFileVersion("4943.0.1.3")]

View File

@ -1,88 +1,88 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F17C6B3F-BA9D-4133-A201-1265A64BCB71}</ProjectGuid> <ProjectGuid>{F17C6B3F-BA9D-4133-A201-1265A64BCB71}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RJW_patch_Autopsy</RootNamespace> <RootNamespace>RJW_patch_Autopsy</RootNamespace>
<AssemblyName>RJW_patch_Autopsy</AssemblyName> <AssemblyName>RJW_patch_Autopsy</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType> <DebugType>portable</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\..\Assemblies\</OutputPath> <OutputPath>..\..\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<DocumentationFile> <DocumentationFile>
</DocumentationFile> </DocumentationFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>portable</DebugType> <DebugType>portable</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\..\Assemblies\</OutputPath> <OutputPath>..\..\Assemblies\</OutputPath>
<DefineConstants> <DefineConstants>
</DefineConstants> </DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>..\..\Assemblies\RJW_patch_Autopsy.xml</DocumentationFile> <DocumentationFile>..\..\Assemblies\RJW_patch_Autopsy.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignAssembly>true</SignAssembly> <SignAssembly>true</SignAssembly>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="0Harmony, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.2.0\lib\net48\0Harmony.dll</HintPath> <HintPath>..\packages\Lib.Harmony.2.2.0\lib\net48\0Harmony.dll</HintPath>
</Reference> </Reference>
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath> <HintPath>..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Autopsy"> <Reference Include="Autopsy">
<HintPath>..\..\..\RimwoldAutopsy\1.3\Assemblies\Autopsy.dll</HintPath> <HintPath>..\..\..\RimwoldAutopsy\1.3\Assemblies\Autopsy.dll</HintPath>
</Reference> </Reference>
<Reference Include="HugsLib"> <Reference Include="HugsLib">
<HintPath>..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll</HintPath> <HintPath>..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="RJW"> <Reference Include="RJW">
<HintPath>..\..\..\rjw-base\1.3\Assemblies\RJW.dll</HintPath> <HintPath>..\..\..\rjw-base\1.3\Assemblies\RJW.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Core" /> <Reference Include="System.Core" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Patches\Harmony.cs" /> <Compile Include="Patches\Harmony.cs" />
<Compile Include="Patches\NewMedicalRecipesUtilityPatch.cs" /> <Compile Include="Patches\NewMedicalRecipesUtilityPatch.cs" />
<Compile Include="Mod.cs" /> <Compile Include="Mod.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\..\About\About.xml"> <Content Include="..\..\About\About.xml">
<Link>About\About.xml</Link> <Link>About\About.xml</Link>
</Content> </Content>
<Content Include="..\..\About\Manifest.xml"> <Content Include="..\..\About\Manifest.xml">
<Link>About\Manifest.xml</Link> <Link>About\Manifest.xml</Link>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

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

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