Compare commits

...

30 Commits

Author SHA1 Message Date
Stardust3D 11284fbd3f Add README.md 2024-03-25 10:19:05 +00:00
Stardust3D 6025f0ae53 Merge branch 'release/5380.0.1.4' 2024-03-25 10:42:24 +01:00
Stardust3D c3df658d39 incremented version to 5380.0.1.4 2024-03-25 10:33:04 +01:00
Stardust3D e6b4c9c2c5 gradle updates 2024-03-25 10:26:47 +01:00
Stardust3D e4b00ce2c8 preparation for 1.5 2024-03-25 10:25:27 +01:00
Stardust3D 35eb217d05 tooling update
(cherry picked from commit 09a090eb35)
2024-03-25 10:02:46 +01:00
Stardust3D 72624f865d tooling update 2024-03-24 12:27:02 +01:00
Stardust3D 16a369bed8 testing 2024-01-15 02:30:28 +01:00
Stardust3D d9032fd4d9 new project layout to support 1.3 and 1.4
(cherry picked from commit 74cca35f51)
2024-01-05 16:38:37 +01:00
Stardust3D bc3020d841 new project layout to support 1.3 and 1.4 2023-10-07 15:25:57 +02:00
Stardust3D 1b78cf3f7e no clue if this state works 2023-10-05 17:46:33 +02:00
Stardust3D 839101b02a . 2022-09-12 18:26:15 +02:00
Stardust3D ffe44caaf1 Merge tag '4945.0.1.4' into develop
4945.0.1.4 4945.0.1.4
2022-03-12 16:20:02 +01:00
Stardust3D 5b0e318c18 Merge branch 'release/4945.0.1.4' 2022-03-12 16:20:01 +01:00
Stardust3D 3512bdea66 old changes 2022-03-12 16:19:29 +01:00
Stardust3D 3207f7e7a1 Merge tag '4943.0.1.4' into develop 2022-01-28 20:42:45 +01:00
Stardust3D d9d15bb18f Merge branch 'release/4943.0.1.4' 2022-01-28 20:42:44 +01:00
Stardust3D 4300036667 cleanup 2022-01-23 22:07:33 +01:00
Stardust3D 7e1cb42210 converted into postfix 2022-01-23 21:28:34 +01:00
Stardust3D 34522848ea tmp 2022-01-22 15:02:58 +01:00
Stardust3D eeb61f1faa updated gradle 2022-01-15 03:59:22 +01:00
Stardust3D 78d01d7760 added gradle 2022-01-04 21:19:07 +01:00
Stardust3D c1eea3bf36 cleanup 2022-01-02 17:35:16 +01:00
Stardust3D 184516e2e7 RJW 4.9.4.2 update 2021-12-27 18:40:54 +01:00
Stardust3D 4abbbfb30b compressed About/Preview.png 2021-12-23 21:08:46 +01:00
Stardust3D 2b05dfac95 cleanup 2021-12-18 02:32:26 +01:00
Stardust3D f2bbe509ef cleanup 2021-12-17 04:22:37 +01:00
Stardust3D 577513a0ff updated to RJW 4.9.3 2021-12-16 05:20:04 +01:00
Stardust3D f433263eac prevent original method "TraverseBody" from executing and take over its work 2021-12-16 05:19:01 +01:00
Stardust3D 31ae55667e moved everything to Harmony 2021-12-11 21:02:34 +01:00
28 changed files with 1291 additions and 0 deletions

303
.gitignore vendored Normal file
View File

@ -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

Binary file not shown.

Binary file not shown.

36
About/About.xml Normal file
View File

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

6
About/Manifest.xml Normal file
View File

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

BIN
About/Preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

1
README.md Normal file
View File

@ -0,0 +1 @@
I am sorry for the force push, but I had to remove some information from the repository's history.

6
Source/.gitattributes vendored Normal file
View File

@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

5
Source/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory
build

BIN
Source/Preview.psd Normal file

Binary file not shown.

View File

@ -0,0 +1,33 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32113.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RJW_patch_Autopsy_1.3", "RJW_patch_Autopsy\RJW_patch_Autopsy_1.3.csproj", "{F17C6B3F-BA9D-4133-A201-1265A64BCB71}"
EndProject
Project("{AE4F3486-62B9-4146-845F-22D8FFA362AE}") = "RJW_patch_Autopsy_1.4", "RJW_patch_Autopsy\RJW_patch_Autopsy_1.4.csproj", "{FC20CA27-4400-4AAC-99AF-F18CAFAC942E}"
EndProject
Project("{37127962-1266-4597-90C6-EBE1D79600EA}") = "RJW_patch_Autopsy_1.5", "RJW_patch_Autopsy\RJW_patch_Autopsy_1.5.csproj", "{25A0821A-6B42-4FB0-A454-0AD22A7716E7}"
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
{FC20CA27-4400-4AAC-99AF-F18CAFAC942E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC20CA27-4400-4AAC-99AF-F18CAFAC942E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC20CA27-4400-4AAC-99AF-F18CAFAC942E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC20CA27-4400-4AAC-99AF-F18CAFAC942E}.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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

View File

@ -0,0 +1,9 @@
using HugsLib;
namespace RJW_patch_Autopsy
{
public class Mod : ModBase
{
public override string ModIdentifier => "Stardust3D.RJW.patch.Autopsy";
}
}

View File

@ -0,0 +1,29 @@
using HarmonyLib;
using System.Reflection;
using Verse;
namespace RJW_patch_Autopsy
{
[StaticConstructorOnStartup]
public class AutopsyPatch
{
public static bool SizedApparelActive = false;
static AutopsyPatch()
{
//check SJW
if (LoadedModManager.RunningModsListForReading.Any(x => x.Name == "SizedApparel"))
{
SizedApparelActive = true;
}
if (LoadedModManager.RunningModsListForReading.Any(x => x.PackageId == "OTYOTY.SizedApparel"))
{
SizedApparelActive = true;
}
var har = new Harmony("Stardust3D.RJW.patch.Autopsy");
har.PatchAll(Assembly.GetExecutingAssembly());
}
}
}

View File

@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Verse;
using rjw;
using Autopsy;
using HarmonyLib;
namespace RJW_patch_Autopsy
{
[HarmonyPatch(typeof(NewMedicalRecipesUtility), nameof(NewMedicalRecipesUtility.TraverseBody))]
public static class NewMedicalRecipesUtilityPatch
{
private const bool DEBUG = false;
private static void log(String message)
{
if (DEBUG)
{
Log.Message(message);
}
}
[HarmonyPostfix]
public static IEnumerable<Thing> AddRjwParts(IEnumerable<Thing> __result, RecipeInfo recipeInfo, Corpse corpse,
float skillChance)
{
/*//Collect vanilla parts
var core = corpse.InnerPawn.RaceProps.body.corePart;
var queue = new List<BodyPartRecord> {core};
var hediffSet = corpse.InnerPawn.health.hediffSet;
var results = new List<Thing>();
var damagedParts = new List<BodyPartRecord>();
while (queue.Count > 0)
{
var part = queue.First();
queue.Remove(part);
//Drop parts and bionics that are higher on the body tree.
if (NewMedicalRecipesUtility.TryGetParts(corpse, recipeInfo, part, skillChance, ref results,
ref damagedParts) && core != part)
continue;
queue.AddRange(part.parts.Where(x => !hediffSet.PartIsMissing(x)));
}
foreach (var part in damagedParts)
NewMedicalRecipesUtility.DamageHarvested(corpse.InnerPawn, part);
*/
var results = __result.ToList();
log($"Collected {results.Count} vanilla parts");
//Collect rjw rediffs
var rjwNaturalDiffs = (from x in corpse.InnerPawn.health.hediffSet.hediffs
where x is Hediff_PartBaseNatural
select x).ToList();
var rjwArtificialDiffs = (from x in corpse.InnerPawn.health.hediffSet.hediffs
where x is Hediff_PartBaseArtifical
select x).ToList();
log($"Collected {rjwNaturalDiffs.Count} natural and {rjwArtificialDiffs.Count} artificial hediffs");
//Collect parts from hediffs rjw's surgery methods
var rjwNaturalThings = rjwNaturalDiffs.Select(hediff =>
{
var tmp = SexPartAdder.recipePartRemover(hediff);
Log.Message($"obtained ${tmp} from ${hediff} via rjw");
return tmp;
}).ToList();
var rjwArtificialThings = rjwArtificialDiffs.Select(hediff =>
{
var tmp = SexPartAdder.recipePartRemover(hediff);
Log.Message($"obtained ${tmp} from ${hediff} via rjw");
return tmp;
}).ToList();
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.
rjwNaturalThings.ForEach(t =>
{
if (DEBUG || Rand.Chance(Math.Min(skillChance, recipeInfo.NaturalChance))) results.Add(t);
});
rjwArtificialThings.ForEach(t =>
{
if (DEBUG || Rand.Chance(Math.Min(skillChance, recipeInfo.BionicChance))) results.Add(t);
});
//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)
{
var random = new Random();
results = results.OrderBy(i => random.Next()).Take(recipeInfo.PartNumber).ToList();
}
foreach (var result in results)
{
yield return result;
}
// return false;
}
}
}

Binary file not shown.

View File

@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F17C6B3F-BA9D-4133-A201-1265A64BCB71}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RJW_patch_Autopsy</RootNamespace>
<AssemblyName>RJW_patch_Autopsy</AssemblyName>
<TargetFramework>net48</TargetFramework>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<LangVersion>11</LangVersion>
<Copyright>©2024 Stardust3D</Copyright>
<Company>Stardust3D</Company>
<AssemblyVersion>5380.0.1.4</AssemblyVersion>
<FileVersion>5380.0.1.4</FileVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>RJW_patch_Autopsy.snk</AssemblyOriginatorKeyFile>
<Description>This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\1.3\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Remove="1.4\**"/>
<None Remove="1.5\**"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.3.1.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0"/>
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.3.3389" />
<PackageReference Include="UnlimitedHugs.Rimworld.HugsLib" Version="11.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="Autopsy">
<HintPath>..\..\..\RimwoldAutopsy\1.3\Assemblies\Autopsy.dll</HintPath>
</Reference>
<Reference Include="RJW">
<HintPath>..\..\..\rjw-base\1.3\Assemblies\RJW.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Remove="1.4\**"/>
<Compile Remove="1.5\**"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="1.4\**"/>
<EmbeddedResource Remove="1.5\**"/>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{fc20ca27-4400-4aac-99af-f18cafac942e}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RJW_patch_Autopsy</RootNamespace>
<AssemblyName>RJW_patch_Autopsy</AssemblyName>
<TargetFramework>net48</TargetFramework>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<LangVersion>11</LangVersion>
<Copyright>©2024 Stardust3D</Copyright>
<Company>Stardust3D</Company>
<AssemblyVersion>5380.0.1.4</AssemblyVersion>
<FileVersion>5380.0.1.4</FileVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>RJW_patch_Autopsy.snk</AssemblyOriginatorKeyFile>
<Description>This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\1.4\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Remove="1.3\**"/>
<None Remove="1.5\**"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.3.1.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0"/>
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.4.3901" />
<PackageReference Include="UnlimitedHugs.Rimworld.HugsLib" Version="11.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="Autopsy">
<HintPath>..\..\..\RimwoldAutopsy\1.4\Assemblies\Autopsy.dll</HintPath>
</Reference>
<Reference Include="RJW">
<HintPath>..\..\..\rjw-base\1.4\Assemblies\RJW.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Remove="1.3\**"/>
<Compile Remove="1.5\**"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="1.3\**"/>
<EmbeddedResource Remove="1.5\**"/>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{25a0821a-6b42-4fb0-a454-0ad22a7716e7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RJW_patch_Autopsy</RootNamespace>
<AssemblyName>RJW_patch_Autopsy</AssemblyName>
<TargetFramework>net48</TargetFramework>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<LangVersion>11</LangVersion>
<Copyright>©2024 Stardust3D</Copyright>
<Company>Stardust3D</Company>
<AssemblyVersion>5380.0.1.4</AssemblyVersion>
<FileVersion>5380.0.1.4</FileVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>RJW_patch_Autopsy.snk</AssemblyOriginatorKeyFile>
<Description>This is a compatibility patch to enable 'Harvest Organs post mortem'/Autopsy to yield RJW bodyparts.</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\1.5\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Remove="1.3\**"/>
<None Remove="1.4\**"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.3.1.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0"/>
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.5.4042-beta" />
<PackageReference Include="UnlimitedHugs.Rimworld.HugsLib" Version="11.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="Autopsy">
<HintPath>..\..\..\RimwoldAutopsy\1.5\Assemblies\Autopsy.dll</HintPath>
</Reference>
<Reference Include="RJW">
<HintPath>..\..\..\rjw-base\1.5\Assemblies\RJW.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Remove="1.3\**"/>
<Compile Remove="1.4\**"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="1.3\**"/>
<EmbeddedResource Remove="1.4\**"/>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>

178
Source/build.gradle.kts Normal file
View File

@ -0,0 +1,178 @@
/*
* This file was generated by the Gradle "init" task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.3/samples
* This project uses @Incubating APIs which are subject to change.
*/
plugins {
alias(libs.plugins.msbuild)
alias(libs.plugins.versions)
}
version = "5380.0.1.4"
val friendlyName = "rjw-patch-autopsy"
tasks.register<com.ullink.Msbuild>("buildC#_1.3") {
// either a solution file
// solutionFile = "${rootProject.name}.sln"
// or a project file (.csproj or .vbproj)
projectFile = file("${rootProject.name}/${rootProject.name}_1.3.csproj")
targets = listOf("Clean", "Rebuild")
configuration = "Release"
// destinationDir = "build/msbuild/bin"
}
tasks.register<com.ullink.Msbuild>("buildC#_1.4") {
// either a solution file
// solutionFile = "${rootProject.name}.sln"
// or a project file (.csproj or .vbproj)
projectFile = file("${rootProject.name}/${rootProject.name}_1.4.csproj")
targets = listOf("Clean", "Rebuild")
configuration = "Release"
// destinationDir = "build/msbuild/bin"
}
tasks.register<com.ullink.Msbuild>("buildC#_1.5") {
// either a solution file
// solutionFile = "${rootProject.name}.sln"
// or a project file (.csproj or .vbproj)
projectFile = file("${rootProject.name}/${rootProject.name}_1.5.csproj")
targets = listOf("Clean", "Rebuild")
configuration = "Release"
// destinationDir = "build/msbuild/bin"
}
tasks.register<Exec>("sign_1.3") {
dependsOn("buildC#_1.3")
workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net48")
executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe"
args = listOf(
"sign",
"/seal",
"/t",
"http://timestamp.digicert.com",
"/a",
"/n",
"Stardust3D",
"/fd",
"certHash",
"${rootProject.name}.dll"
)
}
tasks.register<Exec>("sign_1.4") {
dependsOn("buildC#_1.4")
workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net48")
executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe"
args = listOf(
"sign",
"/seal",
"/t",
"http://timestamp.digicert.com",
"/a",
"/n",
"Stardust3D",
"/fd",
"certHash",
"${rootProject.name}.dll"
)
}
tasks.register<Exec>("sign_1.5") {
dependsOn("buildC#_1.5")
workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.5/net48")
executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe"
args = listOf(
"sign",
"/seal",
"/t",
"http://timestamp.digicert.com",
"/a",
"/n",
"Stardust3D",
"/fd",
"certHash",
"${rootProject.name}.dll"
)
}
tasks.register("copy") {
dependsOn("copy_1.3", "copy_1.4", "copy_about")
}
tasks.register<Copy>("copy_about") {
from(project.projectDir.resolve("${rootProject.name}/About"))
into(project.projectDir.parentFile.resolve("About"))
}
tasks.register<Copy>("copy_1.3") {
dependsOn("copyDll_1.3")
from(project.projectDir.resolve("${rootProject.name}/1.3"))
into(project.projectDir.parentFile.resolve("1.3"))
}
tasks.register<Copy>("copy_1.4") {
dependsOn("copyDll_1.4")
from(project.projectDir.resolve("${rootProject.name}/1.4"))
into(project.projectDir.parentFile.resolve("1.4"))
}
tasks.register<Copy>("copyDll_1.3") {
dependsOn("sign_1.3")
from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net48/${rootProject.name}.dll"))
into(project.projectDir.parentFile.resolve("1.3/Assemblies"))
}
tasks.register<Copy>("copyDll_1.4") {
dependsOn("sign_1.4")
from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net48/${rootProject.name}.dll"))
into(project.projectDir.parentFile.resolve("1.4/Assemblies"))
}
tasks.register<Copy>("copyDll_1.5") {
dependsOn("sign_1.5")
from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.5/net48/${rootProject.name}.dll"))
into(project.projectDir.parentFile.resolve("1.5/Assemblies"))
}
tasks.register<Zip>("buildZip") {
dependsOn("clean", ":copy")
into("$friendlyName/1.3") {
from(project.projectDir.parentFile.resolve("1.3"))
}
into("$friendlyName/1.4") {
from(project.projectDir.parentFile.resolve("1.4"))
}
into("$friendlyName/About") {
from(project.projectDir.parentFile.resolve("About"))
}
into("$friendlyName/Defs") {
from(project.projectDir.parentFile.resolve("Defs"))
}
into("$friendlyName/Source/${rootProject.name}") {
from(project.projectDir.parentFile.resolve("Source/${rootProject.name}"))
excludes.add("**/obj/**")
}
}
tasks.clean {
delete.add(project.projectDir.parentFile.resolve("1.3"))
delete.add(project.projectDir.parentFile.resolve("1.4"))
delete.add(project.projectDir.parentFile.resolve("About"))
}
tasks.build {
//dependsOn("buildC#")
}
tasks.assemble {
dependsOn("buildZip")
}

View File

@ -0,0 +1,11 @@
[versions]
versions = "0.51.0"
msbuild = "4.6"
[libraries]
[bundles]
[plugins]
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
msbuild = { id = "com.ullink.msbuild", version.ref = "msbuild" }

BIN
Source/gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

249
Source/gradlew vendored Normal file
View File

@ -0,0 +1,249 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

92
Source/gradlew.bat vendored Normal file
View File

@ -0,0 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -0,0 +1,11 @@
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user manual at https://docs.gradle.org/7.3/userguide/multi_project_builds.html
* This project uses @Incubating APIs which are subject to change.
*/
rootProject.name = "RJW_patch_Autopsy"