mirror of
https://gitgud.io/AbstractConcept/privacy-please.git
synced 2024-08-15 00:03:18 +00:00
59 lines
3.3 KiB
Text
59 lines
3.3 KiB
Text
|
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;
|
||
|
|
||
|
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;
|
||
|
|
||
|
|
||
|
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");
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|