first commit

This commit is contained in:
c0ffee 2021-04-12 00:48:48 -07:00
parent 1c82248286
commit 6d1a218b2e
23 changed files with 836 additions and 0 deletions

37
About/About.xml Normal file
View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<name>RJW-Events</name>
<author>C0ffee</author>
<supportedVersions>
<li>1.2</li>
</supportedVersions>
<packageId>c0ffee.rjw.events</packageId>
<modDependencies>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
<li>
<packageId>UnlimitedHugs.HugsLib</packageId>
<displayName>HugsLib</displayName>
<downloadUrl>https://github.com/UnlimitedHugs/RimworldHugsLib/releases/latest</downloadUrl>
<steamWorkshopUrl>steam://url/CommunityFilePage/818773962</steamWorkshopUrl>
</li>
<li>
<packageId>rim.job.world</packageId>
<displayName>RimJobWorld</displayName>
<downloadUrl>https://www.loverslab.com/topic/110270-mod-rimjobworld/</downloadUrl>
</li>
</modDependencies>
<loadAfter>
<li>UnlimitedHugs.HugsLib</li>
<li>brrainz.harmony</li>
<li>rim.job.world</li>
</loadAfter>
<description>
RJW Events
</description>
</ModMetaData>

5
About/Manifest.xml Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>RJW-Events</identifier>
<version>0.0.1</version>
</Manifest>

BIN
Assemblies/RJW-Events.dll Normal file

Binary file not shown.

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<DutyDef>
<defName>Orgy</defName>
<label>orgy</label>
<hook>MediumPriority</hook>
<thinkNode Class="ThinkNode_Priority">
<subNodes>
<li Class="ThinkNode_ConditionalInGatheringArea">
<subNodes>
<li Class="RJW_Events.ThinkNode_ConditionalNude">
<subNodes>
<li Class="ThinkNode_ConditionalRandom">
<chance>0.25</chance>
<subNodes>
<li Class="JobGiver_StandAndBeSociallyActive"></li>
</subNodes>
</li>
<li Class="ThinkNode_ConditionalRandom">
<chance>0.45</chance>
<subNodes>
<li Class="RJW_Events.JobGiver_FindOrgyPartner"></li>
</subNodes>
</li>
<li Class="JobGiver_WanderInGatheringArea">
<ticksBetweenWandersRange>50~250</ticksBetweenWandersRange>
</li>
</subNodes>
</li>
<li Class="RJW_Events.JobGiver_GetNaked"></li>
</subNodes>
</li>
<!--Go to gathering area-->
<li Class="JobGiver_WanderInGatheringArea">
<locomotionUrgency>Jog</locomotionUrgency>
<ticksBetweenWandersRange>50~250</ticksBetweenWandersRange>
</li>
</subNodes>
</thinkNode>
</DutyDef>
</Defs>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<GatheringDef>
<defName>Orgy</defName>
<label>orgy</label>
<randomSelectionWeight>1</randomSelectionWeight>
<letterTitle>Orgy</letterTitle>
<letterText>{ORGANIZER_labelShort} is hosting an orgy! Everyone who goes will gain social and sexual energy.</letterText>
<calledOffMessage>The orgy has been called off.</calledOffMessage>
<finishedMessage>The orgy has finished.</finishedMessage>
<duty>Orgy</duty>
<workerClass>GatheringWorker_Party</workerClass>
<gatherSpotDefs>
<li>PartySpot</li>
</gatherSpotDefs>
</GatheringDef>
</Defs>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<JobDef>
<defName>GetNaked</defName>
<driverClass>RJW_Events.JobDriver_GetNaked</driverClass>
<reportString>Gettin' nekkid.</reportString>
</JobDef>
</Defs>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<JobDef>
<defName>OrgySex</defName>
<driverClass>RJW_Events.JobDriver_OrgySex</driverClass>
<reportString>lovin' in orgy.</reportString>
<casualInterruptible>false</casualInterruptible>
</JobDef>
<JobDef>
<defName>GettinOrgySex</defName>
<driverClass>RJW_Events.JobDriver_OrgySexReceiver</driverClass>
<reportString>Gettin' loved in orgy.</reportString>
<casualInterruptible>false</casualInterruptible>
</JobDef>
</Defs>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<TaleDef>
<defName>AttendedOrgy</defName>
<label>attended orgy</label>
<taleClass>Tale_DoublePawn</taleClass>
<type>Volatile</type>
<firstPawnSymbol>ATTENDER</firstPawnSymbol>
<secondPawnSymbol>ORGANIZER</secondPawnSymbol>
<baseInterest>1</baseInterest>
<rulePack>
<rulesStrings>
<li>tale_noun->[ATTENDER_nameDef] attending [ORGANIZER_nameDef]'s orgy</li>
<li>tale_noun->[ATTENDER_nameDef] having sex with [ORGANIZER_nameDef] at an orgy</li>
<li>image->[ATTENDER_nameFull] making out with [ORGANIZER_nameFull] [circumstance_group]</li>
<li>image->[ATTENDER_nameFull] getting a drink from [ORGANIZER_nameFull] [circumstance_group]</li>
<li>image->[ATTENDER_nameFull] chatting with [ORGANIZER_nameFull] [circumstance_group]</li>
<li>image->[ORGANIZER_nameFull] welcoming [ATTENDER_nameFull] [circumstance_group]</li>
<li>image->[ORGANIZER_nameFull] introducing [ATTENDER_nameFull] to a friend [circumstance_group]</li>
<li>circumstance_phrase->with a broad grin</li>
<li>circumstance_phrase->with a laugh</li>
<li>circumstance_phrase->with a [AdjectiveFriendly] smile</li>
<li>circumstance_phrase->while laughing uproariously</li>
<li>circumstance_phrase->while [AdjectiveFriendly]</li>
<li>desc_sentence->[Quantity_adjphrase] [PersonJob]s are involved in the conversation.</li>
<li>desc_sentence->The area is decorated with [Color] and [Color].</li>
<li>desc_sentence->[Quantity_adjphrase] [Animal]s play nearby.</li>
</rulesStrings>
</rulePack>
</TaleDef>
</Defs>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThoughtDef>
<defName>AttendedOrgy</defName>
<durationDays>10</durationDays>
<stackLimit>10</stackLimit>
<stages>
<li>
<label>attended orgy</label>
<description>I got very intimate with everyone at that orgy.</description>
<baseMoodEffect>8</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
</Defs>

81
RJW-Events.csproj Normal file
View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{938E73E7-1D25-4842-A27F-8C7D0EE7F67F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RJW_Events</RootNamespace>
<AssemblyName>RJW-Events</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\..\Modpacks\Mods\836308268\1.2\Assemblies\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RJW">
<HintPath>..\rjw-master\1.2\Assemblies\RJW.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Source\DefOfs\TaleDefOf.cs" />
<Compile Include="Source\DefOfs\ThoughtDefOf.cs" />
<Compile Include="Source\GatheringWorkers\GatheringWorker_Orgy.cs" />
<Compile Include="Source\Patches\HarmonyPatch_ReclotheOnEnd.cs" />
<Compile Include="Source\JobDrivers\JobDriver_GetNaked.cs" />
<Compile Include="Source\JobDrivers\JobDriver_OrgySex.cs" />
<Compile Include="Source\JobDrivers\JobDriver_OrgySexReceiver.cs" />
<Compile Include="Source\JobGivers\JobGiver_FindOrgyPartner.cs" />
<Compile Include="Source\JobGivers\JobGiver_GetNaked.cs" />
<Compile Include="Source\LordJobs\LordJob_Joinable_Orgy.cs" />
<Compile Include="Source\Patches\Harmony_PatchAll.cs" />
<Compile Include="Source\ThinkNodes\ThinkNode_ConditionalNude.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Content Include="Defs\DutyDefs\DutyDefs_Sex.xml" />
<Content Include="Defs\GatheringDefs\Gatherings_Sex.xml" />
<Content Include="Defs\JobDefs\Jobs_OrgySex.xml" />
<Content Include="Defs\JobDefs\Jobs_Naked.xml" />
<Content Include="Defs\TaleDefs\Tales_Sex.xml" />
<Content Include="Defs\ThoughtDefs\Thoughts_Sex.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

25
RJW-Events.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RJW-Events", "RJW-Events.csproj", "{FCB2ED70-7FE4-4C45-B90C-D7BF7E5B5E06}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FCB2ED70-7FE4-4C45-B90C-D7BF7E5B5E06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCB2ED70-7FE4-4C45-B90C-D7BF7E5B5E06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCB2ED70-7FE4-4C45-B90C-D7BF7E5B5E06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCB2ED70-7FE4-4C45-B90C-D7BF7E5B5E06}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {839AB9DE-FF41-498A-9F8F-1DE2BCC6ECD5}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,20 @@
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RJW_Events
{
[DefOf]
public static class TaleDefOf
{
static TaleDefOf()
{
DefOfHelper.EnsureInitializedInCtor(typeof(TaleDefOf));
}
public static TaleDef AttendedOrgy;
}
}

View File

@ -0,0 +1,20 @@
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RJW_Events
{
[DefOf]
public static class ThoughtDefOf
{
static ThoughtDefOf()
{
DefOfHelper.EnsureInitializedInCtor(typeof(ThoughtDefOf));
}
public static ThoughtDef AttendedOrgy;
}
}

View File

@ -0,0 +1,25 @@
using RimWorld;
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
{
class GatheringWorker_Orgy : GatheringWorker
{
protected override LordJob CreateLordJob(IntVec3 spot, Pawn organizer)
{
return new LordJob_Joinable_Orgy(spot, organizer, this.def);
}
protected override bool TryFindGatherSpot(Pawn organizer, out IntVec3 spot)
{
return RCellFinder.TryFindGatheringSpot_NewTemp(organizer, this.def, false, out spot);
}
}
}

View File

@ -0,0 +1,29 @@
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse.AI;
namespace RJW_Events
{
class JobDriver_GetNaked : JobDriver
{
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return true;
}
protected override IEnumerable<Toil> MakeNewToils()
{
Toil t = new Toil();
t.AddFinishAction(() => {
SexUtility.DrawNude(pawn);
});
yield return t;
}
}
}

View File

@ -0,0 +1,111 @@
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using Verse.AI.Group;
namespace RJW_Events
{
class JobDriver_OrgySex : JobDriver_SexQuick
{
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return true;
}
protected override IEnumerable<Toil> MakeNewToils()
{
base.setup_ticks();
JobDef PartnerJob = DefDatabase<JobDef>.GetNamed("GettinOrgySex", true);
this.FailOnDespawnedNullOrForbidden(this.iTarget);
this.FailOn(() => !this.Partner.health.capacities.CanBeAwake);
this.FailOn(() => this.pawn.IsFighting());
this.FailOn(() => this.Partner.IsFighting());
this.FailOn(() => this.pawn.Drafted);
yield return Toils_Goto.GotoThing(this.iTarget, PathEndMode.OnCell);
yield return new Toil
{
defaultCompleteMode = ToilCompleteMode.Delay,
initAction = delegate ()
{
this.ticksLeftThisToil = 5000;
},
tickAction = delegate ()
{
this.pawn.GainComfortFromCellIfPossible(false);
if (this.pawn.Position.DistanceTo(this.Partner.Position) <= 1f)
{
this.ReadyForNextToil();
}
}
};
yield return new Toil
{
defaultCompleteMode = ToilCompleteMode.Instant,
socialMode = RandomSocialMode.Off,
initAction = delegate ()
{
if(Partner.CurJob.def != PartnerJob)
{
Job newJob = JobMaker.MakeJob(PartnerJob, this.pawn, this.Partner);
this.Partner.jobs.StartJob(newJob, JobCondition.InterruptForced, null, false, true, null, null, false, false);
}
}
};
Toil toil = new Toil();
toil.defaultCompleteMode = ToilCompleteMode.Never;
toil.socialMode = RandomSocialMode.Off;
toil.defaultDuration = this.duration;
toil.handlingFacing = true;
toil.FailOn(() => this.Partner.CurJob.def != PartnerJob);
toil.initAction = delegate ()
{
this.Partner.pather.StopDead();
this.Partner.jobs.curDriver.asleep = false;
this.usedCondom = (CondomUtility.TryUseCondom(this.pawn) || CondomUtility.TryUseCondom(this.Partner));
this.Start();
};
toil.AddPreTickAction(delegate
{
this.ticks_left--;
if (this.pawn.IsHashIntervalTick(this.ticks_between_hearts))
{
this.ThrowMetaIcon(this.pawn.Position, this.pawn.Map, ThingDefOf.Mote_Heart);
}
this.SexTick(this.pawn, this.Partner, true, true);
SexUtility.reduce_rest(this.Partner, 1f);
SexUtility.reduce_rest(this.pawn, 1f);
if (this.ticks_left <= 0)
{
this.ReadyForNextToil();
}
});
toil.AddFinishAction(delegate
{
this.End();
if(LordUtility.GetLord(pawn)?.CurLordToil != null && !(LordUtility.GetLord(pawn).CurLordToil is LordToil_End))
SexUtility.DrawNude(pawn);
});
yield return toil;
yield return new Toil
{
initAction = delegate ()
{
SexUtility.ProcessSex(this.pawn, this.Partner, this.usedCondom, this.isRape, false, false, this.sexType);
},
defaultCompleteMode = ToilCompleteMode.Instant
};
yield break;
}
}
}

View File

@ -0,0 +1,79 @@
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
namespace RJW_Events
{
class JobDriver_OrgySexReceiver : JobDriver_SexBaseReciever
{
protected override IEnumerable<Toil> MakeNewToils()
{
base.setup_ticks();
this.parteners.Add(base.Partner);
float num = xxx.get_sex_ability(base.Partner);
if (num < 0.8f)
{
this.ticks_between_thrusts += 120;
}
else if (num > 2f)
{
this.ticks_between_thrusts -= 30;
}
if (this.pawn.relations.OpinionOf(base.Partner) < 0)
{
this.ticks_between_hearts += 50;
}
else if (this.pawn.relations.OpinionOf(base.Partner) > 60)
{
this.ticks_between_hearts -= 25;
}
this.FailOnDespawnedOrNull(this.iTarget);
this.FailOn(() => !base.Partner.health.capacities.CanBeAwake);
this.FailOn(() => this.pawn.Drafted);
this.FailOn(() => base.Partner.Drafted);
yield return Toils_Reserve.Reserve(this.iTarget, 1, 0, null);
Toil toil2 = this.MakeSexToil();
toil2.handlingFacing = false;
yield return toil2;
yield break;
}
private Toil MakeSexToil()
{
Toil toil = new Toil();
toil.defaultCompleteMode = ToilCompleteMode.Never;
toil.socialMode = RandomSocialMode.Off;
toil.handlingFacing = true;
toil.tickAction = delegate ()
{
if (this.pawn.IsHashIntervalTick(this.ticks_between_hearts))
{
base.ThrowMetaIcon(this.pawn.Position, this.pawn.Map, ThingDefOf.Mote_Heart);
}
};
toil.AddEndCondition(delegate
{
if (this.parteners.Count <= 0)
{
return JobCondition.Succeeded;
}
return JobCondition.Ongoing;
});
toil.socialMode = RandomSocialMode.Off;
return toil;
}
}
}

View File

@ -0,0 +1,102 @@
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using Verse.AI.Group;
namespace RJW_Events
{
public class JobGiver_FindOrgyPartner : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
if (!RJWHookupSettings.HookupsEnabled)
{
return null;
}
if (pawn.Drafted)
{
return null;
}
Pawn_MindState mindState = pawn.mindState;
DutyDef dutyDef;
if (mindState == null)
{
dutyDef = null;
}
else
{
PawnDuty duty = mindState.duty;
dutyDef = ((duty != null) ? duty.def : null);
}
if (dutyDef == DutyDefOf.TravelOrLeave)
{
if (RJWSettings.DebugLogJoinInBed)
{
ModLog.Message("JoinInBed.TryGiveJob:(" + xxx.get_pawnname(pawn) + "): has TravelOrLeave, no time for lovin!");
}
return null;
}
if (!CasualSex_Helper.CanHaveSex(pawn))
{
return null;
}
List<Pawn> targets = LordUtility.GetLord(pawn).ownedPawns;
Pawn pawn2 = null;
if(!BestPawnForOrgyExists(pawn, targets, out pawn2))
{
return null;
}
if (pawn2 == null)
{
return null;
}
if (pawn2.jobs.curDriver is JobDriver_SexBaseInitiator)
{
pawn2 = (Pawn)pawn2.CurJob.targetA;
}
else if (pawn.CurJob != null && pawn.jobs.curDriver != null)
{
pawn.jobs.curDriver.EndJobWith(JobCondition.InterruptForced);
}
return JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("OrgySex", true), pawn2);
}
public bool BestPawnForOrgyExists(Pawn pawn1, List<Pawn> targets, out Pawn result)
{
if(targets.TryRandomElementByWeight((Pawn p) => {
float chance = pawn1.relations.SecondaryRomanceChanceFactor(p);
if(!(p.jobs.curDriver is JobDriver_Sex))
{
//higher chance if person is doing nothing
chance *= 3f;
}
return chance;
}, out Pawn option)) {
result = option;
return true;
}
else
{
result = null;
return false;
}
}
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
namespace RJW_Events
{
public class JobGiver_GetNaked : ThinkNode_JobGiver
{
protected override Job TryGiveJob(Pawn pawn)
{
return JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("GetNaked", true));
}
}
}

View File

@ -0,0 +1,64 @@
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace RJW_Events
{
class LordJob_Joinable_Orgy : LordJob_Joinable_Party
{
protected override ThoughtDef AttendeeThought
{
get
{
return ThoughtDefOf.AttendedOrgy;
}
}
protected override TaleDef AttendeeTale
{
get
{
return TaleDefOf.AttendedOrgy;
}
}
protected override ThoughtDef OrganizerThought
{
get
{
return ThoughtDefOf.AttendedOrgy;
}
}
protected override TaleDef OrganizerTale
{
get
{
return TaleDefOf.AttendedOrgy;
}
}
public LordJob_Joinable_Orgy(IntVec3 spot, Pawn organizer, GatheringDef gatheringDef) : base(spot, organizer, gatheringDef)
{
}
public override float VoluntaryJoinPriorityFor(Pawn p)
{
if (!CasualSex_Helper.CanHaveSex(p) || p.Map.mapPawns.FreeColonists.Exists((Pawn p1) =>
{
return p.relations.SecondaryRomanceChanceFactor(p1) > 0 || p1.relations.SecondaryRomanceChanceFactor(p) > 0;
})) return 0;
return base.VoluntaryJoinPriorityFor(p);
}
}
}

View File

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using RimWorld;
using Verse;
namespace RJW_Events
{
[HarmonyPatch(typeof(LordJob_Joinable_Party), "ApplyOutcome")]
public static class HarmonyPatch_ReclotheOnEnd
{
public static void Postfix(LordToil_Party toil)
{
List<Pawn> ownedPawns = toil.lord.ownedPawns;
foreach(Pawn p in ownedPawns)
{
p.Drawer.renderer.graphics.ResolveApparelGraphics();
}
}
}
}

View File

@ -0,0 +1,21 @@
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Verse;
namespace RJW_Events
{
[StaticConstructorOnStartup]
class Harmony_PatchAll
{
static Harmony_PatchAll()
{
Harmony harmony = new Harmony("rimworldevents");
harmony.PatchAll(Assembly.GetExecutingAssembly());
}
}
}

View File

@ -0,0 +1,39 @@
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
namespace RJW_Events
{
public class ThinkNode_ConditionalNude : ThinkNode_Conditional
{
protected override bool Satisfied(Pawn pawn)
{
//if pawn is rendering apparel they shouldn't be,
if (pawn.Drawer.renderer.graphics.apparelGraphics.Any((ApparelGraphicRecord x) => {
if (x.sourceApparel.def.defName.ToLower().ContainsAny(new string[]
{
"vibrator",
"piercing",
"strapon"
}) || (RJWPreferenceSettings.sex_wear == RJWPreferenceSettings.Clothing.Headgear && !x.sourceApparel.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead)))
return false;
return true;
}))
{
//they aren't nude
return false;
}
return true;
}
}
}