code:
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}</ProjectGuid>
    <OutputType>Library</OutputType>
    <NoStandardLibraries>false</NoStandardLibraries>
    <AssemblyName>RJW</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <TargetFrameworkProfile />
    <ShouldCreateLogs>True</ShouldCreateLogs>
    <AdvancedSettingsExpanded>True</AdvancedSettingsExpanded>
    <UpdateAssemblyVersion>True</UpdateAssemblyVersion>
    <UpdateAssemblyFileVersion>True</UpdateAssemblyFileVersion>
    <UpdateAssemblyInfoVersion>True</UpdateAssemblyInfoVersion>
    <AssemblyVersionSettings>None.None.IncrementOnDemand.Increment</AssemblyVersionSettings>
    <AssemblyFileVersionSettings>None.None.IncrementOnDemand.None</AssemblyFileVersionSettings>
    <AssemblyInfoVersionSettings>None.None.IncrementOnDemand.None</AssemblyInfoVersionSettings>
    <PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
    <AssemblyVersion>1.6.0.474</AssemblyVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>Assemblies\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <FileAlignment>4096</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>none</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>Assemblies\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup>
    <RootNamespace>rjw</RootNamespace>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="0Harmony">
      <HintPath>..\..\RimWorld B18\Mods\HugsLib\Assemblies\0Harmony.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Assembly-CSharp">
      <HintPath>..\..\RimWorld B18\RimWorldWin_Data\Managed\Assembly-CSharp.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="HugsLib">
      <HintPath>..\..\RimWorld B18\Mods\HugsLib\Assemblies\HugsLib.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="System">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Core">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Xml">
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <Private>False</Private>
    </Reference>
    <Reference Include="UnityEngine">
      <HintPath>..\..\RimWorld B18\RimWorldWin_Data\Managed\UnityEngine.dll</HintPath>
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Content Include=".gitattributes" />
    <Content Include=".gitignore" />
    <Content Include="About\About.xml" />
    <Content Include="About\Preview.png" />
    <Content Include="Assemblies\%24HugsLibChecker.dll" />
    <Content Include="Assemblies\RJW.dll" />
    <Content Include="changelog.txt" />
    <Content Include="credits.txt" />
    <Content Include="Defs\Body\PrivatePartGroups.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\Body\InsectBodyParts.xml" />
    <Content Include="Defs\Body\MechBodyParts.xml" />
    <Content Include="Defs\Body\PrivateParts.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\BondageGear\Hediffs.xml" />
    <Content Include="Defs\BondageGear\Items.xml" />
    <Content Include="Defs\BondageGear\Recipes_Production.xml" />
    <Content Include="Defs\BondageGear\Recipes_Surgery.xml" />
    <Content Include="Defs\BondageGear\Thoughts.xml" />
    <Content Include="Defs\ConceptDefs\Concepts_NotedOpportunistic.xml" />
    <Content Include="Defs\DamageDefs\Damage.xml" />
    <None Include="Defs\DesignationSubCategoryDefs\RJW_SubCategoryxml" />
    <Content Include="Defs\Designations\Designations.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\HediffDefs\Hediffs_FeelingBroken.xml" />
    <Content Include="Defs\HediffDefs\Hediffs_MCEvents.xml" />
    <Content Include="Defs\HediffDefs\Hediffs_Other.xml" />
    <Content Include="Defs\HediffDefs\Hediffs_PrivateParts.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\HediffDefs\Hediffs_SimpleBaby.xml" />
    <Content Include="Defs\HediffDefs\Hediffs_STDs.xml" />
    <Content Include="Defs\HediffDefs\Hediffs_Sterilized.xml" />
    <Content Include="Defs\HediffDefs\Hediffs_EnemyImplants.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\HediffGiverSetDefs\HediffGiverSets.xml" />
    <Content Include="Defs\IncidentDef\Incidents.xml" />
    <Content Include="Defs\InteractionDef\Interactions.xml" />
    <Content Include="Defs\JobDefs\Jobs.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\MentalState\MentalStateDefs.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\MiscTranslationDef\MiscTranslationDefs.xml" />
    <Content Include="Defs\Motes\Motes.xml" />
    <Content Include="Defs\Needs\Needs.xml" />
    <Content Include="Defs\PawnCapacityDefs\PawnCapacity.xml" />
    <Content Include="Defs\PawnKinds\PawnKinds.xml" />
    <Content Include="Defs\RecipeDefs\Recipes_Prosthetics.xml" />
    <Content Include="Defs\RecipeDefs\Recipes_Surgery.xml" />
    <Content Include="Defs\RecipeDefs\Recipes_RemoveEnemyImplants.xml" />
    <Content Include="Defs\RecordDef\RecordDefs.xml" />
    <Content Include="Defs\ResearchProjectDefs\ResearchProjects_XxXx.xml" />
    <Content Include="Defs\ResearchProjectDefs\ResearchTabs.xml" />
    <Content Include="Defs\RulePackDefs\RulePacks_AnalRape.xml" />
    <Content Include="Defs\RulePackDefs\RulePacks_AnalSex.xml" />
    <Content Include="Defs\RulePackDefs\RulePacks_EngravedNames.xml" />
    <Content Include="Defs\SoundDef\SoundDef_XXX.xml" />
    <Content Include="Defs\StatDef\Stats.xml" />
    <Content Include="Defs\STDDefs\STDs.xml" />
    <Content Include="Defs\ThingDefs\Items_PrivateParts.xml" />
    <Content Include="Defs\ThingDefs\ThingsDef_XXX.xml" />
    <Content Include="Defs\ThinkTreeDefs\ThinkTrees.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Defs\ThoughtDefs\Thoughts.xml" />
    <Content Include="Defs\TraitDefs\Traits.xml" />
    <Content Include="Defs\WorkGiverDefs\WorkGivers.xml" />
    <Content Include="Defs\_config.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\BodyPartDef\PrivateParts.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\ConceptDef\Concepts_NotedOpportunistic.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\DamageDef\Damage.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs_FeelingBroken.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs_Other.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs_PrivateParts.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs_SimpleBaby.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs_STDs.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\HediffDef\Hediffs_Sterilized.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\IncidentDef\Incidents.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\InteractionDef\Interactions.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\JobDef\Jobs.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\NeedDef\Needs.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\PawnCapacityDef\PawnCapacity.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\PawnKindDef\PawnKinds.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RecipeDef\Recipes_Production.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RecipeDef\Recipes_Prosthetics.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RecipeDef\Recipes_Surgery.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RecordDef\Records_GetRaped.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\rjw.bondage_gear_def\Items.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\rjw.force_off_gear_def\Recipes_Surgery.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\rjw.MiscTranslationDef\MiscTranslationDefs.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\rjw.std_def\STDs.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RulePackDef\RulePacks_AnalRape.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RulePackDef\RulePacks_AnalSex.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\RulePackDef\RulePacks_EngravedNames.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\StatDef\Stats.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\ThingDef\Items.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\ThingDef\Items_PrivateParts.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\ThingDef\ThingsDef_XXX.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\ThingDef\_Things_Mote.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\ThoughtDef\Thoughts.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\TraitDef\Traits.xml" />
    <Content Include="Languages\ChineseSimplified\DefInjected\WorkGiverDef\WorkGivers.xml" />
    <Content Include="Languages\ChineseSimplified\Keyed\RimJobWorld.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\BodyPartDef\PrivateParts.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ConceptDef\Concepts_NotedOpportunistic.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\DamageDef\Damage.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\BondageGear\Hediffs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs_FeelingBroken.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs_Other.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs_PrivateParts.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs_SimpleBaby.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs_STDs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\HediffDef\Hediffs_Sterilized.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\IncidentDef\Incidents.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\InteractionDef\Interactions.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\JobDef\Jobs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\NeedDef\Needs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\PawnCapacityDef\PawnCapacity.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\PawnKindDef\PawnKinds.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RecipeDef\BondageGear\Recipes_Production.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RecipeDef\BondageGear\Recipes_Surgery.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RecipeDef\Recipes_Production.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RecipeDef\Recipes_Prosthetics.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RecipeDef\Recipes_Surgery.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RecordDef\Records_GetRaped.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\rjw.bondage_gear_def\Items.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\rjw.force_off_gear_def\Recipes_Surgery.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\rjw.MiscTranslationDef\MiscTranslationDefs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\rjw.std_def\STDs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RulePackDef\RulePacks_AnalRape.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RulePackDef\RulePacks_AnalSex.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\RulePackDef\RulePacks_EngravedNames.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\StatDef\Stats.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\BondageGear\Hediffs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\BondageGear\Items.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\BondageGear\Recipes_Production.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\BondageGear\Recipes_Surgery.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\BondageGear\Thoughts.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\Items.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\Items_PrivateParts.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\STDs.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\ThingsDef_XXX.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThingDef\_Things_Mote.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThoughtDef\BondageGear\Thoughts.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\ThoughtDef\Thoughts.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\TraitDef\Traits.xml" />
    <Content Include="Languages\ChineseTraditional\DefInjected\WorkGiverDef\WorkGivers.xml" />
    <Content Include="Languages\ChineseTraditional\Keyed\RimJobWorld.xml" />
    <Content Include="Languages\English\DefInjected\BodyPartDef\PrivateParts.xml" />
    <Content Include="Languages\English\DefInjected\ConceptDef\Concepts.xml" />
    <Content Include="Languages\English\DefInjected\ConceptDef\Concepts_NotedOpportunistic.xml" />
    <Content Include="Languages\English\DefInjected\DamageDef\Damage.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs_FeelingBroken.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs_Other.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs_PrivateParts.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs_SimpleBaby.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs_STDs.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediffs_Sterilized.xml" />
    <Content Include="Languages\English\DefInjected\HediffDef\Hediff_EnemyImplants.xml" />
    <Content Include="Languages\English\DefInjected\IncidentDef\Incidents.xml" />
    <Content Include="Languages\English\DefInjected\InteractionDef\Interactions.xml" />
    <Content Include="Languages\English\DefInjected\JobDef\Jobs.xml" />
    <Content Include="Languages\English\DefInjected\NeedDef\Needs.xml" />
    <Content Include="Languages\English\DefInjected\PawnCapacityDef\PawnCapacity.xml" />
    <Content Include="Languages\English\DefInjected\PawnKindDef\PawnKinds.xml" />
    <Content Include="Languages\English\DefInjected\RecipeDef\Recipes_Production.xml" />
    <Content Include="Languages\English\DefInjected\RecipeDef\Recipes_Prosthetics.xml" />
    <Content Include="Languages\English\DefInjected\RecipeDef\Recipes_Surgery.xml" />
    <Content Include="Languages\English\DefInjected\RecordDef\Records_GetRaped.xml" />
    <Content Include="Languages\English\DefInjected\rjw.bondage_gear_def\Items.xml" />
    <Content Include="Languages\English\DefInjected\rjw.force_off_gear_def\Recipes_Surgery.xml" />
    <Content Include="Languages\English\DefInjected\rjw.MiscTranslationDef\MiscTranslationDefs.xml" />
    <Content Include="Languages\English\DefInjected\rjw.std_def\STDs.xml" />
    <Content Include="Languages\English\DefInjected\RulePackDef\RulePacks_AnalRape.xml" />
    <Content Include="Languages\English\DefInjected\RulePackDef\RulePacks_AnalSex.xml" />
    <Content Include="Languages\English\DefInjected\RulePackDef\RulePacks_EngravedNames.xml" />
    <Content Include="Languages\English\DefInjected\StatDef\Stats.xml" />
    <Content Include="Languages\English\DefInjected\ThingDef\Items.xml" />
    <Content Include="Languages\English\DefInjected\ThingDef\Items_PrivateParts.xml" />
    <Content Include="Languages\English\DefInjected\ThingDef\ThingsDef_XXX.xml" />
    <Content Include="Languages\English\DefInjected\ThingDef\_Things_Mote.xml" />
    <Content Include="Languages\English\DefInjected\ThoughtDef\Thoughts.xml" />
    <Content Include="Languages\English\DefInjected\TraitDef\Traits.xml" />
    <Content Include="Languages\English\DefInjected\WorkGiverDef\WorkGivers.xml" />
    <Content Include="Languages\English\Keyed\RimJobWorld.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Languages\Japanese\DefInjected\BodyPartDef\PrivateParts.xml" />
    <Content Include="Languages\Japanese\DefInjected\ConceptDef\Concepts.xml" />
    <Content Include="Languages\Japanese\DefInjected\ConceptDef\Concepts_NotedOpportunistic.xml" />
    <Content Include="Languages\Japanese\DefInjected\DamageDef\Damage.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs_FeelingBroken.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs_Other.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs_PrivateParts.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs_SimpleBaby.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs_STDs.xml" />
    <Content Include="Languages\Japanese\DefInjected\HediffDef\Hediffs_Sterilized.xml" />
    <Content Include="Languages\Japanese\DefInjected\IncidentDef\Incidents.xml" />
    <Content Include="Languages\Japanese\DefInjected\InteractionDef\Interactions.xml" />
    <Content Include="Languages\Japanese\DefInjected\JobDef\Jobs.xml" />
    <Content Include="Languages\Japanese\DefInjected\NeedDef\Needs.xml" />
    <Content Include="Languages\Japanese\DefInjected\PawnCapacityDef\PawnCapacity.xml" />
    <Content Include="Languages\Japanese\DefInjected\PawnKindDef\PawnKinds.xml" />
    <Content Include="Languages\Japanese\DefInjected\RecipeDef\Recipes_Production.xml" />
    <Content Include="Languages\Japanese\DefInjected\RecipeDef\Recipes_Prosthetics.xml" />
    <Content Include="Languages\Japanese\DefInjected\RecipeDef\Recipes_Surgery.xml" />
    <Content Include="Languages\Japanese\DefInjected\RecordDef\Records_GetRaped.xml" />
    <Content Include="Languages\Japanese\DefInjected\rjw.bondage_gear_def\Items.xml" />
    <Content Include="Languages\Japanese\DefInjected\rjw.force_off_gear_def\Recipes_Surgery.xml" />
    <Content Include="Languages\Japanese\DefInjected\rjw.MiscTranslationDef\MiscTranslationDefs.xml" />
    <Content Include="Languages\Japanese\DefInjected\rjw.std_def\STDs.xml" />
    <Content Include="Languages\Japanese\DefInjected\RulePackDef\RulePacks_AnalRape.xml" />
    <Content Include="Languages\Japanese\DefInjected\RulePackDef\RulePacks_EngravedNames.xml" />
    <Content Include="Languages\Japanese\DefInjected\StatDef\Stats.xml" />
    <Content Include="Languages\Japanese\DefInjected\ThingDef\Items.xml" />
    <Content Include="Languages\Japanese\DefInjected\ThingDef\Items_PrivateParts.xml" />
    <Content Include="Languages\Japanese\DefInjected\ThingDef\ThingsDef_XXX.xml" />
    <Content Include="Languages\Japanese\DefInjected\ThingDef\_Things_Mote.xml" />
    <Content Include="Languages\Japanese\DefInjected\ThoughtDef\Thoughts.xml" />
    <Content Include="Languages\Japanese\DefInjected\TraitDef\Traits.xml" />
    <Content Include="Languages\Japanese\DefInjected\WorkGiverDef\WorkGivers.xml" />
    <Content Include="Languages\Japanese\Keyed\RimJobWorld.xml" />
    <Content Include="Languages\Korean\DefInjected\ArchitectSense.DesignationSubCategoryDef\RJW_SubCategory.xml" />
    <Content Include="Languages\Korean\DefInjected\BodyPartDef\PrivateParts.xml" />
    <Content Include="Languages\Korean\DefInjected\ConceptDef\Concepts_NotedOpportunistic.xml" />
    <Content Include="Languages\Korean\DefInjected\DamageDef\Damage.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs_FeelingBroken.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs_Other.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs_PrivateParts.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs_SimpleBaby.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs_STDs.xml" />
    <Content Include="Languages\Korean\DefInjected\HediffDef\Hediffs_Sterilized.xml" />
    <Content Include="Languages\Korean\DefInjected\IncidentDef\Incidents.xml" />
    <Content Include="Languages\Korean\DefInjected\InteractionDef\Interactions.xml" />
    <Content Include="Languages\Korean\DefInjected\JobDef\Jobs.xml" />
    <Content Include="Languages\Korean\DefInjected\NeedDef\Needs.xml" />
    <Content Include="Languages\Korean\DefInjected\PawnCapacityDef\PawnCapacity.xml" />
    <Content Include="Languages\Korean\DefInjected\PawnKindDef\PawnKinds.xml" />
    <Content Include="Languages\Korean\DefInjected\RecipeDef\Recipes_Production.xml" />
    <Content Include="Languages\Korean\DefInjected\RecipeDef\Recipes_Prosthetics.xml" />
    <Content Include="Languages\Korean\DefInjected\RecipeDef\Recipes_Surgery.xml" />
    <Content Include="Languages\Korean\DefInjected\RecordDef\RecordDefs.xml" />
    <Content Include="Languages\Korean\DefInjected\RecordDef\Records_GetRaped.xml" />
    <Content Include="Languages\Korean\DefInjected\ResearchProjectDef\ResearchProjects_XxXx.xml" />
    <Content Include="Languages\Korean\DefInjected\ResearchTabDef\ResearchTabs.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.bondage_gear_def\Items.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.force_off_gear_def\Recipes_Surgery.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.HediffDef_EnemyImplants\Hediffs_EnemyImplants.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.HediffDef_InsectEgg\Hediffs_EnemyImplants.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.HediffDef_MechImplants\Hediffs_EnemyImplants.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.MiscTranslationDef\MiscTranslationDefs.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.SexualMentalStateDef\MentalStateDefs.xml" />
    <Content Include="Languages\Korean\DefInjected\rjw.std_def\STDs.xml" />
    <Content Include="Languages\Korean\DefInjected\RulePackDef\RulePacks_AnalRape.xml" />
    <Content Include="Languages\Korean\DefInjected\RulePackDef\RulePacks_AnalSex.xml" />
    <Content Include="Languages\Korean\DefInjected\RulePackDef\RulePacks_EngravedNames.xml" />
    <Content Include="Languages\Korean\DefInjected\StatDef\Stats.xml" />
    <Content Include="Languages\Korean\DefInjected\ThingDef\Items.xml" />
    <Content Include="Languages\Korean\DefInjected\ThingDef\Items_PrivateParts.xml" />
    <Content Include="Languages\Korean\DefInjected\ThingDef\ThingsDef_XXX.xml" />
    <Content Include="Languages\Korean\DefInjected\ThingDef\_Things_Mote.xml" />
    <Content Include="Languages\Korean\DefInjected\ThoughtDef\Thoughts.xml" />
    <Content Include="Languages\Korean\DefInjected\TraitDef\Traits.xml" />
    <Content Include="Languages\Korean\DefInjected\WorkGiverDef\WorkGivers.xml" />
    <Content Include="Languages\Korean\Keyed\RimJobWorld.xml" />
    <Content Include="Patches\AddBodyPartsToInsect.xml" />
    <Content Include="Patches\BodyPatches.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Patches\Tweak_Duty.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Sounds\Sex\blowjob.wav" />
    <Content Include="Sounds\Sex\cum.wav" />
    <Content Include="Sounds\Sex\kucyu04.wav" />
    <Content Include="Source\Notes.txt" />
    <Content Include="Textures\anus.png" />
    <Content Include="Textures\armbinder.png" />
    <Content Include="Textures\artificial_anus.png" />
    <Content Include="Textures\artificial_breast.png" />
    <Content Include="Textures\breast.png" />
    <Content Include="Textures\chastity_belt.png" />
    <Content Include="Textures\comfort_prisoner.png" />
    <Content Include="Textures\female_artificial_genital.png" />
    <Content Include="Textures\female_genital.png" />
    <Content Include="Textures\gag.png" />
    <Content Include="Textures\holokey.png" />
    <Content Include="Textures\hololock.png" />
    <Content Include="Textures\male_artificial_genital.png" />
    <Content Include="Textures\male_genital.png" />
    <Content Include="Textures\noheart.png" />
    <Content Include="Textures\placeholder_part.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\BedWhore_back.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\BedWhore_backm.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\BedWhore_front.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\BedWhore_frontm.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\BedWhore_side.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\BedWhore_sidem.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\DoubleBedWhore_back.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\DoubleBedWhore_backm.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\DoubleBedWhore_front.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\DoubleBedWhore_frontm.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\DoubleBedWhore_side.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\DoubleBedWhore_sidem.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\RoyalBedWhore_back.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\RoyalBedWhore_backm.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\RoyalBedWhore_front.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\RoyalBedWhore_frontm.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\RoyalBedWhore_side.png" />
    <Content Include="Textures\Things\Building\Furniture\Bed\RoyalBedWhore_sidem.png" />
    <Content Include="Textures\UI\Commands\AsWhore.png" />
    <Content Include="Textures\UI\Commands\comfort_prisoner_false.png" />
    <Content Include="Textures\UI\Commands\comfort_prisoner_invisible.png" />
    <Content Include="Textures\UI\Commands\comfort_prisoner_true.png" />
    <Content Include="Textures\UI\Icons\SubcategoryIndicator.png" />
    <Content Include="version.txt" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Defs\RandomDialoguesxml" />
    <None Include="Languages\Japanese\Keyed\RimJobWorld.xml.bak" />
    <None Include="LICENSE" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Source\Common\bondage_gear.cs" />
    <Compile Include="Source\Common\comfort_prisoners.cs" />
    <Compile Include="Source\Common\config.cs" />
    <Compile Include="Source\Common\CORE_EXPOSED.cs" />
    <Compile Include="Source\Common\Designator_ComfortPrisoner.cs" />
    <Compile Include="Source\Common\Genital_Helper.cs" />
    <Compile Include="Source\Common\MapCom_Injector.cs" />
    <Compile Include="Source\Common\MiscTranslationDef.cs" />
    <Compile Include="Source\Common\Mod_Settings.cs" />
    <Compile Include="Source\Common\RandomDialogues.cs" />
    <Compile Include="Source\Common\std.cs" />
    <Compile Include="Source\Common\Verb_Fuck.cs" />
    <Compile Include="Source\Common\xxx.cs" />
    <Compile Include="Source\Harmony\Building_Bed_Patch.cs" />
    <Compile Include="Source\Harmony\First.cs" />
    <Compile Include="Source\Harmony\patches_ABF.cs" />
    <Compile Include="Source\Harmony\patches_backstory_generator.cs" />
    <Compile Include="Source\Harmony\patches_bondage_gear.cs" />
    <Compile Include="Source\Harmony\patches_lovin.cs" />
    <Compile Include="Source\Harmony\patches_need.cs" />
    <Compile Include="Source\Harmony\patches_pregnancy.cs" />
    <Compile Include="Source\Hediffs\HediffDef_EnemyImplants.cs" />
    <Compile Include="Source\Hediffs\Hediff_ID.cs" />
    <Compile Include="Source\Hediffs\Hediff_InitPrivates.cs" />
    <Compile Include="Source\Hediffs\Hediff_InsectEgg.cs" />
    <Compile Include="Source\Hediffs\Hediff_InvisibleImplant.cs" />
    <Compile Include="Source\Hediffs\Hediff_MCEvents.cs" />
    <Compile Include="Source\Hediffs\Hediff_MechImplants.cs" />
    <Compile Include="Source\Hediffs\Hediff_MicroComputer.cs" />
    <Compile Include="Source\Hediffs\Hediff_Parasite.cs" />
    <Compile Include="Source\Hediffs\Hediff_SimpleBaby.cs" />
    <Compile Include="Source\Incidents\IncidentWorker_NymphJoins.cs" />
    <Compile Include="Source\Incidents\IncidentWorker_Sexualize.cs" />
    <Compile Include="Source\Incidents\IncidentWorker_TestInc.cs" />
    <Compile Include="Source\Incidents\IncidentWorker_TestInc2.cs" />
    <Compile Include="Source\Jobs\JobDef_RapeEnemy.cs" />
    <Compile Include="Source\Jobs\JobDriver_Beastiality.cs" />
    <Compile Include="Source\Jobs\JobDriver_ComfortPrisonerRapin.cs" />
    <Compile Include="Source\Jobs\JobDriver_Fappin.cs" />
    <Compile Include="Source\Jobs\JobDriver_GettinLoved.cs" />
    <Compile Include="Source\Jobs\JobDriver_GettinRaped.cs" />
    <Compile Include="Source\Jobs\JobDriver_InvitingVisitors.cs" />
    <Compile Include="Source\Jobs\JobDriver_LovinPP.cs" />
    <Compile Include="Source\Jobs\JobDriver_NymphJoinInBed.cs" />
    <Compile Include="Source\Jobs\JobDriver_RandomRape.cs" />
    <Compile Include="Source\Jobs\JobDriver_Rape.cs" />
    <Compile Include="Source\Jobs\JobDriver_RapeEnemy.cs" />
    <Compile Include="Source\Jobs\JobDriver_RapeEnemyByAnimal.cs" />
    <Compile Include="Source\Jobs\JobDriver_RapeEnemyByInsect.cs" />
    <Compile Include="Source\Jobs\JobDriver_RapeEnemyByMech.cs" />
    <Compile Include="Source\Jobs\JobDriver_RapeEnemyToParasite.cs" />
    <Compile Include="Source\Jobs\JobDriver_StruggleInBondageGear.cs" />
    <Compile Include="Source\Jobs\JobDriver_UseItemOn.cs" />
    <Compile Include="Source\Jobs\JobDriver_ViolateCorpse.cs" />
    <Compile Include="Source\Jobs\JobDriver_WhoreIsServingVisitors.cs" />
    <Compile Include="Source\Jobs\JobGiver_Beastiality.cs" />
    <Compile Include="Source\Jobs\JobGiver_ComfortPrisonerRape.cs" />
    <Compile Include="Source\Jobs\JobGiver_DoFappin.cs" />
    <Compile Include="Source\Jobs\JobGiver_NymphJoinInBed.cs" />
    <Compile Include="Source\Jobs\JobGiver_RandomRape.cs" />
    <Compile Include="Source\Jobs\JobGiver_RapeEnemy.cs" />
    <Compile Include="Source\Jobs\JobGiver_ViolateCorpse.cs" />
    <Compile Include="Source\Jobs\JobGiver_WhoreInvitingVisitors.cs" />
    <Compile Include="Source\MentalState\MentalState_RandomRape.cs" />
    <Compile Include="Source\MentalState\SexualMentalState.cs" />
    <Compile Include="Source\Needs\Need_Sex.cs" />
    <Compile Include="Source\Needs\PawnCapacityWorker_Fertility.cs" />
    <Compile Include="Source\Pawns\nymph_backstories.cs" />
    <Compile Include="Source\Pawns\nymph_generator.cs" />
    <Compile Include="Source\Recipes\chastity_belt.cs" />
    <Compile Include="Source\Recipes\Recipe_ForceOffGear.cs" />
    <Compile Include="Source\Recipes\Recipe_InstallAnus.cs" />
    <Compile Include="Source\Recipes\Recipe_InstallBreasts_Female.cs" />
    <Compile Include="Source\Recipes\Recipe_InstallPrivates_Female.cs" />
    <Compile Include="Source\Recipes\Recipe_InstallPrivates_Male.cs" />
    <Compile Include="Source\Recipes\Recipe_Nullify.cs" />
    <Compile Include="Source\Recipes\Recipe_RemoveAnus.cs" />
    <Compile Include="Source\Recipes\Recipe_RemoveBreasts.cs" />
    <Compile Include="Source\Things\Building_WhoreBed.cs" />
    <Compile Include="Source\Things\CompBondageGear.cs" />
    <Compile Include="Source\Things\CompGetBondageGear.cs" />
    <Compile Include="Source\Things\CompHoloCryptoStamped.cs" />
    <Compile Include="Source\Things\CompStampedApparelKey.cs" />
    <Compile Include="Source\Things\CompUnlockBondageGear.cs" />
    <Compile Include="Source\Thoughts\InteractionWorker_AnalSexAttempt.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ChancePerHour_Beastiality.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ChancePerHour_Fappin.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ChancePerHour_Necro.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ChancePerHour_RandomRape.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ChancePerHour_RapeCP.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ChancePerHour_Whore.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalBeastiality.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalCanRapeCP.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalFrustrated.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalHorny.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalNecro.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalNympho.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalRapist.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalTrait.cs" />
    <Compile Include="Source\Thoughts\ThinkNode_ConditionalWhore.cs" />
    <Compile Include="Source\Thoughts\ThoughtWorker_Bound.cs" />
    <Compile Include="Source\Thoughts\ThoughtWorker_FeelingBroken.cs" />
    <Compile Include="Source\Thoughts\ThoughtWorker_ItchyCrotch.cs" />
    <Compile Include="Source\Thoughts\ThoughtWorker_NeedSex.cs" />
    <Compile Include="Source\Thoughts\ThoughtWorker_SyphiliticThoughts.cs" />
    <Compile Include="Source\Thoughts\ThoughtWorker_WastingAway.cs" />
    <Compile Include="Source\Trigger\Trigger_SexSatisfy.cs" />
    <Compile Include="Source\Works\WorkGiver_RapeCP.cs" />
  </ItemGroup>
  <ItemGroup />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />
  <ProjectExtensions>
    <VisualStudio AllowExistingFolder="true" />
  </ProjectExtensions>
</Project>


code:
/*
 *
 *
 * ALL THE CODE IN THIS FILE HAS JUST BEEN COPIED FROM THE DECOMPILED CORE ASSEMBLY.
 * Except for one little thing I had to change so it would (re)compile.
 *
 *
 */

using System;
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using Verse;

namespace rjw_CORE_EXPOSED
{
	public static class JobDriver_Lovin
	{
		public static readonly SimpleCurve LovinIntervalHoursFromAgeCurve = new SimpleCurve
		{
			new CurvePoint(1f,  12f),
			new CurvePoint(16f, 6f),
			new CurvePoint(22f, 9f),
			new CurvePoint(30f, 12f),
			new CurvePoint(50f, 18f),
			new CurvePoint(75f, 24f)
		};
	}

	public static class LovePartnerRelationUtility
	{
		public static float LovinMtbSinglePawnFactor(Pawn pawn)
		{
			float num = 1f;
			num /= 1f - pawn.health.hediffSet.PainTotal;
			float efficiency = pawn.health.capacities.GetLevel(PawnCapacityDefOf.Consciousness);
			if (efficiency < 0.5f)
			{
				num /= efficiency * 2f;
			}

			if (!pawn.RaceProps.Humanlike)
			{
				return num * 4f;
			}
			if (RimWorld.LovePartnerRelationUtility.ExistingLovePartner(pawn) != null)
			{
				num *= 2f; //This is a factor which makes pawns with love partners less likely to do fappin/random raping/rapingCP/beastiality/necro.
			}
			else if (pawn.gender == Gender.Male)
			{
				num /= 1.25f; //This accounts for single men
			}
			return num / GenMath.FlatHill(0.0001f, 8f, 13f, 28f, 50f, 0.15f, pawn.ageTracker.AgeBiologicalYearsFloat);
		}
	}

	public static class MedicalRecipesUtility
	{
		public static bool IsCleanAndDroppable(Pawn pawn, BodyPartRecord part)
		{
			return !pawn.Dead && !pawn.RaceProps.Animal && part.def.spawnThingOnRemoved != null && IsClean(pawn, part);
		}

		public static bool IsClean(Pawn pawn, BodyPartRecord part)
		{
			return !pawn.Dead && !(from x in pawn.health.hediffSet.hediffs
								   where x.Part == part
								   select x).Any<Hediff>();
		}

		public static void RestorePartAndSpawnAllPreviousParts(Pawn pawn, BodyPartRecord part, IntVec3 pos, Map map)
		{
			SpawnNaturalPartIfClean(pawn, part, pos, map);
			SpawnThingsFromHediffs(pawn, part, pos, map);
			pawn.health.RestorePart(part, null, true);
		}

		public static Thing SpawnNaturalPartIfClean(Pawn pawn, BodyPartRecord part, IntVec3 pos, Map map)
		{
			if (MedicalRecipesUtility.IsCleanAndDroppable(pawn, part))
			{
				return GenSpawn.Spawn(part.def.spawnThingOnRemoved, pos, map);
			}
			return null;
		}

		public static void SpawnThingsFromHediffs(Pawn pawn, BodyPartRecord part, IntVec3 pos, Map map)
		{
			if (!pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined).Contains(part))
			{
				return;
			}
			IEnumerable<Hediff> enumerable = from x in pawn.health.hediffSet.hediffs
											 where x.Part == part
											 select x;
			foreach (Hediff current in enumerable)
			{
				if (current.def.spawnThingOnRemoved != null)
				{
					GenSpawn.Spawn(current.def.spawnThingOnRemoved, pos, map);
				}
			}
			for (int i = 0; i < part.parts.Count; i++)
			{
				MedicalRecipesUtility.SpawnThingsFromHediffs(pawn, part.parts[i], pos, map);
			}
		}
	}

	public class Recipe_RemoveBodyPart : Recipe_Surgery
	{
		private const float ViolationGoodwillImpact = 20f;

		public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
		{
			IEnumerable<BodyPartRecord> parts = pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Undefined);
			foreach (BodyPartRecord part in parts)
			{
				if (pawn.health.hediffSet.HasDirectlyAddedPartFor(part))
				{
					yield return part;
				}
				if (MedicalRecipesUtility.IsCleanAndDroppable(pawn, part))
				{
					yield return part;
				}
				if (part != pawn.RaceProps.body.corePart && !part.def.dontSuggestAmputation && pawn.health.hediffSet.hediffs.Any((Hediff d) => !(d is Hediff_Injury) && d.def.isBad && d.Visible && d.Part == part))
				{
					yield return part;
				}
			}
		}

		public override bool IsViolationOnPawn(Pawn pawn, BodyPartRecord part, Faction billDoerFaction)
		{
			return pawn.Faction != billDoerFaction && HealthUtility.PartRemovalIntent(pawn, part) == BodyPartRemovalIntent.Harvest;
		}

		public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
		{
			bool flag = MedicalRecipesUtility.IsClean(pawn, part);
			bool flag2 = this.IsViolationOnPawn(pawn, part, Faction.OfPlayer);
			if (billDoer != null)
			{
				if (base.CheckSurgeryFail(billDoer, pawn, ingredients, part, bill))
				{
					return;
				}
				TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[]
				{
					billDoer,
					pawn
				});
				MedicalRecipesUtility.SpawnNaturalPartIfClean(pawn, part, billDoer.Position, billDoer.Map);
				MedicalRecipesUtility.SpawnThingsFromHediffs(pawn, part, billDoer.Position, billDoer.Map);
			}
			pawn.TakeDamage(new DamageInfo(DamageDefOf.SurgicalCut, 99999, -1f, null, part, null));
			if (flag)
			{
				if (pawn.Dead)
				{
					ThoughtUtility.GiveThoughtsForPawnExecuted(pawn, PawnExecutionKind.OrganHarvesting);
				}
				else
				{
					ThoughtUtility.GiveThoughtsForPawnOrganHarvested(pawn);
				}
			}
			if (flag2)
			{
				pawn.Faction.AffectGoodwillWith(billDoer.Faction, -20f);
			}
		}

		public override string GetLabelWhenUsedOn(Pawn pawn, BodyPartRecord part)
		{
			if (pawn.RaceProps.IsMechanoid || pawn.health.hediffSet.PartOrAnyAncestorHasDirectlyAddedParts(part))
			{
				return RecipeDefOf.RemoveBodyPart.LabelCap;
			}
			BodyPartRemovalIntent bodyPartRemovalIntent = HealthUtility.PartRemovalIntent(pawn, part);
			if (bodyPartRemovalIntent == BodyPartRemovalIntent.Harvest)
			{
				return "Harvest".Translate();
			}
			if (bodyPartRemovalIntent != BodyPartRemovalIntent.Amputate)
			{
				throw new InvalidOperationException();
			}
			if (part.depth == BodyPartDepth.Inside)
			{
				return "RemoveOrgan".Translate();
			}
			return "Amputate".Translate();
		}
	}
}

repo_name: Hungarianmonarchy/RimJobWorld

license: mit


code:
using System;
using RimWorld;
using UnityEngine;
using Verse;

namespace rjw
{
	public abstract class Designator_Toggle : Command
	{
		public Designator_Toggle()
		{
			this.activateSound = SoundDefOf.SelectDesignator;
		}

		public Func<bool> isActive;

		public Action toggleAction;

		public SoundDef turnOnSound = SoundDefOf.CheckboxTurnedOn;

		public SoundDef turnOffSound = SoundDefOf.CheckboxTurnedOff;

		public override SoundDef CurActivateSound
		{
			get
			{
				if (this.isActive())
				{
					return this.turnOffSound;
				}
				return this.turnOnSound;
			}
		}

		public override void ProcessInput(Event ev)
		{
			base.ProcessInput(ev);
			this.toggleAction();
		}

		public override GizmoResult GizmoOnGUI(Vector2 loc)
		{
			GizmoResult result = base.GizmoOnGUI(loc);
			Rect rect = new Rect(loc.x, loc.y, this.Width, 75f);
			Rect position = new Rect(rect.x + rect.width - 24f, rect.y, 24f, 24f);
			Texture2D image = (!this.isActive()) ? Widgets.CheckboxOffTex : Widgets.CheckboxOnTex;
			GUI.DrawTexture(position, image);
			return result;
		}

		public override bool InheritInteractionsFrom(Gizmo other)
		{
			Command_Toggle command_Toggle = other as Command_Toggle;
			return command_Toggle != null && command_Toggle.isActive() == this.isActive();
		}
	}

	public class Designator_ComfortPrisoner : Designator
	{
		private static readonly MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("DesignatorComfortPrisoner");

		public Designator_ComfortPrisoner()
		{
			defaultLabel = MTdef.label;
			defaultDesc = MTdef.description;

			icon = ContentFinder<Texture2D>.Get("UI/Commands/comfort_prisoner_true");

			// TODO: Can this be null?
			hotKey = KeyBindingDefOf.Misc12;

			// These don't matter but set them just in case
			// soundDragSustain = SoundDefOf.DesignateDragStandard;
			// soundDragChanged = SoundDefOf.DesignateDragStandardChanged;
			// useMouseIcon = false;
			// soundSucceeded = SoundDefOf.DesignateClaim;
		}

		public Func<bool> isActive;

		public override GizmoResult GizmoOnGUI(Vector2 loc)
		{
			GizmoResult result = base.GizmoOnGUI(loc);
			Rect rect = new Rect(loc.x, loc.y, this.Width, 75f);
			Rect position = new Rect(rect.x + rect.width - 24f, rect.y, 24f, 24f);
			Texture2D image = (!this.isActive()) ? Widgets.CheckboxOffTex : Widgets.CheckboxOnTex;
			GUI.DrawTexture(position, image);
			return result;
		}

		public override AcceptanceReport CanDesignateCell(IntVec3 c)
		{
			return false;
		}

		public override void DesignateSingleCell(IntVec3 c)
		{
		}

		public override AcceptanceReport CanDesignateThing(Thing t)
		{
			var p = t as Pawn;
			//return (p != null) && (p.IsPrisonerOfColony || p.IsColonist || p.Faction == Faction.OfPlayer) && xxx.can_get_raped(p) && (!comfort_prisoners.is_designated(p));
			if (p != null)
			{
				if (p.IsPrisonerOfColony)
				{
					defaultLabel = "comfort prisoner"; //TODO: adds translationdef.
				}
				else if (xxx.is_animal(p))
				{
					defaultLabel = "comfort animal";
				}
				else
				{
					defaultLabel = "comfort colonist";
				}
			}
			return ((p != null) && (!comfort_prisoners.is_designated(p)) && ((p.IsColonist || p.Faction == Faction.OfPlayer) || (xxx.is_animal(p)) || (p.IsPrisonerOfColony))); //TODO: Rape target button?
		}

		public override void DesignateThing(Thing t)
		{
			DesignationDef designation_def = comfort_prisoners.designation_def_no_sticky;
			if (xxx.config.rape_me_sticky_enabled)
			{
				designation_def = comfort_prisoners.designation_def;
				//comfort_prisoners.designation_def = comfort_prisoners.designation_def_no_sticky;
			}

			base.Map.designationManager.AddDesignation(new Designation(t, designation_def));
		}
	}
}


code:
using System.Linq;
using RimWorld;
using Verse;

namespace rjw
{
	internal static class Genital_Helper
	{
		public static HediffDef penis = HediffDef.Named("Penis");
		public static HediffDef micropenis = HediffDef.Named("Micropenis");
		public static HediffDef small_penis = HediffDef.Named("SmallPenis");
		public static HediffDef big_penis = HediffDef.Named("BigPenis");
		public static HediffDef huge_penis = HediffDef.Named("HugePenis");
		public static HediffDef peg_penis = HediffDef.Named("PegDick");
		public static HediffDef bionic_penis = HediffDef.Named("BionicPenis");

		public static HediffDef vagina = HediffDef.Named("Vagina");
		public static HediffDef tight_vagina = HediffDef.Named("TightVagina");
		public static HediffDef loose_vagina = HediffDef.Named("LooseVagina");
		public static HediffDef hydraulic_vagina = HediffDef.Named("HydraulicVagina");
		public static HediffDef bionic_vagina = HediffDef.Named("BionicVagina");

		public static HediffDef breasts = HediffDef.Named("Breasts");
		public static HediffDef small_breasts = HediffDef.Named("SmallBreasts");
		public static HediffDef large_breasts = HediffDef.Named("LargeBreasts");
		public static HediffDef huge_breasts = HediffDef.Named("HugeBreasts");
		public static HediffDef hydraulic_breasts = HediffDef.Named("HydraulicBreasts");
		public static HediffDef bionic_breasts = HediffDef.Named("BionicBreasts");

		public static HediffDef anus = HediffDef.Named("Anus");
		public static HediffDef tight_anus = HediffDef.Named("TightAnus");
		public static HediffDef loose_anus = HediffDef.Named("LooseAnus");
		public static HediffDef hydraulic_anus = HediffDef.Named("HydraulicAnus");
		public static HediffDef bionic_anus = HediffDef.Named("BionicAnus");

		public static HediffDef dummy_privates_initializer = DefDatabase<HediffDef>.GetNamed("DummyPrivates");

		public static BodyPartRecord get_genitals(Pawn pawn)
		{
			//Log.Message("Genital_Helper::get_genitals( " + pawn.NameStringShort + " ) called");
			BodyPartRecord genitalPart = pawn.RaceProps.body.AllParts.Find(bpr => bpr.def.defName == "Genitals");

			//Log.Message("Genital_Helper::get_genitals( " + pawn.NameStringShort + " ) - checking genitalPart");
			if (genitalPart == null)
			{
				return null;
				//First.inject_genitals (pawn.RaceProps.body);
				//genitalPart = pawn.RaceProps.body.AllParts.Find ((BodyPartRecord bpr) => String.Equals (bpr.def.defName, "Genitals"));
			}

			return genitalPart;
		}

		public static BodyPartRecord get_breasts(Pawn pawn)
		{
			//Log.Message("[RJW] get_breasts( " + pawn.NameStringShort + " ) called");
			BodyPartRecord breastsPart = pawn.RaceProps.body.AllParts.Find(bpr => bpr.def.defName == "Chest");

			if (breastsPart == null)
			{
				//Log.Message("[RJW] get_breasts( " + pawn.NameStringShort + " ) - breastsPart is null");
				return null;
			}
			return breastsPart;
		}

		public static BodyPartRecord get_anus(Pawn pawn)
		{
			BodyPartRecord anusPart = pawn.RaceProps.body.AllParts.Find(bpr => bpr.def.defName == "Anus");

			if (anusPart == null)
			{
				return null;
			}
			return anusPart;
		}

		public static bool genitals_blocked(Pawn pawn)
		{
			if (pawn.apparel != null)
			{
				foreach (var app in pawn.apparel.WornApparel)
				{
					if ((app.def is bondage_gear_def gear_def) && (gear_def.blocks_genitals))
					{
						return true;
					}
				}
			}
			return false;
		}

		public static bool breasts_blocked(Pawn pawn)
		{
			if (pawn.apparel != null)
			{
				foreach (var app in pawn.apparel.WornApparel)
				{
					if ((app.def is bondage_gear_def gear_def) && (gear_def.blocks_breasts))
						return true;
				}
			}
			return false;
		}

		public static bool anus_blocked(Pawn pawn)
		{
			if (pawn.apparel != null)
			{
				foreach (var app in pawn.apparel.WornApparel)
				{
					if ((app.def is bondage_gear_def gear_def) && (gear_def.blocks_anus))
						return true;
				}
			}
			return false;
		}

		//Comments from nizhuan-jjr to previous authors: Why do you want to sexualize WorldPawns? Why not simply sexualize visible pawns?
		//I don't remove this but want to.
		public static bool pawns_require_sexualization()
		{
			int count_sexualized = 0;
			bool found_one = false;

			foreach (var p in Find.WorldPawns.AllPawnsAliveOrDead)  //Comments from nizhuan-jjr to previous authors: Really not sure why you want to sexualize dead pawns, do you want to harvest organs from those dead? This is done by Harvest Organ Post Mortem 2.0.
			{
				if ((!p.Dead) || p.Spawned)
				{
					if (Genital_Helper.is_sexualized(p))
					{
						++count_sexualized;
						if (count_sexualized > 50) //Late game worlds can have thousands of pawns. There's probably no point in checking all of them, and doing so could cause poor performance
							break;
					}
					else
					{
						found_one = true;
						break;
					}
				}
			}

			if (!found_one)
			{
				foreach (var m in Find.Maps)
				{
					count_sexualized = 0;
					foreach (var p in m.mapPawns.AllPawns)
					{
						if (Genital_Helper.is_sexualized(p))
						{
							++count_sexualized;
							if (count_sexualized > 50)
								break;
						}
						else
						{
							found_one = true;
							break;
						}
					}
				}
			}

			return found_one;
		}

		public static bool has_genitals(Pawn pawn)
		{
			BodyPartRecord genitalPart = get_genitals(pawn);
			if (genitalPart is null)
				return false;
			return pawn.health.hediffSet.hediffs.Any((Hediff hed) =>
												  (hed.Part == genitalPart) &&
												  (((hed as Hediff_Implant) != null) || ((hed as Hediff_AddedPart) != null)) &&
												  (hed.def != dummy_privates_initializer));
		}

		public static bool has_breasts(Pawn pawn)
		{
			BodyPartRecord breastsPart = get_breasts(pawn);
			if (breastsPart is null)
				return false;
			return pawn.health.hediffSet.hediffs.Any((Hediff hed) =>
									   (hed.Part == breastsPart) &&
									   (((hed as Hediff_Implant) != null) || ((hed as Hediff_AddedPart) != null)) &&
									   (hed.def != dummy_privates_initializer));
		}

		public static bool has_anus(Pawn pawn)
		{
			BodyPartRecord anusPart = get_anus(pawn);
			if (anusPart is null)
				return false;
			return pawn.health.hediffSet.hediffs.Any((Hediff hed) =>
						   (hed.Part == anusPart) &&
						   (((hed as Hediff_Implant) != null) || ((hed as Hediff_AddedPart) != null)) &&
						   (hed.def != dummy_privates_initializer));
		}

		public static bool has_penis(Pawn pawn)
		{
			BodyPartRecord penisPart = get_genitals(pawn);
			if (penisPart is null)
				return false;
			return pawn.health.hediffSet.hediffs.Any((Hediff hed) =>
						   (hed.Part == penisPart) &&
						   hed.def.defName.ToLower().Contains("penis"));
		}

		public static bool has_vagina(Pawn pawn)
		{
			BodyPartRecord vaginaPart = get_genitals(pawn);
			if (vaginaPart is null)
				return false;
			return pawn.health.hediffSet.hediffs.Any((Hediff hed) =>
						   (hed.Part == vaginaPart) &&
						   hed.def.defName.ToLower().Contains("vagina"));
		}

		public static bool is_sexualized(Pawn pawn)
		{
			return (xxx.is_female(pawn) ? has_genitals(pawn) && has_anus(pawn) && has_breasts(pawn) : has_genitals(pawn) && has_anus(pawn));
			//return has_genitals(pawn) && has_breasts(pawn) && has_anus(pawn);
		}

		public static void sexualize_everyone()
		{
			foreach (var p in Find.WorldPawns.AllPawnsAliveOrDead)
				if ((!p.Dead) || p.Spawned)
					Genital_Helper.sexualize(p);

			foreach (var m in Find.Maps)
				foreach (var p in m.mapPawns.AllPawns)
					Genital_Helper.sexualize(p);
		}

		public static void sexualize(Pawn pawn)
		{
			//if (pawn.RaceProps.hasGenders && (!xxx.is_mechanoid(pawn) || !xxx.is_animal(pawn)) && !is_sexualized(pawn))
			if ((pawn.RaceProps.hasGenders || !xxx.is_animal(pawn)) && !is_sexualized(pawn))
			{
				sexualize_pawn(pawn);
			}
		}

		public static void sexualize_VisiblePawns()
		{
			foreach (Pawn p in Find.VisibleMap.mapPawns.AllPawnsSpawned)
			{
				sexualize(p);
			}
		}

		public static void add_genitals(Pawn pawn)
		{
			//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) called");
			BodyPartRecord genitalPart = get_genitals(pawn);
			//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) - checking genitals");
			if (genitalPart == null)
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) doesn't have a genitalsPart");
				return;
			}
			else if (pawn.health.hediffSet.PartIsMissing(genitalPart))
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) had a genital but was removed.");
				return;
			}
			if (has_genitals(pawn))
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) already has genitals");
				return;
			}

			HediffDef privates;
			double value = Rand.Value;

			//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) - checking race");
			if (pawn.RaceProps.IsMechanoid)
			{
				//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) - race is mechanoid");
				if (value < 0.30)
					privates = pawn.gender == Gender.Male ? peg_penis : hydraulic_vagina;
				else
					privates = pawn.gender == Gender.Male ? bionic_penis : bionic_vagina;
			}
			else if (pawn.RaceProps.Humanlike)
			{
				//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) - race is humanlike");
				if (value < 0.10)
					privates = pawn.gender == Gender.Male ? micropenis : loose_vagina;
				else if (value < 0.20)
					privates = pawn.gender == Gender.Male ? small_penis : loose_vagina;
				else if (value < 0.70)
					privates = pawn.gender == Gender.Male ? penis : vagina;
				else if (value < 0.80)
					privates = pawn.gender == Gender.Male ? big_penis : tight_vagina;
				else if (value < 0.90)
					privates = pawn.gender == Gender.Male ? huge_penis : tight_vagina;
				else if (value < 0.95)
					privates = pawn.gender == Gender.Male ? peg_penis : hydraulic_vagina;
				else
					privates = pawn.gender == Gender.Male ? bionic_penis : bionic_vagina;
			}
			else
			{
				//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) - race is something else");
				privates = pawn.gender == Gender.Male ? penis : vagina;
			}
			//Log.Message("Genital_Helper::add_genitals( " + pawn.NameStringShort + " ) - adding hediff");
			pawn.health.AddHediff(privates, genitalPart);
		}

		public static void add_breasts(Pawn pawn)
		{
			//Log.Message("[RJW] add_breasts( " + pawn.NameStringShort + " ) called");
			BodyPartRecord breastsPart = get_breasts(pawn);

			if (breastsPart == null)
			{
				//Log.Message("[RJW] add_breasts( " + pawn.NameStringShort + " ) - pawn doesn't have a breastsPart");
				return;
			}
			else if (pawn.health.hediffSet.PartIsMissing(breastsPart))
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) had breasts but were removed.");
				return;
			}
			if (has_breasts(pawn))
			{
				//Log.Message("[RJW] add_breasts( " + pawn.NameStringShort + " ) - pawn already has breasts");
				return;
			}

			//Log.Message("[RJW] add_breasts( " + pawn.NameStringShort + " ) - checking gender");

			if (pawn.gender == Gender.Female)
			{
				HediffDef bewbs;
				double value = Rand.Value;

				if (pawn.RaceProps.IsMechanoid)
				{
					if (value < 0.30)
						bewbs = hydraulic_breasts;
					else
						bewbs = bionic_breasts;
				}
				else if (pawn.RaceProps.Humanlike)
				{
					if (value < 0.10)
						bewbs = small_breasts;
					else if (value < 0.50)
						bewbs = breasts;
					else if (value < 0.70)
						bewbs = large_breasts;
					else if (value < 0.90)
						bewbs = huge_breasts;
					else if (value < 0.95)
						bewbs = hydraulic_breasts;
					else
						bewbs = bionic_breasts;
				}
				else
				{
					bewbs = breasts;
				}
				pawn.health.AddHediff(bewbs, breastsPart);
			}
		}

		public static void add_anus(Pawn pawn)
		{
			BodyPartRecord anusPart = get_anus(pawn);

			if (anusPart == null)
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) doesn't have an anusPart");
				return;
			}
			else if (pawn.health.hediffSet.PartIsMissing(anusPart))
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) had an anus but was removed.");
				return;
			}
			if (has_anus(pawn))
			{
				//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) already has an anus");
				return;
			}

			HediffDef asshole;
			double value = Rand.Value;
			if (pawn.RaceProps.IsMechanoid)
			{
				if (value < 0.30)
					asshole = hydraulic_anus;
				else
					asshole = bionic_anus;
			}
			else if (pawn.RaceProps.Humanlike)
			{
				if (value < 0.20)
					asshole = loose_anus;
				else if (value < 0.70)
					asshole = anus;
				else if (value < 0.90)
					asshole = tight_anus;
				else if (value < 0.95)
					asshole = hydraulic_anus;
				else
					asshole = bionic_anus;
			}
			else
			{
				asshole = anus;
			}

			pawn.health.AddHediff(asshole, anusPart);
		}

		public static void sexualize_pawn(Pawn pawn)
		{
			//Log.Message("[RJW] sexualize_pawn( " + pawn.NameStringShort + " ) called");

			if (!pawn.RaceProps.hasGenders)
			{
				//Log.Message("[RJW] sexualize_pawn() - unable to sexualize genderless pawn " + pawn.NameStringShort);
				return;
			}

			add_genitals(pawn);
			add_breasts(pawn);
			add_anus(pawn);

			var sex_need = pawn.needs.TryGetNeed<Need_Sex>();
			if (pawn.Faction != null && !pawn.Faction.IsPlayer && sex_need != null)
			{
				sex_need.ForceSetLevel(Rand.Range(0.01f, 0.5f));
			}
		}

		public static void inject_genitals(BodyDef target)
		{
			//Log.Message("[RJW] inject_genitals() called");
			BodyPartRecord tor_rec = target.corePart;

			if (tor_rec != null)
			{
				var gen_rec = new BodyPartRecord
				{
					def = DefDatabase<BodyPartDef>.GetNamed("Genitals"),
					height = BodyPartHeight.Bottom,
					depth = BodyPartDepth.Outside,
					coverage = 0.02f
				};
				gen_rec.groups.Add(BodyPartGroupDefOf.Torso);
				gen_rec.parent = tor_rec;

				// TODO lots of broken/missing stuff here

				//gen_rec.fleshCoverage = 1.0f;
				//gen_rec.absoluteCoverage = gen_rec.parent.absoluteCoverage * gen_rec.coverage;
				//gen_rec.absoluteFleshCoverage = gen_rec.absoluteCoverage * gen_rec.fleshCoverage;

				// coverage is set by XML (or hardcoded like above)
				// absoluteCoverage is derived from coverage and the parent's absoluteCoverage
				// fleshCoverage is derived from the parts' coverages
				// absoluteFleshCoverage is derived from absoluteCoverage and fleshCoverage

				// so inserting the genitals affects the Torso's fleshCoverage which affects its absoluteFleshCoverage
				tor_rec.parts.Add(gen_rec);
				//if (gen_rec.coverage <= tor_rec.fleshCoverage)
				//tor_rec.fleshCoverage -= gen_rec.coverage;
				//else {
				//tor_rec.fleshCoverage = 0.0f;
				//Log.Warning ("[RJW] Torso BPR fleshCoverage pushed below zero during genitals injection");
				//}
				//tor_rec.absoluteFleshCoverage = tor_rec.absoluteCoverage * tor_rec.fleshCoverage;

				target.AllParts.Add(gen_rec);
			}
			else
				Log.Error("[RJW] Failed to find the \"Torso\" BodyPartRecord");
		}

		public static void inject_breasts(BodyDef target)
		{
			//Log.Message("[RJW] inject_breasts() called");
			BodyPartRecord tor_rec = target.corePart;

			if (tor_rec != null)
			{
				var gen_rec = new BodyPartRecord
				{
					def = DefDatabase<BodyPartDef>.GetNamed("Chest"),
					height = BodyPartHeight.Top,
					depth = BodyPartDepth.Outside,
					coverage = 0.1f
				};
				gen_rec.groups.Add(BodyPartGroupDefOf.Torso);
				gen_rec.parent = tor_rec;

				// TODO lots of broken/missing stuff here

				//gen_rec.fleshCoverage = 1.0f;
				//gen_rec.absoluteCoverage = gen_rec.parent.absoluteCoverage * gen_rec.coverage;
				//gen_rec.absoluteFleshCoverage = gen_rec.absoluteCoverage * gen_rec.fleshCoverage;

				// coverage is set by XML (or hardcoded like above)
				// absoluteCoverage is derived from coverage and the parent's absoluteCoverage
				// fleshCoverage is derived from the parts' coverages
				// absoluteFleshCoverage is derived from absoluteCoverage and fleshCoverage

				// so inserting the genitals affects the Torso's fleshCoverage which affects its absoluteFleshCoverage
				tor_rec.parts.Add(gen_rec);
				//if (gen_rec.coverage <= tor_rec.fleshCoverage)
				//tor_rec.fleshCoverage -= gen_rec.coverage;
				//else {
				//tor_rec.fleshCoverage = 0.0f;
				//Log.Warning ("[RJW] Torso BPR fleshCoverage pushed below zero during genitals injection");
				//}
				//tor_rec.absoluteFleshCoverage = tor_rec.absoluteCoverage * tor_rec.fleshCoverage;

				target.AllParts.Add(gen_rec);
			}
			else
				Log.Error("[RJW] Failed to find the \"Torso\" BodyPartRecord");
		}

		public static void inject_anus(BodyDef target)
		{
			//Log.Message("[RJW] inject_anus() called");
			BodyPartRecord tor_rec = target.corePart;

			if (tor_rec != null)
			{
				var gen_rec = new BodyPartRecord
				{
					def = DefDatabase<BodyPartDef>.GetNamed("Anus"),
					height = BodyPartHeight.Bottom,
					depth = BodyPartDepth.Outside,
					coverage = 0.02f
				};
				gen_rec.groups.Add(BodyPartGroupDefOf.Torso);
				gen_rec.parent = tor_rec;

				// TODO lots of broken/missing stuff here

				//gen_rec.fleshCoverage = 1.0f;
				//gen_rec.absoluteCoverage = gen_rec.parent.absoluteCoverage * gen_rec.coverage;
				//gen_rec.absoluteFleshCoverage = gen_rec.absoluteCoverage * gen_rec.fleshCoverage;

				// coverage is set by XML (or hardcoded like above)
				// absoluteCoverage is derived from coverage and the parent's absoluteCoverage
				// fleshCoverage is derived from the parts' coverages
				// absoluteFleshCoverage is derived from absoluteCoverage and fleshCoverage

				// so inserting the genitals affects the Torso's fleshCoverage which affects its absoluteFleshCoverage
				tor_rec.parts.Add(gen_rec);
				//if (gen_rec.coverage <= tor_rec.fleshCoverage)
				//tor_rec.fleshCoverage -= gen_rec.coverage;
				//else {
				//tor_rec.fleshCoverage = 0.0f;
				//Log.Warning ("[RJW] Torso BPR fleshCoverage pushed below zero during genitals injection");
				//}
				//tor_rec.absoluteFleshCoverage = tor_rec.absoluteCoverage * tor_rec.fleshCoverage;

				target.AllParts.Add(gen_rec);
			}
			else
				Log.Error("[RJW] Failed to find the \"Torso\" BodyPartRecord");
		}
	}
}


code:
using Verse;

namespace rjw
{
	public class MapCom_Injector : MapComponent
	{
		public bool injected_designator = false;

		public bool triggered_after_load = false;

		public MapCom_Injector(Map m) : base(m)
		{
		}

		public override void MapComponentUpdate()
		{
		}

		public override void MapComponentTick()
		{
		}

		public override void MapComponentOnGUI()
		{
			if (!triggered_after_load)
			{
				triggered_after_load = true;
				//--Log.Message("[RJW]MapCom_Injector::triggered after load");

				if (Genital_Helper.pawns_require_sexualization())
				{
					//--Log.Message("[RJW]MapCom_Injector::sexualize everyone");
					Genital_Helper.sexualize_everyone();
				}
			}

			var currently_visible = Find.VisibleMap == map;

			if ((!injected_designator) && currently_visible)
			{
				Find.ReverseDesignatorDatabase.AllDesignators.Add(new Designator_ComfortPrisoner());
				injected_designator = true;
			}
			else if (injected_designator && (!currently_visible))
				injected_designator = false;
		}

		public override void ExposeData()
		{
		}
	}
}


code:
using System;
using Verse;

namespace rjw
{
	public sealed class MiscTranslationDef : Def
	{
		public Type targetClass;
		public string stringA = null;
		public string stringB = null;
		public string stringC = null;

		private void Assert(bool check, string errorMessage)
		{
			if (!check)
			{
				Log.Error($"[RJW] Invalid data in MiscTranslationDef {defName}: {errorMessage}");
			}
		}

		public override void PostLoad()
		{
			Assert(targetClass != null, "targetClass field must be set");
		}

		public override void ResolveReferences()
		{
			base.ResolveReferences();
		}
	}
}


code:
using HugsLib;
using HugsLib.Core;
using HugsLib.Settings;
using Verse;

namespace rjw
{
	public class Mod_Settings : ModBase
	{
		public override string ModIdentifier
		{
			get
			{
				return "RJW";
			}
		}

		public override VersionShort GetVersion()
		{
			//Log.Message("GetVersion() called");
			return base.GetVersion();
		}

		public static bool WildMode;
		public static float sexneed_decay_rate;
		public static bool nymphos;
		public static bool std_floor;
		public static bool prisoner_beating;
		public static uint pregnancy_weight_parent; //to-do: convert 'em into float
		public static uint pregnancy_weight_species;
		public static uint pregnancy_coefficient_human;
		public static uint pregnancy_coefficient_animals;
		public static bool pregnancy_use_parent_method;
		public static uint sex_free_for_all_age;
		public static uint sex_minimum_age;
		public static float NonFutaWomenRaping_MaxVulnerability;
		public static float Rapee_MinVulnerability_human;
		public static float Rapee_MinVulnerability_animals;

		// Feature Toggles
		public bool animals_enabled; // Updated

		public bool comfort_prisoners_enabled; // Updated
		public bool ComfortColonist; // New
		public bool ComfortAnimal; // New
		public bool cum_enabled; // Updated
		public bool rape_me_sticky_enabled; // Updated
		public bool sounds_enabled; // Updated
		public bool stds_enabled; // Updated
		public bool bondage_gear_enabled; // Updated
		public bool nymph_joiners_enabled; // Updated
		public bool whore_beds_enabled; // Updated
		public bool necro_enabled; // Updated
		public bool beastiality_enabled; // Updated
		public bool random_rape_enabled; // Updated
		public bool always_accept_whores; // Updated
		public bool nymphs_always_JoinInBed; // Updated
		public bool zoophis_always_rape; // Updated
		public bool rapists_always_rape; // Updated
		public bool pawns_always_do_fapping; // Updated
		public bool pawns_always_rapeCP; // Updated
		public bool whores_always_findjob; // Updated

		// Display Toggles
		public bool show_regular_dick_and_vag; // Updated

		// STD config
		public bool std_show_roll_to_catch; // Updated

		public float std_min_severity_to_pitch; // Updated
		public float std_env_pitch_cleanliness_exaggeration; // Updated
		public float std_env_pitch_dirtiness_exaggeration; // Updated
		public float std_outdoor_cleanliness; // Updated

		// Age Config

		public float significant_pain_threshold; // Updated
		public float extreme_pain_threshold; // Updated
		public float base_chance_to_hit_prisoner; // Updated
		public int min_ticks_between_hits; // Updated
		public int max_ticks_between_hits; // Updated

		public float max_nymph_fraction; // Updated
		public float opp_inf_initial_immunity; // Updated
		public float comfort_prisoner_rape_mtbh_mul; // Updated
		public float whore_mtbh_mul; // Updated
		public float nymph_spawn_with_std_mul; // Updated

		//Mod Settings handles
		private SettingHandle<bool> option_WildMode;
		private SettingHandle<int> option_sexneed_decay_rate;
		private SettingHandle<bool> option_nymphs_join;
		private SettingHandle<bool> option_STD_floor_catch;
		private SettingHandle<bool> option_rape_beating;
		private SettingHandle<int> option_pregnancy_weight_parent;
		private SettingHandle<int> option_pregnancy_weight_species;
		private SettingHandle<int> option_pregnancy_coefficient_human;
		private SettingHandle<int> option_pregnancy_coefficient_animals;
		private SettingHandle<bool> option_pregnancy_use_parent_method;
		private SettingHandle<int> option_sex_free_for_all_age;
		private SettingHandle<int> option_sex_minimum_age;
		private SettingHandle<int> option_NonFutaWomenRaping_MaxVulnerability;
		private SettingHandle<int> option_Rapee_MinVulnerability_human;
		private SettingHandle<int> option_Rapee_MinVulnerability_animals;

		public override void Initialize()
		{
			Logger.Message("Initialize() called");
			base.Initialize();
		}

		public override void DefsLoaded()
		{
			Log.Message("DefsLoaded() called");

			this.option_WildMode = Settings.GetHandle<bool>("WildMode", "WildMode_name".Translate(), "WildMode_desc".Translate(), false);
			this.option_sexneed_decay_rate = Settings.GetHandle<int>("sexneed_decay_rate", "sexneed_decay_rate_name".Translate(), "sexneed_decay_rate_desc".Translate(), 100, Validators.IntRangeValidator(0, 1000000));
			this.option_sexneed_decay_rate.SpinnerIncrement = 25;
			this.option_nymphs_join = Settings.GetHandle<bool>("nymphs_join", "NymphsJoin".Translate(), "NymphsJoin_desc".Translate(), true);
			this.option_STD_floor_catch = Settings.GetHandle<bool>("STD_floor_catch", "STD_FromFloors".Translate(), "STD_FromFloors_desc".Translate(), true);
			this.option_rape_beating = Settings.GetHandle<bool>("rape_beating", "PrisonersBeating".Translate(), "PrisonersBeating_desc".Translate(), true);
			this.option_pregnancy_weight_parent = Settings.GetHandle<int>("pregnancy_weight_parent", "OffspringLookLikeTheirMother".Translate(), "OffspringLookLikeTheirMother_desc".Translate(), 50, Validators.IntRangeValidator(0, 100));
			this.option_pregnancy_weight_parent.SpinnerIncrement = 10;
			this.option_pregnancy_weight_species = Settings.GetHandle<int>("pregnancy_weight_species", "OffspringIsHuman".Translate(), "OffspringIsHuman_desc".Translate(), 50, Validators.IntRangeValidator(0, 100));
			this.option_pregnancy_weight_species.SpinnerIncrement = 10;
			this.option_pregnancy_coefficient_human = Settings.GetHandle<int>("pregnancy_coefficient_human", "PregnantCoeffecientForHuman".Translate(), "PregnantCoeffecientForHuman_desc".Translate(), 20, Validators.IntRangeValidator(0, 300));
			this.option_pregnancy_coefficient_human.SpinnerIncrement = 10;
			this.option_pregnancy_coefficient_animals = Settings.GetHandle<int>("pregnancy_coefficient_animals", "PregnantCoeffecientForAnimals".Translate(), "PregnantCoeffecientForAnimals_desc".Translate(), 50, Validators.IntRangeValidator(0, 300));
			this.option_pregnancy_coefficient_animals.SpinnerIncrement = 10;
			this.option_pregnancy_use_parent_method = Settings.GetHandle<bool>("pregnancy_use_parent_method", "UseParentMethod".Translate(), "UseParentMethod_desc".Translate(), true);
			this.option_sex_free_for_all_age = Settings.GetHandle<int>("sex_free_for_all_age", "SexFreeForAllAge".Translate(), "SexFreeForAllAge_desc".Translate(), 15, Validators.IntRangeValidator(0, 9999));
			this.option_sex_free_for_all_age.SpinnerIncrement = 1;
			this.option_sex_minimum_age = Settings.GetHandle<int>("sex_minimum_age", "SexMinimumAge".Translate(), "SexMinimumAge_desc".Translate(), 15, Validators.IntRangeValidator(0, 9999));
			this.option_sex_minimum_age.SpinnerIncrement = 1;
			this.option_NonFutaWomenRaping_MaxVulnerability = Settings.GetHandle<int>("nonFutaWomenRaping_MaxVulnerability", "NonFutaWomenRaping_MaxVulnerability".Translate(), "NonFutaWomenRaping_MaxVulnerability_desc".Translate(), 20, Validators.IntRangeValidator(0, 300));
			this.option_NonFutaWomenRaping_MaxVulnerability.SpinnerIncrement = 10;
			this.option_Rapee_MinVulnerability_human = Settings.GetHandle<int>("rapee_MinVulnerability_human", "Rapee_MinVulnerability_human".Translate(), "Rapee_MinVulnerability_human_desc".Translate(), 50, Validators.IntRangeValidator(0, 300));
			this.option_Rapee_MinVulnerability_human.SpinnerIncrement = 10;
			this.option_Rapee_MinVulnerability_animals = Settings.GetHandle<int>("rapee_MinVulnerability_animals", "Rapee_MinVulnerability_animals".Translate(), "Rapee_MinVulnerability_animals_desc".Translate(), 40, Validators.IntRangeValidator(0, 300));
			this.option_Rapee_MinVulnerability_animals.SpinnerIncrement = 10;

			this.SettingsChanged();
		}

		public override void SettingsChanged()
		{
			base.SettingsChanged();
			WildMode = option_WildMode.Value;
			sexneed_decay_rate = ((float)option_sexneed_decay_rate.Value) / 100f;
			nymphos = option_nymphs_join.Value;
			std_floor = option_STD_floor_catch.Value;
			prisoner_beating = option_rape_beating.Value;
			pregnancy_weight_parent = (uint)option_pregnancy_weight_parent.Value;
			pregnancy_weight_species = (uint)option_pregnancy_weight_species.Value;
			pregnancy_coefficient_human = (uint)option_pregnancy_coefficient_human.Value;
			pregnancy_coefficient_animals = (uint)option_pregnancy_coefficient_animals.Value;
			pregnancy_use_parent_method = option_pregnancy_use_parent_method.Value;
			sex_free_for_all_age = (uint)option_sex_free_for_all_age.Value;
			sex_minimum_age = (uint)option_sex_minimum_age.Value;
			NonFutaWomenRaping_MaxVulnerability = ((float)option_NonFutaWomenRaping_MaxVulnerability.Value) / 100f;
			Rapee_MinVulnerability_human = ((float)option_Rapee_MinVulnerability_human.Value) / 100f;
			Rapee_MinVulnerability_animals = ((float)option_Rapee_MinVulnerability_animals.Value) / 100f;

			Log.Message("[RJW] Settings Changed:");
			Log.Message("WildMode = " + WildMode);
			Log.Message("sexneed_decay_rate = " + sexneed_decay_rate);
			Log.Message("nymphos = " + nymphos);
			Log.Message("std_floor = " + std_floor);
			Log.Message("prisoner_beating = " + prisoner_beating);
			Log.Message("pregnancy_weight_parent = " + pregnancy_weight_parent);
			Log.Message("pregnancy_weight_species = " + pregnancy_weight_species);
			Log.Message("pregnancy_coefficient_human = " + pregnancy_coefficient_human);
			Log.Message("pregnancy_coefficient_animals = " + pregnancy_coefficient_animals);
			Log.Message("pregnancy_use_parent_method = " + pregnancy_use_parent_method);
			Log.Message("sex_free_for_all_age = " + sex_free_for_all_age);
			Log.Message("sex_minimum_age = " + sex_minimum_age);
			Log.Message("NonFutaWomenRaping_MaxVulnerability = " + NonFutaWomenRaping_MaxVulnerability);
			Log.Message("Rapee_MinVulnerability_human = " + Rapee_MinVulnerability_human);
			Log.Message("Rapee_MinVulnerability_animals = " + Rapee_MinVulnerability_animals);
		}

		public override void MapLoaded(Map map)
		{
			Log.Message("[RJW] Settings loaded:");
			Log.Message("WildMode = " + WildMode);
			Log.Message("sexneed_decay_rate = " + sexneed_decay_rate);
			Log.Message("nymphos = " + nymphos);
			Log.Message("std_floor = " + std_floor);
			Log.Message("prisoner_beating = " + prisoner_beating);
			Log.Message("pregnancy_weight_parent = " + pregnancy_weight_parent);
			Log.Message("pregnancy_weight_species = " + pregnancy_weight_species);
			Log.Message("pregnancy_coefficient_human = " + pregnancy_coefficient_human);
			Log.Message("pregnancy_coefficient_animals = " + pregnancy_coefficient_animals);
			Log.Message("pregnancy_use_parent_method = " + pregnancy_use_parent_method);
			Log.Message("sex_free_for_all_age = " + sex_free_for_all_age);
			Log.Message("sex_minimum_age = " + sex_minimum_age);
			Log.Message("NonFutaWomenRaping_MaxVulnerability = " + NonFutaWomenRaping_MaxVulnerability);
			Log.Message("Rapee_MinVulnerability_human = " + Rapee_MinVulnerability_human);
			Log.Message("Rapee_MinVulnerability_animals = " + Rapee_MinVulnerability_animals);
			base.MapLoaded(map);
		}

		/*
		public override void Update() {
			base.Update();
		}

        public override void FixedUpdate() {
            base.FixedUpdate();
        }

        public override void MapComponentsInitializing(Map map) {
            Logger.Message("MapComponentsInitializing() called");
            base.MapComponentsInitializing(map);
        }

        public override void MapDiscarded(Map map) {
            Logger.Message("MapDiscarded() called");
            base.MapDiscarded(map);
        }

        public override void MapGenerated(Map map) {
            Logger.Message("MapGenerated() called");
            base.MapGenerated(map);
        }

        public override void MapLoaded(Map map) {
            Logger.Message("MapLoaded() called");
            base.MapLoaded(map);
        }

        public override void OnGUI() {
            base.OnGUI();
        }

        public override void SceneLoaded(Scene scene) {
            Logger.Message("SceneLoaded() called");
            base.SceneLoaded(scene);
        }

        public override void Tick(int currentTick) {
            base.Tick(currentTick);
        }

        public override void WorldLoaded() {
            Logger.Message("WorldLoaded() called");
            base.WorldLoaded();
        }

		private void MakeSettingsCategoryToggle(string labelId, Action buttonAction)
		{
			var toolToggle = Settings.GetHandle<bool>(labelId, labelId.Translate(), null);
			toolToggle.Unsaved = true;
			toolToggle.CustomDrawer = rect =>
			{
				if (Widgets.ButtonText(rect, "setting_showToggles_btn".Translate())) buttonAction();
				return false;
			};
		}
		*/
	}
}


code:
using Verse;

namespace rjw
{
	/* TO BE FINISHED
	public enum RandomDialogueJobType
	{
		Rape = 0,
		Love = 1,
		Other = 2
	}

	public sealed class RandomDialoguesDef : Def
	{
		public RandomDialogueJobType JobType;
		public string RD0;
		public string RD1;
		public string RD2;
		public string RD3;
		public string RD4;
		public string RD5;
		public string RD6;
		public string RD7;
		public string RD8;
		public string RD9;
		public string RD10;
		public string RD11;
		public string RD12;
		public string RD13;
		public string RD14;
		public string RD15;
		public string RD16;
		public string RD17;
		public string RD18;
		public string RD19;
	}

    [DefOf]
    public static class RandomDialoguesDefOf
    {
        //0 means before, 1 means during, 2 means after
        //public readonly static RandomDialoguesDef rape0;
        //public readonly static RandomDialoguesDef rape1;
        //public readonly static RandomDialoguesDef rape2;

        //public readonly static RandomDialoguesDef love0;
        //public readonly static RandomDialoguesDef love1;
        //public readonly static RandomDialoguesDef love2;

        //public readonly static RandomDialoguesDef other0;
        //public readonly static RandomDialoguesDef other1;
        //public readonly static RandomDialoguesDef other2;
    }
    */

	// TO BE FINISHED
	/*
    public static class RandomDialogues
    {
        public static void processBeforeDialogue(Pawn psubject,Pawn pobject,int Type = 4)
        {
            switch (Type)
            {
                case 0:
                    string traitDefName;
                    if (xxx.has_traits(psubject)&&Rand.Value<0.25){
                        traitDefName = psubject.random_pick_a_trait();
                        switch (traitDefName)
                        {
                            case "Nymphomaniac":
                                break;

                            case "Rapist":
                                break;

                            case "Necrophiliac":
                                break;

                            case "Zoophiliac":
                                break;

                            case "Bloodlust":
                                break;

                            case "Psychopath":
                                break;

                            case "Cannibal":
                                break;

                            case "Masochist":
                                break;

                            case "Prosthophile":
                                break;

                            case "Prosthophobe":
                                break;

                            case "Jealous":
                                break;

                            case "Gay":
                                break;

                            default:
                                break;
                        }
                    }
                    if (xxx.has_traits(pobject))
                    {
                    }
                    return;

                case 1:
                    return;

                case 2:
                    return;

                default:
                    Log.Error("[RJW]RandomDialogues::processBeforeDialogue - Type not found");
                    return;
            }
        }

        public static void processDuringDialogue(Pawn psubject, Pawn pobject, int Type = 4)
        {
            switch (Type)
            {
                case 0:
                    return;

                case 1:
                    return;

                case 2:
                    return;

                default:
                    Log.Error("[RJW]RandomDialogues::processBeforeDialogue - Type not found");
                    return;
            }
        }

        public static void processAfterDialogue(Pawn psubject, Pawn pobject, int Type = 4)
        {
            switch (Type)
            {
                case 0:
                    return;

                case 1:
                    return;

                case 2:
                    return;

                default:
                    Log.Error("[RJW]RandomDialogues::processBeforeDialogue - Type not found");
                    return;
            }
        }
    }
    */
}


code:
namespace rjw
{
	/*This is useless for now.
	public class Verb_Fuck : Verb
	{
		private const int TargetCooldown = 40;

		protected override bool TryCastShot()
		{
			Pawn casterPawn = base.CasterPawn;

			Thing thing = this.currentTarget.Thing;
			casterpawn.rotationTracker.Face(thing.DrawPos);

			this.SoundJuicy().PlayOneShot(new TargetInfo(thing.Position, casterPawn.Map, false));
			casterPawn.Drawer.Notify_MeleeAttackOn(thing);

			casterpawn.rotationTracker.FaceCell(thing.Position);
			if (casterPawn.caller != null) {
				casterPawn.caller.Notify_DidMeleeAttack();
			}
			return true;
		}

		private SoundDef SoundJuicy()
		{
			return SoundDef.Named ("Sex");
		}
	}
    */
}


code:
using System;
using System.Collections.Generic;
using RimWorld;
using Verse;
using Verse.AI;

namespace rjw
{
	public static class bondage_gear_tradeability
	{
		public static void init()
		{
			// Prevents bondage gear from appearing on traders if it is disabled in the config
			if (!xxx.config.bondage_gear_enabled)
			{
				foreach (var def in DefDatabase<bondage_gear_def>.AllDefs)
					if (def.tradeability == Tradeability.Stockable)
						def.tradeability = Tradeability.Sellable;
			}
		}
	}

	public static class bondage_gear_extensions
	{
		public static bool has_lock(this Apparel app)
		{
			return (app.TryGetComp<CompHoloCryptoStamped>() != null);
		}

		public static bool is_wearing_locked_apparel(this Pawn p)
		{
			if (p.apparel != null)
				foreach (var app in p.apparel.WornApparel)
					if (app.has_lock())
						return true;
			return false;
		}

		// Tries to get p started on the job of using an item on either another pawn or on themself (if "other" is null).
		// Of course in order for this method to work, the item's useJob has to be able to handle use on another pawn. This
		// is true for the holokey and bondage gear in RJW but not the items in the core game
		public static void start_job(this CompUsable usa, Pawn p, LocalTargetInfo tar)
		{
			if (p.CanReserveAndReach(usa.parent, PathEndMode.Touch, Danger.Deadly) &&
				((tar == null) || p.CanReserveAndReach(tar, PathEndMode.Touch, Danger.Deadly)))
			{
				var comfor = usa.parent.GetComp<CompForbiddable>();
				if (comfor != null)
					comfor.Forbidden = false;
				var job = new Job(((CompProperties_Usable)usa.props).useJob, usa.parent, tar);
				p.jobs.TryTakeOrderedJob(job);
			}
		}

		// Creates a menu option to use an item. "tar" is expected to be a pawn, corpse or null if it doesn't apply (in which
		// case the pawn will presumably use the item on themself). "required_work" can also be null.
		public static FloatMenuOption make_option(this CompUsable usa, string label, Pawn p, LocalTargetInfo tar, WorkTypeDef required_work)
		{
			if ((tar != null) && (!p.CanReserve(tar)))
				return new FloatMenuOption(label + " (" + "Reserved".Translate() + ")", null, MenuOptionPriority.DisabledOption);
			else if ((tar != null) && (!p.CanReach(tar, PathEndMode.Touch, Danger.Deadly)))
				return new FloatMenuOption(label + " (" + "NoPath".Translate() + ")", null, MenuOptionPriority.DisabledOption);
			else if ((required_work != null) && p.story.WorkTypeIsDisabled(required_work))
				return new FloatMenuOption(label + " (" + "CannotPrioritizeWorkTypeDisabled".Translate(new object[] { required_work.gerundLabel }) + ")", null, MenuOptionPriority.DisabledOption);
			else
				return new FloatMenuOption(
					label,
					delegate
					{
						usa.start_job(p, tar);
					},
					MenuOptionPriority.Default);
		}
	}

	public class bondage_gear_def : ThingDef
	{
		public Type soul_type;
		public HediffDef equipped_hediff = null;
		public bool gives_bound_moodlet = false;
		public bool gives_gagged_moodlet = false;
		public bool blocks_genitals = false;
		public bool blocks_anus = false;
		public bool blocks_breasts = false;
		private bondage_gear_soul soul_ins = null;

		public bondage_gear_soul soul
		{
			get
			{
				if (soul_ins == null)
					soul_ins = (bondage_gear_soul)Activator.CreateInstance(soul_type);
				return soul_ins;
			}
		}
	}

	public class bondage_gear_soul
	{
		// Adds the bondage gear's associated HediffDef and spawns a matching holokey
		public virtual void on_wear(Pawn wearer, Apparel gear)
		{
			var def = (bondage_gear_def)gear.def;

			if (def.equipped_hediff != null)
				wearer.health.AddHediff(def.equipped_hediff);

			var gear_stamp = gear.TryGetComp<CompHoloCryptoStamped>();
			if (gear_stamp != null)
			{
				var key = ThingMaker.MakeThing(xxx.holokey);
				var key_stamp = key.TryGetComp<CompHoloCryptoStamped>();
				key_stamp.copy_stamp_from(gear_stamp);
				if (wearer.Map != null)
					GenSpawn.Spawn(key, wearer.Position, wearer.Map);
				else
					wearer.inventory.TryAddItemNotForSale(key);
			}
		}

		// Removes the gear's HediffDef
		public virtual void on_remove(Apparel gear, Pawn former_wearer)
		{
			var def = (bondage_gear_def)gear.def;
			if (def.equipped_hediff != null)
			{
				var hed = former_wearer.health.hediffSet.GetFirstHediffOfDef(def.equipped_hediff);
				if (hed != null)
					former_wearer.health.RemoveHediff(hed);
			}
		}
	}

	// Give bondage gear an extremely low score when it's not being worn so pawns never equip it on themselves and give
	// it an extremely high score when it is being worn so pawns never try to take it off to equip something "better".
	public class bondage_gear : Apparel
	{
		public override float GetSpecialApparelScoreOffset()
		{
			return (Wearer == null) ? -1e5f : 1e5f;
		}
	}

	public class armbinder : bondage_gear
	{
		// Prevents pawns in armbinders from melee attacking
		//public override bool AllowVerbCast (IntVec3 root, TargetInfo targ)
		//{
		//	return false;
		//}
	}

	public class force_off_gear_def : RecipeDef
	{
		public ThingDef removes_apparel;
		public BodyPartDef failure_affects;
		public List<BodyPartDef> destroys_one_of = null;
		public List<BodyPartDef> major_burns_on = null;
		public List<BodyPartDef> minor_burns_on = null;
	}
}


code:
using UnityEngine;

using Verse;

namespace rjw
{
	[StaticConstructorOnStartup]
	internal static class comfort_prisoner_true_tex
	{
		public static Texture2D gizmo = ContentFinder<Texture2D>.Get("UI/Commands/comfort_prisoner_true");
	}

	[StaticConstructorOnStartup]
	internal static class comfort_prisoner_false_tex
	{
		public static Texture2D gizmo = ContentFinder<Texture2D>.Get("UI/Commands/comfort_prisoner_false");
	}

	[StaticConstructorOnStartup]
	internal static class comfort_prisoner_invisible_tex
	{
		public static Texture2D gizmo = ContentFinder<Texture2D>.Get("UI/Commands/comfort_prisoner_invisible");
	}

	public static class comfort_prisoners
	{
		public const int max_rapists_per_prisoner = 6;//TODO: make option

		public static DesignationDef designation_def = DefDatabase<DesignationDef>.GetNamed("ComfortPrisoner");

		public static DesignationDef designation_def_no_sticky = DefDatabase<DesignationDef>.GetNamed("ComfortPrisonerNoSticky");

		public static bool is_designated(Pawn p)
		{
			foreach (var des in p.Map.designationManager.AllDesignationsOn(p))
				if (des.def == designation_def || des.def == designation_def_no_sticky)
					return true;

			return false;
		}
	}
}


code:
using Verse;

namespace rjw
{
	public class config : Def
	{
		// Feature Toggles
		public bool animals_enabled;

		public bool comfort_prisoners_enabled;
		public bool colonists_can_be_comfort_prisoners;
		public bool cum_enabled;
		public bool rape_me_sticky_enabled;
		public bool sounds_enabled;
		public bool stds_enabled;
		public bool bondage_gear_enabled;
		public bool nymph_joiners_enabled;
		public bool whore_beds_enabled;
		public bool necro_enabled;
		public bool beastiality_enabled;
		public bool random_rape_enabled;
		public bool always_accept_whores;
		public bool nymphs_always_JoinInBed;
		public bool zoophis_always_rape;
		public bool rapists_always_rape;
		public bool pawns_always_do_fapping;
		public bool pawns_always_rapeCP;
		public bool whores_always_findjob;

		// Display Toggles
		public bool show_regular_dick_and_vag;

		// STD config
		public bool std_show_roll_to_catch;

		public float std_min_severity_to_pitch;
		public float std_env_pitch_cleanliness_exaggeration;
		public float std_env_pitch_dirtiness_exaggeration;
		public float std_outdoor_cleanliness;

		// Age Config
		//public int sex_free_for_all_age;
		//public int sex_minimum_age;

		public float significant_pain_threshold;    // 0.6
		public float extreme_pain_threshold;        // 0.8
		public float base_chance_to_hit_prisoner;   // 50
		public int min_ticks_between_hits;          // 500
		public int max_ticks_between_hits;          // 700

		public float max_nymph_fraction;
		public float opp_inf_initial_immunity;
		public float comfort_prisoner_rape_mtbh_mul;
		public float whore_mtbh_mul;
		public float nymph_spawn_with_std_mul;
		//public float chance_to_rim;
	}
}