Bugfixes -

SexProps usedCondom check after start now; sexprops is initialized there
 changes to getexpectedoutcomedesc from last rimworld update
This commit is contained in:
c0ffeee 2021-09-11 18:26:37 -07:00
parent 7ee78bb4e3
commit 2c61e8b542
6 changed files with 13 additions and 7 deletions

Binary file not shown.

View file

@ -127,8 +127,9 @@ namespace RJWSexperience.Ideology
{
Partner.pather.StopDead();
Partner.jobs.curDriver.asleep = false;
usedCondom = CondomUtility.TryUseCondom(pawn) || CondomUtility.TryUseCondom(Partner);
Start();
Sexprops.usedCondom = CondomUtility.TryUseCondom(pawn) || CondomUtility.TryUseCondom(Partner);
};
SexToil.AddPreTickAction(delegate
{

View file

@ -96,7 +96,7 @@ namespace RJWSexperience.Ideology
Partner.jobs.curDriver.asleep = false;
// Unlike normal rape try use comfort prisoner condom
CondomUtility.GetCondomFromRoom(Partner);
usedCondom = CondomUtility.TryUseCondom(Partner);
Sexprops.usedCondom = CondomUtility.TryUseCondom(Partner);
if (RJWSettings.DebugRape) ModLog.Message("JobDriver_RapeComfortPawn::MakeNewToils() - reserving prisoner");
//pawn.Reserve(Partner, xxx.max_rapists_per_prisoner, 0);

View file

@ -39,7 +39,7 @@ namespace RJWSexperience.Ideology
return false;
}
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments)
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
{
return new ExpectedOutcomeDesc
{
@ -74,7 +74,7 @@ namespace RJWSexperience.Ideology
return false;
}
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments)
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
{
return new ExpectedOutcomeDesc
{

View file

@ -69,7 +69,7 @@ namespace RJWSexperience
{
if (__instance.Sexprops.sexType != xxx.rjwSextype.Masturbation && !(__instance is JobDriver_Masturbate))
{
if (__instance.isRape)
if (__instance.Sexprops.isRape)
{
__instance.pawn?.skills?.Learn(VariousDefOf.SexSkill, 0.05f, true);
}
@ -103,13 +103,18 @@ namespace RJWSexperience
{
private const float base_sat_per_fuck = 0.4f;
public static void Prefix(Pawn pawn, Pawn partner, SexProps props, bool pawn_is_raping , ref float satisfaction)
public static void Prefix(SexProps props, ref float satisfaction)
{
Pawn pawn = props.pawn;
Pawn partner = props.partner;
satisfaction = Mathf.Max(base_sat_per_fuck, satisfaction * partner.GetSexStat());
}
public static void Postfix(Pawn pawn, Pawn partner, SexProps props, bool pawn_is_raping, float satisfaction)
public static void Postfix(SexProps props, float satisfaction)
{
Pawn pawn = props.pawn;
Pawn partner = props.partner;
float? lust = pawn.records?.GetValue(VariousDefOf.Lust);
xxx.rjwSextype sextype = props.sexType;
if (lust != null)