Update to RJW 4.9.5.1

This commit is contained in:
amevarashi 2022-03-04 22:20:44 +05:00
parent 6455c529e2
commit bd6df7a2d7
6 changed files with 38 additions and 5 deletions

Binary file not shown.

View file

@ -0,0 +1,32 @@
using Verse;
using rjw;
namespace RJWSexperience.ExtensionMethods
{
public static class SexPropsExtensions
{
public static Pawn GetInteractionInitiator(this SexProps props)
{
if (props.isReceiver)
{
return props.partner;
}
else
{
return props.pawn;
}
}
public static Pawn GetInteractionRecipient(this SexProps props)
{
if (props.isReceiver)
{
return props.pawn;
}
else
{
return props.partner;
}
}
}
}

View file

@ -10,7 +10,7 @@ using RimWorld;
using Verse; using Verse;
using Verse.AI; using Verse.AI;
using UnityEngine; using UnityEngine;
using RJWSexperience.ExtensionMethods;
namespace RJWSexperience namespace RJWSexperience
{ {
@ -119,7 +119,7 @@ namespace RJWSexperience
{ {
var interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey); var interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey);
if (props.pawn == props.interactionInitiator) if (props.pawn == props.GetInteractionInitiator())
{ {
if (!interaction.DominantHasTag(GenitalTag.CanPenetrate) && !interaction.DominantHasFamily(GenitalFamily.Penis)) if (!interaction.DominantHasTag(GenitalTag.CanPenetrate) && !interaction.DominantHasFamily(GenitalFamily.Penis))
return false; return false;

View file

@ -68,6 +68,7 @@
<Compile Include="Building_Cumbucket.cs" /> <Compile Include="Building_Cumbucket.cs" />
<Compile Include="Configurations.cs" /> <Compile Include="Configurations.cs" />
<Compile Include="DebugAction.cs" /> <Compile Include="DebugAction.cs" />
<Compile Include="ExtensionMethods\SexPropsExtensions.cs" />
<Compile Include="Harmony.cs" /> <Compile Include="Harmony.cs" />
<Compile Include="IngestionOutcomeDoers.cs" /> <Compile Include="IngestionOutcomeDoers.cs" />
<Compile Include="JobDrivers.cs" /> <Compile Include="JobDrivers.cs" />

View file

@ -7,7 +7,7 @@ using RimWorld;
using Verse; using Verse;
using rjw; using rjw;
using UnityEngine; using UnityEngine;
using System.Collections; using RJWSexperience.ExtensionMethods;
namespace RJWSexperience namespace RJWSexperience
{ {
@ -758,11 +758,11 @@ namespace RJWSexperience
totalsexhad++; totalsexhad++;
if (props.isRape) if (props.isRape)
{ {
if (partner == props.interactionInitiator) if (partner == props.GetInteractionInitiator())
{ {
rapedme++; rapedme++;
} }
else if (partner == props.interactionRecipient) else if (partner == props.GetInteractionRecipient())
{ {
raped++; raped++;
} }