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.AI;
using UnityEngine;
using RJWSexperience.ExtensionMethods;
namespace RJWSexperience
{
@ -119,7 +119,7 @@ namespace RJWSexperience
{
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))
return false;

View File

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

View File

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