mirror of
https://gitgud.io/AbstractConcept/privacy-please.git
synced 2024-08-15 00:03:18 +00:00
Initial commit
This commit is contained in:
parent
fe7c28ad8e
commit
55402b9891
54 changed files with 2515 additions and 92 deletions
BIN
Source/.vs/AbsCon_PrivacyPlease/v16/.suo
Normal file
BIN
Source/.vs/AbsCon_PrivacyPlease/v16/.suo
Normal file
Binary file not shown.
85
Source/AbsCon_PrivacyPlease.csproj
Normal file
85
Source/AbsCon_PrivacyPlease.csproj
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?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>{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Privacy_Please</RootNamespace>
|
||||
<AssemblyName>Privacy-Please</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\1.4\Assemblies\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Scripts\Comps\CompPawnThoughtData.cs" />
|
||||
<Compile Include="Scripts\Comps\CompProperties_PawnThoughtData.cs" />
|
||||
<Compile Include="Scripts\Extensions\PawnExtension.cs" />
|
||||
<Compile Include="Scripts\JobDrivers\JobDriver_WatchSex.cs" />
|
||||
<Compile Include="Scripts\JobDrivers\JobDriver_JoinInSex.cs" />
|
||||
<Compile Include="Scripts\Patches\HarmonyPatch_PatchAll.cs" />
|
||||
<Compile Include="Scripts\Patches\HarmonyPatch_RJW.cs" />
|
||||
<Compile Include="Scripts\Patches\HarmonyPatch_ThoughtWorkers.cs" />
|
||||
<Compile Include="Scripts\Settings\BasicSettings.cs" />
|
||||
<Compile Include="Scripts\ThoughtWorkers\ThoughtWorker_ExposedUnderwear.cs" />
|
||||
<Compile Include="Scripts\Utilities\DebugMode.cs" />
|
||||
<Compile Include="Scripts\Utilities\ModDefOf.cs" />
|
||||
<Compile Include="Scripts\Utilities\SexInteractionUtility.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="AlienRace">
|
||||
<HintPath>..\..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\AlienRace.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Rimworld-Animations">
|
||||
<HintPath>..\..\rimworld-animations-master\1.4\Assemblies\Rimworld-Animations.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RJW">
|
||||
<HintPath>..\..\RJW\1.4\Assemblies\RJW.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
25
Source/AbsCon_PrivacyPlease.sln
Normal file
25
Source/AbsCon_PrivacyPlease.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30011.22
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbsCon_PrivacyPlease", "AbsCon_PrivacyPlease.csproj", "{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC00E678-E117-4BC2-8C3E-DA26509E2F6D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F81BB2E3-A87F-4B5D-974E-E42884E9B8B6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
54
Source/Scripts/Comps/CompPawnThoughtData.cs
Normal file
54
Source/Scripts/Comps/CompPawnThoughtData.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using AlienRace;
|
||||
using UnityEngine;
|
||||
using rjw;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public class CompPawnThoughtData : ThingComp
|
||||
{
|
||||
private Pawn pawn;
|
||||
private int lastExclaimationTick = -1;
|
||||
private int exclaimationCoolDown = 90;
|
||||
|
||||
public override void Initialize(CompProperties props)
|
||||
{
|
||||
if (pawn == null)
|
||||
{ pawn = parent as Pawn; }
|
||||
}
|
||||
|
||||
// Delay the cleaning of filth under the sexing pawns
|
||||
public override void CompTickRare()
|
||||
{
|
||||
base.CompTickRare();
|
||||
|
||||
if (pawn?.jobs?.curDriver != null && pawn.jobs.curDriver is JobDriver_Sex)
|
||||
{
|
||||
IEnumerable<Thing> filthPile = pawn.PositionHeld.GetThingList(pawn.Map);
|
||||
|
||||
if (filthPile == null) return;
|
||||
|
||||
foreach(Thing thing in filthPile)
|
||||
{
|
||||
if ((thing is Filth) == false) continue;
|
||||
|
||||
AccessTools.Field(typeof(Filth), "growTick").SetValue(thing as Filth, Find.TickManager.TicksGame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TryToExclaim()
|
||||
{
|
||||
if (Find.TickManager.TicksGame > exclaimationCoolDown + lastExclaimationTick)
|
||||
{
|
||||
lastExclaimationTick = Find.TickManager.TicksGame;
|
||||
FleckMaker.ThrowMetaIcon(pawn.Position, pawn.Map, FleckDefOf.IncapIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
Source/Scripts/Comps/CompProperties_PawnThoughtData.cs
Normal file
13
Source/Scripts/Comps/CompProperties_PawnThoughtData.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using Verse;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public class CompProperties_PawnThoughtData : CompProperties
|
||||
{
|
||||
public CompProperties_PawnThoughtData()
|
||||
{
|
||||
base.compClass = typeof(CompPawnThoughtData);
|
||||
}
|
||||
}
|
||||
}
|
273
Source/Scripts/Extensions/PawnExtension.cs
Normal file
273
Source/Scripts/Extensions/PawnExtension.cs
Normal file
|
@ -0,0 +1,273 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using Verse.AI.Group;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using Rimworld_Animations;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public static class PawnExtension
|
||||
{
|
||||
public static bool IsInBed(this Pawn pawn, out Building bed)
|
||||
{
|
||||
bed = pawn.Position.GetThingList(pawn.Map).FirstOrDefault(x => x is Building_Bed) as Building;
|
||||
return bed != null;
|
||||
}
|
||||
|
||||
public static bool IsSeated(this Pawn pawn, out Building seat)
|
||||
{
|
||||
seat = pawn.Position.GetThingList(pawn.Map).FirstOrDefault(x => x is Building && x.def.building.isSittable) as Building;
|
||||
return seat != null;
|
||||
}
|
||||
|
||||
public static bool IsHavingSex(this Pawn pawn)
|
||||
{
|
||||
if (pawn?.jobs?.curDriver == null || pawn.Dead || pawn.jobs.curDriver is JobDriver_Sex == false)
|
||||
{ return false; }
|
||||
|
||||
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
|
||||
|
||||
return jobdriver.Partner != null && jobdriver.Partner != pawn;
|
||||
}
|
||||
|
||||
public static bool IsMasturbating(this Pawn pawn)
|
||||
{
|
||||
if (pawn?.jobs?.curDriver == null || pawn.Dead || pawn.jobs.curDriver is JobDriver_Sex == false)
|
||||
{ return false; }
|
||||
|
||||
JobDriver_Sex jobdriver = pawn.jobs.curDriver as JobDriver_Sex;
|
||||
|
||||
return jobdriver.Partner == null || jobdriver.Partner == pawn || (jobdriver.Partner is Pawn) == false;
|
||||
}
|
||||
|
||||
public static Pawn GetSexInitiator(this Pawn pawn)
|
||||
{
|
||||
if (pawn?.jobs?.curDriver != null && pawn.Dead == false && pawn.jobs.curDriver is JobDriver_SexBaseInitiator)
|
||||
{ return pawn; }
|
||||
|
||||
JobDriver_SexBaseReciever jobDriver = pawn.jobs.curDriver as JobDriver_SexBaseReciever;
|
||||
|
||||
if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.Dead == false && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseInitiator)
|
||||
{ return jobDriver.Partner; }
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Pawn GetSexReceiver(this Pawn pawn)
|
||||
{
|
||||
if (pawn.jobs.curDriver is JobDriver_SexBaseReciever)
|
||||
{ return pawn; }
|
||||
|
||||
JobDriver_SexBaseInitiator jobDriver = pawn.jobs.curDriver as JobDriver_SexBaseInitiator;
|
||||
|
||||
if (jobDriver?.Partner?.jobs?.curDriver != null && jobDriver.Partner.Dead == false && jobDriver.Partner.jobs.curDriver is JobDriver_SexBaseReciever)
|
||||
{ return jobDriver.Partner; }
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Pawn GetSexPartner(this Pawn pawn)
|
||||
{
|
||||
return (pawn.jobs.curDriver as JobDriver_Sex)?.Partner;
|
||||
}
|
||||
|
||||
public static List<Pawn> GetAllSexParticipants(this Pawn pawn)
|
||||
{
|
||||
List<Pawn> participants = new List<Pawn>();
|
||||
|
||||
if (pawn?.jobs?.curDriver == null || (pawn.jobs.curDriver is JobDriver_Sex) == false)
|
||||
{ return participants; }
|
||||
|
||||
if (pawn.GetSexReceiver() != null)
|
||||
{
|
||||
List<Pawn> partners = (pawn.GetSexReceiver().jobs.curDriver as JobDriver_SexBaseReciever).parteners.ToList();
|
||||
|
||||
if (partners != null)
|
||||
{
|
||||
foreach (Pawn partner in partners)
|
||||
{
|
||||
if (partner != null)
|
||||
{ participants = partners; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pawn.GetSexInitiator() != null)
|
||||
{
|
||||
Pawn partner = (pawn.GetSexInitiator().jobs.curDriver as JobDriver_SexBaseInitiator).Partner;
|
||||
|
||||
if (partner != null && partner.Dead == false)
|
||||
{ participants.AddDistinct(partner); }
|
||||
}
|
||||
|
||||
participants.AddDistinct(pawn);
|
||||
|
||||
return participants;
|
||||
}
|
||||
|
||||
public static bool IsLoverOfOther(this Pawn pawn, Pawn other)
|
||||
{
|
||||
if (pawn == null || other == null)
|
||||
{ return false; }
|
||||
|
||||
List<DirectPawnRelation> lovers = SpouseRelationUtility.GetLoveRelations(pawn, false);
|
||||
return lovers.Any(x => x.otherPawn == other);
|
||||
}
|
||||
|
||||
public static bool HasPrivacy(this Pawn pawn, float radius)
|
||||
{
|
||||
if (pawn.UnworriedAboutHumanSex() == false)
|
||||
{ return true; }
|
||||
|
||||
if (pawn.IsHavingSex() == false && pawn.IsMasturbating() == false)
|
||||
{ return true; }
|
||||
|
||||
if (pawn.GetLord() != null && (pawn.GetLord().LordJob is LordJob_Ritual || pawn.GetLord().LordJob is LordJob_Joinable_Party) && BasicSettings.ignoreRitualAndPartySex)
|
||||
{ return true; }
|
||||
|
||||
bool hasPrivacy = true;
|
||||
pawn.IsInBed(out Building bed);
|
||||
|
||||
foreach (Thing thing in GenRadial.RadialDistinctThingsAround(pawn.Position, pawn.Map, radius, true))
|
||||
{
|
||||
Pawn witness = thing as Pawn;
|
||||
if (witness == null) continue;
|
||||
|
||||
// Caught having sex
|
||||
if (SexInteractionUtility.PawnCaughtLovinByWitness(pawn, witness))
|
||||
{
|
||||
// Try to invite intruder to join in
|
||||
if (SexInteractionUtility.InvitePasserbyForSex(pawn, witness, out bool brokeTaboo))
|
||||
{
|
||||
if (pawn.IsMasturbating())
|
||||
{
|
||||
if (bed == null)
|
||||
{
|
||||
Job job = new Job(xxx.quick_sex, pawn);
|
||||
witness.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Job job = new Job(xxx.casual_sex, pawn, bed);
|
||||
witness.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
}
|
||||
|
||||
else if (pawn.GetSexReceiver() != null)
|
||||
{
|
||||
Job job = new Job(DefDatabase<JobDef>.GetNamed("JoinInSex", false), pawn.GetSexReceiver(), bed);
|
||||
witness.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
}
|
||||
|
||||
// Voyeurs and cuckolds like to watch
|
||||
else if (CasualSex_Helper.CanHaveSex(witness) && xxx.IsTargetPawnOkay(witness) &&
|
||||
(xxx.has_quirk(witness, "Voyeur") || (xxx.has_quirk(witness, "Cuckold") && SexInteractionUtility.SexParticipantsIncludesACheatingPartner(witness, pawn.GetAllSexParticipants()))))
|
||||
{
|
||||
Job job = new Job(DefDatabase<JobDef>.GetNamed("WatchSex", false), pawn.GetSexReceiver(), bed);
|
||||
witness.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
|
||||
// Do nothing if witness is a lover and no taboo was not broken
|
||||
else if (brokeTaboo == false && witness.IsLoverOfOther(pawn))
|
||||
{ }
|
||||
|
||||
// Privacy was breached
|
||||
else
|
||||
{ hasPrivacy = false; }
|
||||
}
|
||||
}
|
||||
|
||||
return BasicSettings.needPrivacy == false ||
|
||||
hasPrivacy ||
|
||||
xxx.has_quirk(pawn, "Exhibitionist") ||
|
||||
pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Acceptable) == true ||
|
||||
pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Approved) == true;
|
||||
}
|
||||
|
||||
public static bool HasPreceptForIssue(this Pawn pawn, string issueDefName, out Precept precept)
|
||||
{
|
||||
precept = null;
|
||||
|
||||
if (pawn?.Ideo == null)
|
||||
{ return false; }
|
||||
|
||||
foreach (Precept _precept in pawn.Ideo.PreceptsListForReading)
|
||||
{
|
||||
if (_precept.def.issue.defName == issueDefName)
|
||||
{
|
||||
precept = _precept;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool EnjoysViolence(this Pawn pawn)
|
||||
{
|
||||
if (pawn.IsAnimal() || pawn.RaceProps.IsMechanoid)
|
||||
{ return true; }
|
||||
|
||||
if (pawn?.story?.traits?.allTraits == null || pawn?.story?.traits?.allTraits.NullOrEmpty() == true)
|
||||
{ return false; }
|
||||
|
||||
List<string> traits = new List<string>() { "Brawler", "Psychopath", "Bloodlust" };
|
||||
|
||||
return pawn.story.traits.allTraits.Any(x => traits.Contains(x.def.defName));
|
||||
}
|
||||
|
||||
public static bool DislikesViolence(this Pawn pawn)
|
||||
{
|
||||
if (pawn.IsAnimal() || pawn.RaceProps.IsMechanoid)
|
||||
{ return false; }
|
||||
|
||||
if (pawn?.story?.traits?.allTraits == null || pawn?.story?.traits?.allTraits.NullOrEmpty() == true)
|
||||
{ return false; }
|
||||
|
||||
List<string> traits = new List<string>() { "Kind", "Wimp" };
|
||||
|
||||
return pawn.WorkTagIsDisabled(WorkTags.Violent) || pawn.story.traits.allTraits.Any(x => traits.Contains(x.def.defName));
|
||||
}
|
||||
|
||||
public static bool HasTrait(this Pawn pawn, string trait)
|
||||
{
|
||||
if (pawn?.story?.traits?.allTraits == null || pawn.story.traits.allTraits.NullOrEmpty())
|
||||
{ return false; }
|
||||
|
||||
TraitDef traitDef = DefDatabase<TraitDef>.GetNamedSilentFail(trait);
|
||||
|
||||
if (traitDef == null)
|
||||
{ traitDef = DefDatabase<TraitDef>.GetNamedSilentFail(trait.ToLower()); }
|
||||
|
||||
return HasTrait(pawn, traitDef);
|
||||
}
|
||||
|
||||
public static bool HasTrait(this Pawn pawn, TraitDef traitDef)
|
||||
{
|
||||
if (pawn?.story?.traits?.allTraits == null || pawn.story.traits.allTraits.NullOrEmpty())
|
||||
{ return false; }
|
||||
|
||||
if (traitDef == null)
|
||||
{ return false; }
|
||||
|
||||
return pawn.story.traits.HasTrait(traitDef);
|
||||
}
|
||||
|
||||
public static bool UnworriedAboutHumanSex(this Pawn pawn)
|
||||
{
|
||||
return (pawn.Dead ||
|
||||
pawn.AnimalOrWildMan() ||
|
||||
pawn.RaceProps.IsMechanoid ||
|
||||
pawn.Awake() == false ||
|
||||
pawn.Suspended == false ||
|
||||
(pawn.Faction != null && pawn.Faction.HostileTo(Faction.OfPlayer))) == false;
|
||||
}
|
||||
}
|
||||
}
|
72
Source/Scripts/JobDrivers/JobDriver_JoinInSex.cs
Normal file
72
Source/Scripts/JobDrivers/JobDriver_JoinInSex.cs
Normal file
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using rjw;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public class JobDriver_JoinInSex : JobDriver_SexBaseInitiator
|
||||
{
|
||||
public override bool TryMakePreToilReservations(bool errorOnFailed)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
setup_ticks();
|
||||
|
||||
this.FailOnDespawnedNullOrForbidden(iTarget);
|
||||
this.FailOn(() => !Partner.health.capacities.CanBeAwake);
|
||||
this.FailOn(() => pawn.Drafted);
|
||||
this.FailOn(() => Partner.Drafted);
|
||||
|
||||
Toil FollowToil = new Toil();
|
||||
FollowToil.defaultCompleteMode = ToilCompleteMode.Delay;
|
||||
FollowToil.socialMode = RandomSocialMode.Off;
|
||||
FollowToil.defaultDuration = 1200;
|
||||
FollowToil.tickAction = delegate
|
||||
{
|
||||
pawn.pather.StartPath(Partner, PathEndMode.Touch);
|
||||
|
||||
if (pawn.pather.Moving == false && Partner.pather.Moving == false && Partner.jobs.curDriver is JobDriver_SexBaseReciever)
|
||||
{ ReadyForNextToil(); }
|
||||
};
|
||||
yield return FollowToil;
|
||||
|
||||
Toil SexToil = new Toil();
|
||||
SexToil.socialMode = RandomSocialMode.Off;
|
||||
SexToil.defaultDuration = duration;
|
||||
SexToil.handlingFacing = true;
|
||||
SexToil.FailOn(() => (Partner.jobs.curDriver is JobDriver_SexBaseReciever) == false);
|
||||
SexToil.initAction = delegate
|
||||
{
|
||||
Start();
|
||||
Sexprops.usedCondom = CondomUtility.TryUseCondom(pawn) || CondomUtility.TryUseCondom(Partner);
|
||||
};
|
||||
SexToil.AddPreTickAction(delegate
|
||||
{
|
||||
if (pawn.IsHashIntervalTick(ticks_between_hearts))
|
||||
ThrowMetaIconF(pawn.Position, pawn.Map, FleckDefOf.Heart);
|
||||
SexTick(pawn, Partner);
|
||||
SexUtility.reduce_rest(pawn, 1);
|
||||
if (ticks_left <= 0)
|
||||
ReadyForNextToil();
|
||||
});
|
||||
SexToil.AddFinishAction(delegate
|
||||
{
|
||||
End();
|
||||
});
|
||||
yield return SexToil;
|
||||
|
||||
yield return new Toil
|
||||
{
|
||||
initAction = delegate { SexUtility.ProcessSex(Sexprops); },
|
||||
defaultCompleteMode = ToilCompleteMode.Instant
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
49
Source/Scripts/JobDrivers/JobDriver_WatchSex.cs
Normal file
49
Source/Scripts/JobDrivers/JobDriver_WatchSex.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RimWorld;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using rjw;
|
||||
using Rimworld_Animations;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public class JobDriver_WatchSex : JobDriver_SexBaseInitiator
|
||||
{
|
||||
private int ticks_between_eyes = 120;
|
||||
|
||||
public override bool TryMakePreToilReservations(bool errorOnFailed)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
this.FailOnDespawnedNullOrForbidden(iTarget);
|
||||
this.FailOn(() => !Partner.health.capacities.CanBeAwake);
|
||||
this.FailOn(() => pawn.Drafted);
|
||||
this.FailOn(() => Partner.Drafted);
|
||||
|
||||
Toil WatchToil = new Toil();
|
||||
WatchToil.defaultCompleteMode = ToilCompleteMode.Never;
|
||||
WatchToil.socialMode = RandomSocialMode.Off;
|
||||
WatchToil.FailOn(() => (Partner.jobs.curDriver is JobDriver_Sex) == false);
|
||||
WatchToil.initAction = delegate
|
||||
{
|
||||
pawn.pather.StopDead();
|
||||
};
|
||||
WatchToil.AddPreTickAction(delegate
|
||||
{
|
||||
if (pawn.IsHashIntervalTick(ticks_between_eyes))
|
||||
{ ThrowMetaIconF(pawn.Position, pawn.Map, ModFleckDefOf.Eye); }
|
||||
|
||||
if (pawn?.needs?.TryGetNeed<Need_Sex>() != null)
|
||||
{ pawn.needs.TryGetNeed<Need_Sex>().CurLevel += 0.5f / 2500f; }
|
||||
});
|
||||
|
||||
yield return WatchToil;
|
||||
}
|
||||
}
|
||||
}
|
29
Source/Scripts/Patches/HarmonyPatch_PatchAll.cs
Normal file
29
Source/Scripts/Patches/HarmonyPatch_PatchAll.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using rjw;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
public static class Harmony_PatchAll
|
||||
{
|
||||
static Harmony_PatchAll()
|
||||
{
|
||||
Harmony harmony = new Harmony("Rimworld_Animations_Patch");
|
||||
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||
|
||||
// Add quirks to game
|
||||
Quirk voyeur = new Quirk("Voyeur", "VoyeurQuirk");
|
||||
Quirk.All.AddDistinct(voyeur);
|
||||
|
||||
Quirk cuckold = new Quirk("Cuckold", "CuckoldQuirk");
|
||||
Quirk.All.AddDistinct(cuckold);
|
||||
}
|
||||
}
|
||||
}
|
93
Source/Scripts/Patches/HarmonyPatch_RJW.cs
Normal file
93
Source/Scripts/Patches/HarmonyPatch_RJW.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using HarmonyLib;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using rjw;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
[HarmonyPatch(typeof(JobDriver_Sex), "setup_ticks")]
|
||||
public static class HarmonyPatch_JobDriver_Sex_setup_ticks
|
||||
{
|
||||
public static void Postfix(ref JobDriver_Sex __instance)
|
||||
{
|
||||
Pawn pawn = __instance.pawn;
|
||||
|
||||
// Invite another for a threesome?
|
||||
if (RJWHookupSettings.QuickHookupsEnabled &&
|
||||
__instance is JobDriver_SexBaseInitiator &&
|
||||
pawn.GetAllSexParticipants().Count == 2 &&
|
||||
(__instance is JobDriver_JoinInSex) == false &&
|
||||
Random.value < BasicSettings.chanceForOtherToJoinInSex)
|
||||
{
|
||||
DebugMode.Message("Find another to join in sex");
|
||||
|
||||
List<Pawn> candidates = new List<Pawn>();
|
||||
float radius = 4f;
|
||||
|
||||
foreach (Thing thing in GenRadial.RadialDistinctThingsAround(pawn.Position, pawn.Map, radius, true))
|
||||
{
|
||||
Pawn other = thing as Pawn;
|
||||
ThoughtDef thoughtDef = SexInteractionUtility.GetThoughtsAboutSexAct(other, __instance, out Precept precept);
|
||||
|
||||
// Find candidates to invite
|
||||
if (other != null && thoughtDef?.hediff == null && SexInteractionUtility.CouldInvitePasserbyForSex(other, pawn.GetAllSexParticipants()))
|
||||
{
|
||||
DebugMode.Message(other.NameShortColored + " is a potential candidate");
|
||||
candidates.Add(other);
|
||||
}
|
||||
}
|
||||
|
||||
// Invite a random candidate (weighted by attraction)
|
||||
if (candidates.Count > 0)
|
||||
{
|
||||
Pawn invitedPawn = candidates.RandomElementByWeight(x => SexAppraiser.would_fuck(pawn, x, false, false, true) + SexAppraiser.would_fuck(pawn.GetSexPartner(), x, false, false, true));
|
||||
pawn.GetSexInitiator().IsInBed(out Building bed);
|
||||
|
||||
DebugMode.Message(invitedPawn.NameShortColored + " was invited to join in sex");
|
||||
|
||||
Job job = new Job(DefDatabase<JobDef>.GetNamed("JoinInSex", false), pawn.GetSexPartner(), bed);
|
||||
invitedPawn.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(JobDriver_Sex), "SexTick")]
|
||||
public static class HarmonyPatch_JobDriver_Sex_SexTick
|
||||
{
|
||||
// If pawns don't have privacy, they'll stop having sex
|
||||
public static void Postfix(ref JobDriver_Sex __instance, Pawn pawn)
|
||||
{
|
||||
if (pawn.IsHashIntervalTick(90))
|
||||
{
|
||||
if (pawn.IsMasturbating() && pawn.HasPrivacy(8f) == false)
|
||||
{ pawn.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); }
|
||||
|
||||
else if (pawn.IsHavingSex())
|
||||
{
|
||||
bool havePrivacy = true;
|
||||
List<Pawn> participants = pawn.GetAllSexParticipants();
|
||||
|
||||
foreach (Pawn participant in participants)
|
||||
{
|
||||
if (participant.HasPrivacy(8f) == false)
|
||||
{ havePrivacy = false; }
|
||||
}
|
||||
|
||||
if (__instance.Sexprops != null && (__instance.Sexprops.isRape || __instance.Sexprops.isWhoring))
|
||||
{ return; }
|
||||
|
||||
if (havePrivacy == false)
|
||||
{
|
||||
foreach (Pawn participant in participants)
|
||||
{ participant.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
105
Source/Scripts/Patches/HarmonyPatch_ThoughtWorkers.cs
Normal file
105
Source/Scripts/Patches/HarmonyPatch_ThoughtWorkers.cs
Normal file
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinChestHairOrFaceUncovered), "HasUncoveredGroinChestHairOrFace")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_GroinChestHairOrFaceUncovered
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool fullHeadCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.FullHead));
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
|
||||
bool faceCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Eyes));
|
||||
bool hairCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead));
|
||||
|
||||
__result = !(groinCovered && chestCovered && faceCovered && hairCovered);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinChestOrHairUncovered), "HasUncoveredGroinChestOrHair")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_GroinChestOrHairUncovered
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool fullHeadCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.FullHead));
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
|
||||
bool hairCovered = fullHeadCovered || pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead));
|
||||
|
||||
__result = !(groinCovered && chestCovered && hairCovered);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinOrChestUncovered), "HasUncoveredGroinOrChest")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_HasUncoveredGroinOrChest
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
bool chestCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG));
|
||||
|
||||
__result = !(groinCovered && chestCovered);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ThoughtWorker_Precept_GroinUncovered), "HasUncoveredGroin")]
|
||||
public static class HarmonyPatch_ThoughtWorker_Precept_GroinUncovered
|
||||
{
|
||||
public static void Postfix(ref bool __result, Pawn p)
|
||||
{
|
||||
if (__result == false) return;
|
||||
|
||||
Pawn pawn = p;
|
||||
if (BasicSettings.underwearSufficentForIdeos == false) return;
|
||||
|
||||
if (pawn?.apparel == null)
|
||||
{ __result = false; return; }
|
||||
|
||||
if (pawn.apparel.WornApparel.NullOrEmpty())
|
||||
{ __result = true; return; }
|
||||
|
||||
bool groinCovered = pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) || x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG));
|
||||
|
||||
__result = !groinCovered;
|
||||
}
|
||||
}
|
||||
}
|
143
Source/Scripts/Settings/BasicSettings.cs
Normal file
143
Source/Scripts/Settings/BasicSettings.cs
Normal file
|
@ -0,0 +1,143 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public class BasicSettings : ModSettings
|
||||
{
|
||||
public static bool needPrivacy = true;
|
||||
public static float chanceForOtherToJoinInSex = 0.25f;
|
||||
public static bool debugMode = false;
|
||||
|
||||
public static bool worryAboutInfidelity = true;
|
||||
public static bool worryAboutBeastiality = true;
|
||||
public static bool worryAboutRape = true;
|
||||
public static bool worryAboutNecro = true;
|
||||
public static bool worryAboutXeno = true;
|
||||
public static bool worryAboutMasturbation = true;
|
||||
public static bool worryAboutIncest = true;
|
||||
|
||||
public static bool majorTabooCanStartFights = false;
|
||||
public static bool ignoreRitualAndPartySex = true;
|
||||
public static bool slavesIgnoreSex = false;
|
||||
public static bool ignoreSlaveRape = false;
|
||||
public static bool otherFactionsIgnoreSex = false;
|
||||
|
||||
public static bool underwearSufficentForIdeos = true;
|
||||
public static bool exposedUnderwearMood = true;
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
|
||||
Scribe_Values.Look(ref needPrivacy, "needPrivacy", true);
|
||||
Scribe_Values.Look(ref chanceForOtherToJoinInSex, "chanceForSexExtra", 0.25f);
|
||||
Scribe_Values.Look(ref debugMode, "debugMode", false);
|
||||
Scribe_Values.Look(ref worryAboutInfidelity, "worryAboutInfidelity", true);
|
||||
Scribe_Values.Look(ref worryAboutBeastiality, "worryAboutBeastiality", true);
|
||||
Scribe_Values.Look(ref worryAboutRape, "worryAboutRape", true);
|
||||
Scribe_Values.Look(ref worryAboutNecro, "worryAboutNecro", true);
|
||||
Scribe_Values.Look(ref worryAboutXeno, "worryAboutXeno", true);
|
||||
Scribe_Values.Look(ref worryAboutMasturbation, "worryAboutMasturbation", true);
|
||||
Scribe_Values.Look(ref worryAboutIncest, "worryAboutIncest", true);
|
||||
Scribe_Values.Look(ref ignoreSlaveRape, "ignoreSlaveRape", false);
|
||||
Scribe_Values.Look(ref majorTabooCanStartFights, "majorTabooCanStartFights", false);
|
||||
Scribe_Values.Look(ref ignoreRitualAndPartySex, "ignoreRitualAndPartySex", false);
|
||||
Scribe_Values.Look(ref slavesIgnoreSex, "slavesIgnoreSex", false);
|
||||
Scribe_Values.Look(ref otherFactionsIgnoreSex, "otherFactionsIgnoreSex", false);
|
||||
Scribe_Values.Look(ref underwearSufficentForIdeos, "underwearSufficentForIdeos", true);
|
||||
Scribe_Values.Look(ref underwearSufficentForIdeos, "exposedUnderwearMood", true);
|
||||
}
|
||||
}
|
||||
|
||||
public class BasicSettingsDisplay : Mod
|
||||
{
|
||||
public BasicSettingsDisplay(ModContentPack content) : base(content)
|
||||
{
|
||||
GetSettings<BasicSettings>();
|
||||
}
|
||||
|
||||
public override void WriteSettings()
|
||||
{
|
||||
base.WriteSettings();
|
||||
ApplySettings();
|
||||
}
|
||||
|
||||
// Update all humanlike pawn graphics when settings window is closed
|
||||
public void ApplySettings()
|
||||
{
|
||||
if (Current.ProgramState == ProgramState.Playing)
|
||||
{
|
||||
foreach (Pawn pawn in Current.Game.CurrentMap.mapPawns.AllPawns)
|
||||
{
|
||||
if (pawn == null) continue;
|
||||
|
||||
pawn.Drawer?.renderer?.graphics?.ResolveAllGraphics();
|
||||
|
||||
PortraitsCache.SetDirty(pawn);
|
||||
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoSettingsWindowContents(Rect inRect)
|
||||
{
|
||||
Listing_Standard listingStandard;
|
||||
listingStandard = new Listing_Standard();
|
||||
listingStandard.Begin(inRect);
|
||||
|
||||
listingStandard.Gap(10f);
|
||||
listingStandard.Label("privacy_please_general".Translate());
|
||||
listingStandard.Gap(5f);
|
||||
|
||||
listingStandard.CheckboxLabeled("need_privacy".Translate(), ref BasicSettings.needPrivacy, "need_privacy_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("worry_about_masturbation".Translate(), ref BasicSettings.worryAboutMasturbation, "worry_about_masturbation_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("worry_about_infidelity".Translate(), ref BasicSettings.worryAboutInfidelity, "worry_about_infidelity_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("worry_about_beastiality".Translate(), ref BasicSettings.worryAboutBeastiality, "worry_about_beastiality_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("worry_about_rape".Translate(), ref BasicSettings.worryAboutRape, "worry_about_rape_desc".Translate());
|
||||
|
||||
if (BasicSettings.worryAboutRape)
|
||||
{ listingStandard.CheckboxLabeled("ignore_slave_rape".Translate(), ref BasicSettings.ignoreSlaveRape); }
|
||||
|
||||
listingStandard.CheckboxLabeled("worry_about_necro".Translate(), ref BasicSettings.worryAboutNecro, "worry_about_necro_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("worry_about_xeno".Translate(), ref BasicSettings.worryAboutXeno, "worry_about_xeno_desc".Translate());
|
||||
|
||||
listingStandard.Gap(20f);
|
||||
|
||||
listingStandard.CheckboxLabeled("ignore_ritual_and_party_sex".Translate(), ref BasicSettings.ignoreRitualAndPartySex, "ignore_ritual_and_party_sex_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("slaves_ignore_sex".Translate(), ref BasicSettings.slavesIgnoreSex, "slaves_ignore_sex_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("other_factions_ignore_sex".Translate(), ref BasicSettings.otherFactionsIgnoreSex, "other_factions_ignore_sex_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("major_taboo_can_start_fights".Translate(), ref BasicSettings.majorTabooCanStartFights, "major_taboo_can_start_fights_desc".Translate());
|
||||
|
||||
listingStandard.Gap(20f);
|
||||
|
||||
listingStandard.Label("chance_for_other_to_join_in_sex".Translate() + ": " + BasicSettings.chanceForOtherToJoinInSex.ToString("F"), -1f, "chance_for_other_to_join_in_sex_desc".Translate());
|
||||
BasicSettings.chanceForOtherToJoinInSex = listingStandard.Slider(BasicSettings.chanceForOtherToJoinInSex, 0f, 1f);
|
||||
|
||||
listingStandard.Gap(10f);
|
||||
listingStandard.Label("privacy_please_clothing".Translate());
|
||||
listingStandard.Gap(5f);
|
||||
|
||||
listingStandard.CheckboxLabeled("underwear_sufficent_for_ideos".Translate(), ref BasicSettings.underwearSufficentForIdeos, "underwear_sufficent_for_ideos_desc".Translate());
|
||||
listingStandard.CheckboxLabeled("exposed_underwear_mood".Translate(), ref BasicSettings.exposedUnderwearMood, "exposed_underwear_mood_desc".Translate());
|
||||
|
||||
listingStandard.Gap(15f);
|
||||
listingStandard.Label("privacy_please_debugging".Translate());
|
||||
listingStandard.Gap(5f);
|
||||
|
||||
listingStandard.CheckboxLabeled("debug_mode".Translate(), ref BasicSettings.debugMode, "debug_mode_desc".Translate());
|
||||
|
||||
listingStandard.End();
|
||||
base.DoSettingsWindowContents(inRect);
|
||||
}
|
||||
|
||||
public sealed override string SettingsCategory()
|
||||
{
|
||||
return "privacy_please_basicsettings".Translate();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public class ThoughtWorker_ExposedUnderwear : ThoughtWorker
|
||||
{
|
||||
public static ThoughtState CurrentThoughtState(Pawn pawn)
|
||||
{
|
||||
if (xxx.has_quirk(pawn, "Exhibitionist") || pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Approved) == true)
|
||||
{ return ThoughtState.ActiveAtStage(2); }
|
||||
|
||||
if (pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Acceptable) == true)
|
||||
{ return ThoughtState.ActiveAtStage(1); }
|
||||
|
||||
return ThoughtState.ActiveAtStage(0);
|
||||
}
|
||||
|
||||
protected override ThoughtState CurrentStateInternal(Pawn pawn)
|
||||
{
|
||||
if (BasicSettings.exposedUnderwearMood == false) return false;
|
||||
|
||||
if (pawn?.apparel?.WornApparel == null || pawn.apparel.WornApparel.NullOrEmpty()) return false;
|
||||
|
||||
if (pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.GenitalsBPG)) &&
|
||||
pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs)) == false)
|
||||
{ return CurrentThoughtState(pawn); }
|
||||
|
||||
if (pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(ModBodyPartGroupDefOf.ChestBPG)) &&
|
||||
pawn.apparel.WornApparel.Any(x => x.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso)) == false)
|
||||
{ return CurrentThoughtState(pawn); }
|
||||
|
||||
return ThoughtState.Inactive;
|
||||
}
|
||||
}
|
||||
}
|
16
Source/Scripts/Utilities/DebugMode.cs
Normal file
16
Source/Scripts/Utilities/DebugMode.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public static class DebugMode
|
||||
{
|
||||
public static void Message(string text)
|
||||
{
|
||||
if (BasicSettings.debugMode)
|
||||
{ Log.Message("[DEBUG] " + text); }
|
||||
}
|
||||
}
|
||||
}
|
41
Source/Scripts/Utilities/ModDefOf.cs
Normal file
41
Source/Scripts/Utilities/ModDefOf.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using Verse;
|
||||
using RimWorld;
|
||||
using AlienRace;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
[DefOf]
|
||||
public static class ModBodyPartGroupDefOf
|
||||
{
|
||||
public static BodyPartGroupDef GenitalsBPG;
|
||||
public static BodyPartGroupDef AnusBPG;
|
||||
public static BodyPartGroupDef ChestBPG;
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class ModThoughtDefOf
|
||||
{
|
||||
public static ThoughtDef SeenHavingSex;
|
||||
public static ThoughtDef SeenHavingSexExhibitionist;
|
||||
public static ThoughtDef SeenMasturbating;
|
||||
public static ThoughtDef SeenMasturbatingExhibitionist;
|
||||
public static ThoughtDef SawSex;
|
||||
public static ThoughtDef SawSexVoyeur;
|
||||
public static ThoughtDef SawMasturbation;
|
||||
public static ThoughtDef SawMasturbationVoyeur;
|
||||
public static ThoughtDef CaughtCheating;
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class ModPreceptDefOf
|
||||
{
|
||||
public static PreceptDef Exhibitionism_Acceptable;
|
||||
public static PreceptDef Exhibitionism_Approved;
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class ModFleckDefOf
|
||||
{
|
||||
public static FleckDef Eye;
|
||||
}
|
||||
}
|
303
Source/Scripts/Utilities/SexInteractionUtility.cs
Normal file
303
Source/Scripts/Utilities/SexInteractionUtility.cs
Normal file
|
@ -0,0 +1,303 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using Verse.AI.Group;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Privacy_Please
|
||||
{
|
||||
public static class SexInteractionUtility
|
||||
{
|
||||
public static bool PawnCaughtLovinByWitness(Pawn pawn, Pawn witness)
|
||||
{
|
||||
if (witness == null ||
|
||||
pawn == witness ||
|
||||
(pawn.IsMasturbating() == false && pawn.IsHavingSex() == false) ||
|
||||
witness.UnworriedAboutHumanSex() == false ||
|
||||
witness.CanSee(pawn) == false)
|
||||
{ return false; }
|
||||
|
||||
List<Pawn> sexParticipants = pawn.GetAllSexParticipants();
|
||||
bool witnessIsApproachingSexParticipant = witness.jobs.curDriver is JobDriver_SexBaseInitiator && sexParticipants.Contains((witness.jobs.curDriver as JobDriver_SexBaseInitiator).Partner);
|
||||
|
||||
if (sexParticipants.Contains(witness) || witnessIsApproachingSexParticipant)
|
||||
{ return false; }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool PawnIsCheatingOnPartner(Pawn pawn, Pawn partner)
|
||||
{
|
||||
List<Pawn> spouses = pawn.GetSpouses(false);
|
||||
|
||||
if (BasicSettings.worryAboutInfidelity == false ||
|
||||
partner.IsLoverOfOther(pawn) == false ||
|
||||
pawn.HasTrait("Polygamous") ||
|
||||
partner.HasTrait("Polygamous") ||
|
||||
partner.IsMasturbating() ||
|
||||
partner.IsHavingSex() == false ||
|
||||
partner.GetSexPartner()?.Dead == true ||
|
||||
partner.GetSexPartner()?.IsAnimal() == true ||
|
||||
partner.GetAllSexParticipants().Contains(pawn) ||
|
||||
(spouses.NullOrEmpty() == false && partner.GetAllSexParticipants().Any(x => spouses.Contains(x))))
|
||||
{ return false; }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool SexParticipantsIncludesACheatingPartner(Pawn pawn, List<Pawn> participants)
|
||||
{
|
||||
foreach (Pawn participant in participants)
|
||||
{
|
||||
if (PawnIsCheatingOnPartner(pawn, participant))
|
||||
{ return true; }
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool CouldInvitePasserbyForSex(Pawn passerby, List<Pawn> participants)
|
||||
{
|
||||
if (passerby == null ||
|
||||
participants.Contains(passerby) ||
|
||||
passerby.UnworriedAboutHumanSex() == false ||
|
||||
participants.All(x => x.CanSee(passerby) == false))
|
||||
{ return false; }
|
||||
|
||||
if (participants.Count > 2 ||
|
||||
participants.Any(x => x.IsForbidden(passerby) || x.HostileTo(passerby) || PawnIsCheatingOnPartner(x, passerby)) ||
|
||||
CasualSex_Helper.CanHaveSex(passerby) == false ||
|
||||
xxx.IsTargetPawnOkay(passerby) == false)
|
||||
{ return false; }
|
||||
|
||||
if (passerby.MentalState != null ||
|
||||
passerby.jobs.curDriver is JobDriver_Flee ||
|
||||
passerby.jobs.curDriver is JobDriver_AttackMelee ||
|
||||
passerby.jobs.curDriver is JobDriver_Vomit)
|
||||
{ return false; }
|
||||
|
||||
if (SexUtility.ReadyForHookup(passerby) &&
|
||||
(passerby?.jobs?.curJob == null || (passerby.jobs.curJob.playerForced == false && CasualSex_Helper.quickieAllowedJobs.Contains(passerby.jobs.curJob.def))) &&
|
||||
participants.Any(x => SexAppraiser.would_fuck(x, passerby) > 0.1f && SexAppraiser.would_fuck(passerby, x) > 0.1f) &&
|
||||
participants.All(x => SexAppraiser.would_fuck(x, passerby, false, false, true) > 0.1f && SexAppraiser.would_fuck(passerby, x, false, false, true) > 0.1f))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ThoughtDef GetThoughtsAboutSexAct(Pawn pawn, JobDriver_Sex jobDriver, out Precept precept)
|
||||
{
|
||||
ThoughtDef thoughtDef = null;
|
||||
precept = null;
|
||||
|
||||
if (pawn == null || jobDriver == null) return null;
|
||||
if (BasicSettings.slavesIgnoreSex && (pawn.IsPrisoner || pawn.IsSlave)) return null;
|
||||
if (BasicSettings.otherFactionsIgnoreSex && pawn.Faction.IsPlayer == false) return null;
|
||||
|
||||
bool sexIsNecro = jobDriver.Partner != null && jobDriver.Partner.Dead;
|
||||
bool sexIsBeastial = jobDriver.Partner != null && jobDriver.Partner.RaceProps.Animal;
|
||||
bool sexIsRape = sexIsBeastial == false && sexIsNecro == false &&
|
||||
(jobDriver is JobDriver_Rape || jobDriver is JobDriver_RapeEnemy || jobDriver is JobDriver_SexBaseRecieverRaped);
|
||||
bool sexIsSlaveRape = sexIsRape && (jobDriver.Partner.IsPrisoner || jobDriver.Partner.IsSlave);
|
||||
bool sexIsXeno = jobDriver.Partner != null && jobDriver.Partner.def.defName != jobDriver.pawn.def.defName;
|
||||
bool isXenophobe = pawn.HasTrait("Xenophobia") && pawn.story.traits.DegreeOfTrait(DefDatabase<TraitDef>.GetNamedSilentFail("Xenophobia")) > 0;
|
||||
bool isXenophile = pawn.HasTrait("Xenophobia") && pawn.story.traits.DegreeOfTrait(DefDatabase<TraitDef>.GetNamedSilentFail("Xenophobia")) < 0;
|
||||
bool sexIsSolo = jobDriver.pawn.IsMasturbating();
|
||||
bool sexIsIncest = jobDriver.Partner != null && jobDriver.pawn.GetRelations(jobDriver.Partner).Any(x => x.familyByBloodRelation);
|
||||
|
||||
if (BasicSettings.worryAboutNecro && sexIsNecro && xxx.is_necrophiliac(pawn) == false)
|
||||
{
|
||||
thoughtDef = xxx.is_necrophiliac(pawn) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("SawNecrophilia_Honorable") :
|
||||
pawn.HasPreceptForIssue("Necrophilia", out precept) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("Saw" + precept.def.defName) :
|
||||
DefDatabase<ThoughtDef>.GetNamedSilentFail("SawNecrophilia_Abhorrent");
|
||||
}
|
||||
|
||||
else if (BasicSettings.worryAboutBeastiality && sexIsBeastial)
|
||||
{
|
||||
thoughtDef = xxx.is_zoophile(pawn) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("SawBeastility_Honorable") :
|
||||
pawn.HasPreceptForIssue("Beastility", out precept) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("Saw" + precept.def.defName) :
|
||||
DefDatabase<ThoughtDef>.GetNamedSilentFail("SawBeastility_Abhorrent");
|
||||
}
|
||||
|
||||
else if (BasicSettings.worryAboutRape && BasicSettings.ignoreSlaveRape == false && sexIsSlaveRape)
|
||||
{
|
||||
thoughtDef = xxx.is_rapist(pawn) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("SawRape_Honorable") :
|
||||
pawn.HasPreceptForIssue("Rape", out precept) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("Saw" + precept.def.defName) :
|
||||
DefDatabase<ThoughtDef>.GetNamedSilentFail("SawRape_Abhorrent");
|
||||
}
|
||||
|
||||
else if (BasicSettings.worryAboutRape && sexIsRape)
|
||||
{
|
||||
thoughtDef = xxx.is_rapist(pawn) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("SawRape_Honorable") :
|
||||
pawn.HasPreceptForIssue("Rape", out precept) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("Saw" + precept.def.defName) :
|
||||
DefDatabase<ThoughtDef>.GetNamedSilentFail("SawRape_Abhorrent");
|
||||
}
|
||||
|
||||
else if (BasicSettings.worryAboutXeno && sexIsXeno)
|
||||
{
|
||||
thoughtDef = isXenophobe ? DefDatabase<ThoughtDef>.GetNamedSilentFail("SawHAR_AlienDating_Prohibited") :
|
||||
isXenophile ? DefDatabase<ThoughtDef>.GetNamedSilentFail("SawHAR_AlienDating_Honorable") :
|
||||
pawn.HasPreceptForIssue("HAR_AlienDating", out precept) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("Saw" + precept.def.defName) :
|
||||
DefDatabase<ThoughtDef>.GetNamedSilentFail("SawHAR_AlienDating_Acceptable");
|
||||
}
|
||||
|
||||
else if (BasicSettings.worryAboutMasturbation && sexIsSolo)
|
||||
{
|
||||
thoughtDef = pawn.HasPreceptForIssue("Masturbation", out precept) ? DefDatabase<ThoughtDef>.GetNamedSilentFail("Saw" + precept.def.defName) :
|
||||
DefDatabase<ThoughtDef>.GetNamedSilentFail("SawMasturbation_Disapproved");
|
||||
}
|
||||
|
||||
else if (BasicSettings.worryAboutIncest && sexIsIncest)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DebugMode.Message("Sex job is: " + jobDriver + " Issue is: " + (precept?.def?.issue?.defName).ToStringSafe() + " Opinion is: " + (precept?.def?.defName).ToStringSafe() + " Thought is: " + (thoughtDef?.defName).ToStringSafe());
|
||||
|
||||
return thoughtDef;
|
||||
}
|
||||
|
||||
public static bool InvitePasserbyForSex(Pawn pawn, Pawn witness, out bool brokeTaboo)
|
||||
{
|
||||
brokeTaboo = false;
|
||||
bool witnessJoiningSex = Random.value < BasicSettings.chanceForOtherToJoinInSex && CouldInvitePasserbyForSex(witness, pawn.GetAllSexParticipants());
|
||||
|
||||
// Exit clauses
|
||||
if (witness.UnworriedAboutHumanSex() == true)
|
||||
{ return false; }
|
||||
|
||||
// Get basic thoughts
|
||||
ThoughtDef pawnThoughtDef = BasicSettings.needPrivacy ? ModThoughtDefOf.SeenHavingSex : null;
|
||||
ThoughtDef witnessThoughtDef = BasicSettings.needPrivacy ? ModThoughtDefOf.SawSex : null;
|
||||
|
||||
// Exhibitionist pawn (overrides needPrivacy)
|
||||
if (xxx.has_quirk(pawn, "Exhibitionist") || pawn?.ideo?.Ideo.HasPrecept(ModPreceptDefOf.Exhibitionism_Approved) == true)
|
||||
{ pawnThoughtDef = ModThoughtDefOf.SeenHavingSexExhibitionist; }
|
||||
|
||||
// Voyeuristic witness (overrides needPrivacy)
|
||||
if (xxx.has_quirk(witness, "Voyeur"))
|
||||
{ witnessThoughtDef = ModThoughtDefOf.SawSexVoyeur; }
|
||||
|
||||
// Mediating cirumstances
|
||||
bool sexIsRitual = pawn.GetLord() != null && pawn.GetLord().LordJob is LordJob_Ritual && witness?.Ideo == pawn?.Ideo;
|
||||
bool sexIsParty = pawn.GetLord() != null && pawn.GetLord().LordJob is LordJob_Joinable_Party;
|
||||
bool pawnIsVictim = pawn.CurJob.def == xxx.gettin_raped || pawn.Dead;
|
||||
bool mitigatingCirumstances = sexIsRitual || sexIsParty || pawnIsVictim;
|
||||
bool pawnIsCheating = mitigatingCirumstances == false && PawnIsCheatingOnPartner(pawn, witness);
|
||||
|
||||
// Override thoughts if pawn is a victim
|
||||
if (pawnIsVictim)
|
||||
{
|
||||
pawnThoughtDef = null;
|
||||
witnessThoughtDef = null;
|
||||
}
|
||||
|
||||
// Add thought if pawn is cheating
|
||||
else if (pawnIsCheating)
|
||||
{
|
||||
if (pawn.needs.mood.thoughts.memories.GetFirstMemoryOfDef(ModThoughtDefOf.CaughtCheating) == null)
|
||||
{ pawn.needs.mood.thoughts.memories.TryGainMemory(ModThoughtDefOf.CaughtCheating, witness); }
|
||||
|
||||
if (witness.needs.mood.thoughts.memories.GetFirstMemoryOfDef(ThoughtDefOf.CheatedOnMe) == null)
|
||||
{ witness.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.CheatedOnMe, pawn); }
|
||||
|
||||
witnessJoiningSex = false;
|
||||
}
|
||||
|
||||
// Determine if there are any issues with the sex event and the witness' morals
|
||||
ThoughtDef newWitnessThoughtDef = GetThoughtsAboutSexAct(witness, pawn.jobs.curDriver as JobDriver_Sex, out Precept precept);
|
||||
|
||||
// Update their thoughts if there are no migitating circumstances or the thought provides a positive morale boost larger than the original
|
||||
if (newWitnessThoughtDef != null && (mitigatingCirumstances == false || (newWitnessThoughtDef.stages[0].baseMoodEffect > 0 && newWitnessThoughtDef.stages[0].baseMoodEffect > witnessThoughtDef.stages[0].baseMoodEffect)))
|
||||
{ witnessThoughtDef = newWitnessThoughtDef; }
|
||||
|
||||
// Apply thoughts to witness
|
||||
if (witnessThoughtDef != null)
|
||||
{
|
||||
witness.needs.mood.thoughts.memories.TryGainMemory(witnessThoughtDef, pawn, precept);
|
||||
|
||||
if (witnessThoughtDef.stages[0].baseMoodEffect < 0)
|
||||
{ witness?.TryGetComp<CompPawnThoughtData>()?.TryToExclaim(); }
|
||||
|
||||
witnessJoiningSex = witnessThoughtDef.hediff != null ? false : witnessJoiningSex;
|
||||
brokeTaboo = witnessThoughtDef.hediff != null;
|
||||
|
||||
// Trigger extreme reactions
|
||||
if (witnessThoughtDef?.hediff != null)
|
||||
{ TriggerReactionInWitness(witness, pawn, witnessThoughtDef.hediff.defName); }
|
||||
|
||||
else if (pawnIsCheating)
|
||||
{ TriggerReactionInWitness(witness, pawn, "Indignant"); }
|
||||
}
|
||||
|
||||
// Apply thoughts to pawn
|
||||
if (pawnThoughtDef != null)
|
||||
{
|
||||
pawn.needs.mood.thoughts.memories.TryGainMemory(pawnThoughtDef, witness, null);
|
||||
|
||||
if (pawnThoughtDef.stages[0].baseMoodEffect < 0)
|
||||
{ pawn?.TryGetComp<CompPawnThoughtData>()?.TryToExclaim(); }
|
||||
}
|
||||
|
||||
return witnessJoiningSex;
|
||||
}
|
||||
|
||||
public static void TriggerReactionInWitness(Pawn witness, Pawn otherPawn, string reaction)
|
||||
{
|
||||
if (BasicSettings.majorTabooCanStartFights == false || reaction.NullOrEmpty())
|
||||
{ return; }
|
||||
|
||||
if (witness.MentalState != null ||
|
||||
witness.jobs.curDriver is JobDriver_Flee ||
|
||||
witness.jobs.curDriver is JobDriver_AttackMelee ||
|
||||
witness.jobs.curDriver is JobDriver_Vomit)
|
||||
{ return; }
|
||||
|
||||
// Panicked
|
||||
if (reaction == "Panicked" || (reaction == "Indignant" && Random.value <= 0.5f))
|
||||
{
|
||||
// Fight
|
||||
if (otherPawn.RaceProps.Humanlike && witness.RaceProps.Humanlike && witness.DislikesViolence() == false && (Random.value <= 0.2f || witness.EnjoysViolence()) && witness.HostileTo(otherPawn) == false && InteractionUtility.TryGetRandomVerbForSocialFight(witness, out Verb verbToUse))
|
||||
{ witness.interactions.StartSocialFight(otherPawn, "MessageSocialFight"); }
|
||||
|
||||
// Flight
|
||||
else
|
||||
{
|
||||
Job job = JobMaker.MakeJob(JobDefOf.FleeAndCower, CellFinderLoose.GetFleeDest(witness, new List<Thing>() { otherPawn }, 24f), otherPawn);
|
||||
witness.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false);
|
||||
witness.jobs.StartJob(job);
|
||||
}
|
||||
}
|
||||
|
||||
// Vomit
|
||||
else if (reaction == "Nauseated")
|
||||
{
|
||||
Job jobVomit = JobMaker.MakeJob(JobDefOf.Vomit);
|
||||
Job jobFlee = JobMaker.MakeJob(JobDefOf.FleeAndCower, CellFinderLoose.GetFleeDest(witness, new List<Thing>() { otherPawn }, 24f), otherPawn);
|
||||
|
||||
witness.jobs.EndCurrentJob(JobCondition.InterruptForced, false, false);
|
||||
|
||||
if (Random.value <= 0.2f)
|
||||
{
|
||||
witness.jobs.StartJob(jobVomit);
|
||||
witness.jobs.jobQueue.EnqueueFirst(jobFlee);
|
||||
}
|
||||
|
||||
else
|
||||
{ witness.jobs.StartJob(jobFlee); }
|
||||
}
|
||||
|
||||
// Indignant
|
||||
else if (reaction == "Indignant")
|
||||
{
|
||||
witness.mindState.mentalStateHandler.TryStartMentalState(DefDatabase<MentalStateDef>.GetNamedSilentFail("TargetedInsultingSpree"), null, true, false, null, true, false, false);
|
||||
(witness.mindState.mentalStateHandler.CurState as MentalState_TargetedInsultingSpree).target = otherPawn;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
8263062e6a99f43c12969425daafb3f9676b8c24
|
|
@ -0,0 +1,6 @@
|
|||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.dll
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.pdb
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\AbsCon_PrivacyPlease.csprojAssemblyReference.cache
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\AbsCon_PrivacyPlease.csproj.CoreCompileInputs.cache
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.dll
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.pdb
|
Binary file not shown.
BIN
Source/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Normal file
BIN
Source/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Normal file
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
8263062e6a99f43c12969425daafb3f9676b8c24
|
|
@ -0,0 +1,8 @@
|
|||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.csprojAssemblyReference.cache
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.csproj.CoreCompileInputs.cache
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.3\Assemblies\Privacy-Please.dll
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.3\Assemblies\Privacy-Please.pdb
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.dll
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\Source\obj\Debug\Privacy-Please.pdb
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.dll
|
||||
C:\Program Files (x86)\Steam\SteamApps\common\RimWorld\Mods\privacy-please-abscon\1.4\Assemblies\Privacy-Please.pdb
|
BIN
Source/obj/Debug/Privacy-Please.csprojAssemblyReference.cache
Normal file
BIN
Source/obj/Debug/Privacy-Please.csprojAssemblyReference.cache
Normal file
Binary file not shown.
BIN
Source/obj/Debug/Privacy-Please.dll
Normal file
BIN
Source/obj/Debug/Privacy-Please.dll
Normal file
Binary file not shown.
BIN
Source/obj/Debug/Privacy-Please.pdb
Normal file
BIN
Source/obj/Debug/Privacy-Please.pdb
Normal file
Binary file not shown.
BIN
Source/obj/Debug/Source.csprojAssemblyReference.cache
Normal file
BIN
Source/obj/Debug/Source.csprojAssemblyReference.cache
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue