diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a2b88f --- /dev/null +++ b/.gitignore @@ -0,0 +1,303 @@ + +#Ignore thumbnails created by Windows +Thumbs.db + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs diff --git a/1.3/Assemblies/RJW_patch_Autopsy.dll b/1.3/Assemblies/RJW_patch_Autopsy.dll new file mode 100644 index 0000000..bfab639 Binary files /dev/null and b/1.3/Assemblies/RJW_patch_Autopsy.dll differ diff --git a/About/About.xml b/About/About.xml new file mode 100644 index 0000000..631f427 --- /dev/null +++ b/About/About.xml @@ -0,0 +1,33 @@ + + + + RJW patch - Harvest Organs Post Mortem + Stardust3D + +
  • 1.3
  • +
    + Stardust3D.RJW.patch.Autopsy + This mod allow organ harvest on dead bodies. This a new version which allows the player to harvest pawn-spesific organs. Happy harvest! + +
  • + UnlimitedHugs.HugsLib + HugsLib + steam://url/CommunityFilePage/818773962 +
  • +
  • + Smuffle.HarvestOrgansPostMortem + HarvestOrgansPostMortem + TODO: URL HERE +
  • +
  • + rim.job.world + RimJobWorld + https://gitgud.io/Ed86/rjw +
  • +
    + +
  • UnlimitedHugs.HugsLib
  • +
  • Smuffle.HarvestOrgansPostMortem
  • + +
    +
    \ No newline at end of file diff --git a/About/Preview.png b/About/Preview.png new file mode 100644 index 0000000..a9af571 Binary files /dev/null and b/About/Preview.png differ diff --git a/About/PublishedFileId.txt b/About/PublishedFileId.txt new file mode 100644 index 0000000..5173da0 --- /dev/null +++ b/About/PublishedFileId.txt @@ -0,0 +1 @@ +1204502413 \ No newline at end of file diff --git a/Assemblies/RJW_patch_Autopsy.dll b/Assemblies/RJW_patch_Autopsy.dll new file mode 100644 index 0000000..bfab639 Binary files /dev/null and b/Assemblies/RJW_patch_Autopsy.dll differ diff --git a/Assemblies/RJW_patch_Autopsy.xml b/Assemblies/RJW_patch_Autopsy.xml new file mode 100644 index 0000000..0330d64 --- /dev/null +++ b/Assemblies/RJW_patch_Autopsy.xml @@ -0,0 +1,8 @@ + + + + RJW_patch_Autopsy + + + + diff --git a/Source/RJW_patch_Autopsy.sln b/Source/RJW_patch_Autopsy.sln new file mode 100644 index 0000000..5ce58d1 --- /dev/null +++ b/Source/RJW_patch_Autopsy.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31911.196 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Autopsy RJW Patch", "RJW_patch_Autopsy\Autopsy RJW Patch.csproj", "{F17C6B3F-BA9D-4133-A201-1265A64BCB71}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F17C6B3F-BA9D-4133-A201-1265A64BCB71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DBAFE1CE-D76E-4E7B-9E31-5DBC343D7281} + EndGlobalSection +EndGlobal diff --git a/Source/RJW_patch_Autopsy/Autopsy RJW Patch.csproj b/Source/RJW_patch_Autopsy/Autopsy RJW Patch.csproj new file mode 100644 index 0000000..8121149 --- /dev/null +++ b/Source/RJW_patch_Autopsy/Autopsy RJW Patch.csproj @@ -0,0 +1,92 @@ + + + + + Debug + AnyCPU + {F17C6B3F-BA9D-4133-A201-1265A64BCB71} + Library + Properties + RJW_patch_Autopsy + RJW_patch_Autopsy + v4.7.2 + 512 + + + + + true + portable + false + ..\..\Assemblies\ + DEBUG;TRACE + prompt + 4 + false + + + + + portable + true + ..\..\Assemblies\ + + + prompt + 4 + false + ..\..\Assemblies\RJW_patch_Autopsy.xml + true + + + true + + + + ..\packages\Lib.Harmony.2.1.1\lib\net472\0Harmony.dll + + + ..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + False + + + False + ..\..\..\__LocalCopy_Harvest Organs Post Mortem_-11-12\1.3\Assemblies\Autopsy.dll + + + ..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll + False + + + ..\..\..\rjw-base\1.3\Assemblies\RJW.dll + + + + + + + + + ..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll + False + + + ..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + False + + + ..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll + False + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/RJW_patch_Autopsy/Mod.cs b/Source/RJW_patch_Autopsy/Mod.cs new file mode 100644 index 0000000..24be257 --- /dev/null +++ b/Source/RJW_patch_Autopsy/Mod.cs @@ -0,0 +1,10 @@ +using HugsLib; + +namespace RJW_patch_Autopsy +{ + public class Mod : ModBase + { + public override string ModIdentifier => "RJW Patch - Autopsy"; + + } +} \ No newline at end of file diff --git a/Source/RJW_patch_Autopsy/Patches/Harmony.cs b/Source/RJW_patch_Autopsy/Patches/Harmony.cs new file mode 100644 index 0000000..4af076b --- /dev/null +++ b/Source/RJW_patch_Autopsy/Patches/Harmony.cs @@ -0,0 +1,16 @@ +using HarmonyLib; +using System.Reflection; +using Verse; + +namespace RJW_patch_Autopsy +{ + [StaticConstructorOnStartup] + internal static class First + { + static First() + { + var har = new Harmony("Stardust3D.RJW.patch.Autopsy"); + har.PatchAll(Assembly.GetExecutingAssembly()); + } + } +} diff --git a/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs b/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs new file mode 100644 index 0000000..97f2e9c --- /dev/null +++ b/Source/RJW_patch_Autopsy/Patches/NewMedicalRecipesUtilityPatch.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Verse; +using rjw; +using Autopsy; +using HarmonyLib; + +namespace RJW_patch_Autopsy +{ + [HarmonyPatch(typeof(NewMedicalRecipesUtility), "TraverseBody")] + public static class NewMedicalRecipesUtilityPatch + { + [HarmonyPostfix] + public static void AddRjwParts(RecipeInfo recipeInfo, Corpse corpse, float skillChance, ref IEnumerable __result) + { + var previousResult = __result.ToList(); + + //Collect rjw rediffs + IEnumerable rjwDiffs = from x in corpse.InnerPawn.health.hediffSet.hediffs + where x is Hediff_PartBaseNatural || x is Hediff_PartBaseArtifical + select x; + + //Collect parts from hediffs rjw's surgery methods + IEnumerable rjwThings = rjwDiffs.Select(d => SexPartAdder.recipePartRemover(d)); + + //Simulate success chance scaled with skill etc. + rjwThings.ToList().ForEach(t => { if (Rand.Chance(Math.Min(skillChance, recipeInfo.NaturalChance))) previousResult.Add(t); }); + + //Remove all parts that were tried to harves from the corpse + rjwDiffs.ToList().ForEach(d => corpse.InnerPawn.health.RemoveHediff(d)); + + __result = previousResult; + } + } +} diff --git a/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs b/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3856236 --- /dev/null +++ b/Source/RJW_patch_Autopsy/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("RJW_patch_Autopsy")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RJW_patch_Autopsy")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4a00fc3e-123a-492b-96de-06af9c982b7a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Source/RJW_patch_Autopsy/packages.config b/Source/RJW_patch_Autopsy/packages.config new file mode 100644 index 0000000..6fa11be --- /dev/null +++ b/Source/RJW_patch_Autopsy/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file