mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Update for RJW 4.9.0 - uses interaction tag reverse to determine pawn givers and receivers
This commit is contained in:
parent
82d81ea0be
commit
a6ab396333
6 changed files with 33 additions and 8 deletions
Binary file not shown.
|
@ -32,7 +32,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>D:\잉어\Lib\Harmony.2.0.4.0\net472\0Harmony.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\..\workshop\content\294100\1127530465\1.3\Assemblies\0Harmony.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
|
@ -40,7 +40,7 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RJW">
|
||||
<HintPath>..\..\..\RJW\1.3\Assemblies\RJW.dll</HintPath>
|
||||
<HintPath>..\..\..\rjw\1.3\Assemblies\RJW.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>D:\잉어\Lib\Harmony.2.0.4.0\net472\0Harmony.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\..\workshop\content\294100\1127530465\1.3\Assemblies\0Harmony.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
|
@ -40,7 +40,7 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RJW">
|
||||
<HintPath>..\..\..\RJW\1.3\Assemblies\RJW.dll</HintPath>
|
||||
<HintPath>..\..\..\rjw\1.3\Assemblies\RJW.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -8,6 +8,9 @@ using RimWorld;
|
|||
using Verse;
|
||||
using Verse.AI;
|
||||
using UnityEngine;
|
||||
using rjw.Modules.Interactions.Objects;
|
||||
using rjw.Modules.Interactions.Helpers;
|
||||
using rjw.Modules.Interactions.Enums;
|
||||
|
||||
namespace RJWSexperience
|
||||
{
|
||||
|
@ -102,13 +105,33 @@ namespace RJWSexperience
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Uses RJW 4.9.0's new interactiondefs to determine giver and receiver based on reverse interactiontag
|
||||
*/
|
||||
|
||||
public static void DetermineGiversAndReceivers(SexProps props, out Pawn giver, out Pawn receiver)
|
||||
{
|
||||
InteractionWithExtension interaction = InteractionHelper.GetWithExtension(props.dictionaryKey);
|
||||
if (interaction.HasInteractionTag(InteractionTag.Reverse))
|
||||
{
|
||||
receiver = props.partner;
|
||||
giver = props.pawn;
|
||||
}
|
||||
else
|
||||
{
|
||||
receiver = props.pawn;
|
||||
giver = props.partner;
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateSextypeRecords(SexProps props)
|
||||
{
|
||||
xxx.rjwSextype sextype = props.sexType;
|
||||
Pawn pawn = props.pawn;
|
||||
Pawn partner = props.partner;
|
||||
Pawn receiver = props.reciever;
|
||||
Pawn giver = props.giver;
|
||||
|
||||
DetermineGiversAndReceivers(props, out Pawn giver, out Pawn receiver);
|
||||
|
||||
|
||||
if (partner != null)
|
||||
{
|
||||
|
|
|
@ -758,11 +758,13 @@ namespace RJWSexperience
|
|||
totalsexhad++;
|
||||
if (props.isRape)
|
||||
{
|
||||
if (partner == props.giver)
|
||||
RJWUtility.DetermineGiversAndReceivers(props, out Pawn giver, out Pawn receiver);
|
||||
|
||||
if (partner == giver)
|
||||
{
|
||||
rapedme++;
|
||||
}
|
||||
else if (partner == props.reciever)
|
||||
else if (partner == receiver)
|
||||
{
|
||||
raped++;
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue