mirror of
https://gitgud.io/c0ffeeeeeeee/rjw-events.git
synced 2024-08-14 23:57:42 +00:00
Various fixes
This commit is contained in:
parent
6d1a218b2e
commit
1cfbc2c83e
7 changed files with 57 additions and 5 deletions
Binary file not shown.
|
@ -63,6 +63,8 @@
|
||||||
<Compile Include="Source\JobGivers\JobGiver_FindOrgyPartner.cs" />
|
<Compile Include="Source\JobGivers\JobGiver_FindOrgyPartner.cs" />
|
||||||
<Compile Include="Source\JobGivers\JobGiver_GetNaked.cs" />
|
<Compile Include="Source\JobGivers\JobGiver_GetNaked.cs" />
|
||||||
<Compile Include="Source\LordJobs\LordJob_Joinable_Orgy.cs" />
|
<Compile Include="Source\LordJobs\LordJob_Joinable_Orgy.cs" />
|
||||||
|
<Compile Include="Source\Patches\HarmonyPatch_ReclotheOnRemovePawn.cs" />
|
||||||
|
<Compile Include="Source\Patches\HarmonyPatch_StayNudeForOrgy.cs" />
|
||||||
<Compile Include="Source\Patches\Harmony_PatchAll.cs" />
|
<Compile Include="Source\Patches\Harmony_PatchAll.cs" />
|
||||||
<Compile Include="Source\ThinkNodes\ThinkNode_ConditionalNude.cs" />
|
<Compile Include="Source\ThinkNodes\ThinkNode_ConditionalNude.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -23,12 +23,13 @@ namespace RJW_Events
|
||||||
{
|
{
|
||||||
base.setup_ticks();
|
base.setup_ticks();
|
||||||
JobDef PartnerJob = DefDatabase<JobDef>.GetNamed("GettinOrgySex", true);
|
JobDef PartnerJob = DefDatabase<JobDef>.GetNamed("GettinOrgySex", true);
|
||||||
this.FailOnDespawnedNullOrForbidden(this.iTarget);
|
this.FailOnDespawnedOrNull(this.iTarget);
|
||||||
this.FailOn(() => !this.Partner.health.capacities.CanBeAwake);
|
this.FailOn(() => !this.Partner.health.capacities.CanBeAwake);
|
||||||
this.FailOn(() => this.pawn.IsFighting());
|
this.FailOn(() => this.pawn.IsFighting());
|
||||||
this.FailOn(() => this.Partner.IsFighting());
|
this.FailOn(() => this.Partner.IsFighting());
|
||||||
this.FailOn(() => this.pawn.Drafted);
|
this.FailOn(() => this.pawn.Drafted);
|
||||||
yield return Toils_Goto.GotoThing(this.iTarget, PathEndMode.OnCell);
|
this.FailOn(() => this.Partner.Drafted);
|
||||||
|
yield return Toils_Goto.GotoThing(this.iTarget, PathEndMode.ClosestTouch);
|
||||||
yield return new Toil
|
yield return new Toil
|
||||||
{
|
{
|
||||||
defaultCompleteMode = ToilCompleteMode.Delay,
|
defaultCompleteMode = ToilCompleteMode.Delay,
|
||||||
|
@ -39,7 +40,7 @@ namespace RJW_Events
|
||||||
tickAction = delegate ()
|
tickAction = delegate ()
|
||||||
{
|
{
|
||||||
this.pawn.GainComfortFromCellIfPossible(false);
|
this.pawn.GainComfortFromCellIfPossible(false);
|
||||||
if (this.pawn.Position.DistanceTo(this.Partner.Position) <= 1f)
|
if (this.pawn.Position.DistanceTo(this.Partner.Position) <= 3f)
|
||||||
{
|
{
|
||||||
this.ReadyForNextToil();
|
this.ReadyForNextToil();
|
||||||
}
|
}
|
||||||
|
@ -91,7 +92,7 @@ namespace RJW_Events
|
||||||
toil.AddFinishAction(delegate
|
toil.AddFinishAction(delegate
|
||||||
{
|
{
|
||||||
this.End();
|
this.End();
|
||||||
if(LordUtility.GetLord(pawn)?.CurLordToil != null && !(LordUtility.GetLord(pawn).CurLordToil is LordToil_End))
|
if(LordUtility.GetLord(pawn)?.LordJob != null && LordUtility.GetLord(pawn).LordJob is LordJob_Joinable_Orgy && !(LordUtility.GetLord(pawn).CurLordToil is LordToil_End))
|
||||||
SexUtility.DrawNude(pawn);
|
SexUtility.DrawNude(pawn);
|
||||||
});
|
});
|
||||||
yield return toil;
|
yield return toil;
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace RJW_Events
|
||||||
this.ticks_between_hearts -= 25;
|
this.ticks_between_hearts -= 25;
|
||||||
}
|
}
|
||||||
this.FailOnDespawnedOrNull(this.iTarget);
|
this.FailOnDespawnedOrNull(this.iTarget);
|
||||||
|
this.FailOn(() => !(Partner.jobs.curDriver is JobDriver_Sex));
|
||||||
this.FailOn(() => !base.Partner.health.capacities.CanBeAwake);
|
this.FailOn(() => !base.Partner.health.capacities.CanBeAwake);
|
||||||
this.FailOn(() => this.pawn.Drafted);
|
this.FailOn(() => this.pawn.Drafted);
|
||||||
this.FailOn(() => base.Partner.Drafted);
|
this.FailOn(() => base.Partner.Drafted);
|
||||||
|
@ -69,7 +70,7 @@ namespace RJW_Events
|
||||||
return JobCondition.Succeeded;
|
return JobCondition.Succeeded;
|
||||||
}
|
}
|
||||||
return JobCondition.Ongoing;
|
return JobCondition.Ongoing;
|
||||||
});
|
});
|
||||||
toil.socialMode = RandomSocialMode.Off;
|
toil.socialMode = RandomSocialMode.Off;
|
||||||
return toil;
|
return toil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ namespace RJW_Events
|
||||||
{
|
{
|
||||||
if(targets.TryRandomElementByWeight((Pawn p) => {
|
if(targets.TryRandomElementByWeight((Pawn p) => {
|
||||||
|
|
||||||
|
if (p == pawn1) return 0;
|
||||||
float chance = pawn1.relations.SecondaryRomanceChanceFactor(p);
|
float chance = pawn1.relations.SecondaryRomanceChanceFactor(p);
|
||||||
if(!(p.jobs.curDriver is JobDriver_Sex))
|
if(!(p.jobs.curDriver is JobDriver_Sex))
|
||||||
{
|
{
|
||||||
|
|
23
Source/Patches/HarmonyPatch_ReclotheOnRemovePawn.cs
Normal file
23
Source/Patches/HarmonyPatch_ReclotheOnRemovePawn.cs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Verse;
|
||||||
|
using Verse.AI.Group;
|
||||||
|
|
||||||
|
namespace RJW_Events
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(Lord), "RemovePawn")]
|
||||||
|
public static class HarmonyPatch_ReclotheOnRemovePawn
|
||||||
|
{
|
||||||
|
public static void Postfix(Lord __instance, Pawn p)
|
||||||
|
{
|
||||||
|
if(__instance?.LordJob != null && __instance.LordJob is LordJob_Joinable_Orgy)
|
||||||
|
{
|
||||||
|
p.Drawer.renderer.graphics.ResolveApparelGraphics();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
Source/Patches/HarmonyPatch_StayNudeForOrgy.cs
Normal file
24
Source/Patches/HarmonyPatch_StayNudeForOrgy.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Verse;
|
||||||
|
using Verse.AI.Group;
|
||||||
|
|
||||||
|
namespace RJW_Events
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")]
|
||||||
|
public static class HarmonyPatch_StayNudeForOrgy
|
||||||
|
{
|
||||||
|
public static bool Prefix(PawnGraphicSet __instance)
|
||||||
|
{
|
||||||
|
if(LordUtility.GetLord(__instance.pawn)?.LordJob != null && LordUtility.GetLord(__instance.pawn).LordJob is LordJob_Joinable_Orgy)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue