code
stringlengths
0
56.1M
repo_name
stringclasses
515 values
path
stringlengths
2
147
language
stringclasses
447 values
license
stringclasses
7 values
size
int64
0
56.8M
using System.Collections.Generic; using RimWorld; using RimWorld.Planet; using Verse; using System.Text; using Verse.AI.Group; using Multiplayer.API; using System.Linq; namespace rjw { internal class Hediff_InsectEgg : HediffWithComps { public int bornTick = 0; public int abortTick = 0; public string parentDef { get { return ((HediffDef_InsectEgg)def).parentDef; } } public List<string> parentDefs { get { return ((HediffDef_InsectEgg)def).parentDefs; } } public Pawn father; //can be parentkind defined in egg public Pawn implanter; //can be any pawn public bool canbefertilized = true; public bool fertilized => father != null; public float eggssize = 0.2f; protected List<Pawn> babies; ///Contractions duration, effectively additional hediff stage, a dirty hack to make birthing process notable //protected const int TicksPerHour = 2500; protected int contractions = 0; public override string LabelBase { get { if (Prefs.DevMode) { if (father != null) return father.kindDef.race.label + " egg"; else if (implanter != null) return implanter.kindDef.race.label + " egg"; } if (Severity <= 0.10f) return "Small egg"; if (Severity <= 0.3f) return "Medium egg"; else if (Severity <= 0.5f) return "Big egg"; else return "Huge egg"; //return this.Label; } } public override string LabelInBrackets { get { if (Prefs.DevMode) { if (fertilized) return "Fertilized"; else return "Unfertilized"; } return null; } } public float GestationProgress { get => Severity; private set => Severity = value; } public override bool TryMergeWith(Hediff other) { return false; } public override void PostAdd(DamageInfo? dinfo) { //--Log.Message("[RJW]Hediff_InsectEgg::PostAdd() - added parentDef:" + parentDef+""); base.PostAdd(dinfo); } public override void Tick() { this.ageTicks++; if (this.pawn.IsHashIntervalTick(1000)) { if (this.ageTicks >= bornTick) { if (PawnUtility.ShouldSendNotificationAbout(this.pawn)) { string key1 = "RJW_GaveBirthEggTitle"; string message_title = TranslatorFormattedStringExtensions.Translate(key1, pawn.LabelIndefinite()); string key2 = "RJW_GaveBirthEggText"; string message_text = TranslatorFormattedStringExtensions.Translate(key2, pawn.LabelIndefinite()); //Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.NeutralEvent, pawn, null); Messages.Message(message_text, pawn, MessageTypeDefOf.SituationResolved); } GiveBirth(); //someday add dmg to vag? //var dam = Rand.RangeInclusive(0, 1); //p.TakeDamage(new DamageInfo(DamageDefOf.Burn, dam, 999, -1.0f, null, rec, null)); } else { //birthing takes an hour if (this.ageTicks >= bornTick - 2500 && contractions == 0) { if (PawnUtility.ShouldSendNotificationAbout(this.pawn)) { string key = "RJW_EggContractions"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()); Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent); } contractions++; pawn.health.AddHediff(HediffDef.Named("Hediff_Submitting")); } } } } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look<int>(ref this.bornTick, "bornTick"); Scribe_Values.Look<int>(ref this.abortTick, "abortTick"); Scribe_References.Look<Pawn>(ref this.father, "father", false); Scribe_References.Look<Pawn>(ref this.implanter, "implanter", false); Scribe_Collections.Look(ref babies, saveDestroyedThings: true, label: "babies", lookMode: LookMode.Deep, ctorArgs: new object[0]); } public override void Notify_PawnDied() { base.Notify_PawnDied(); GiveBirth(); } protected virtual void GenerateBabies() { } //should someday remake into birth eggs and then within few ticks hatch them [SyncMethod] public void GiveBirth() { Pawn mother = pawn; Pawn baby = null; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (fertilized) { //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() - Egg of " + parentDef + " in " + mother.ToString() + " birth!"); PawnKindDef spawn_kind_def = father.kindDef; //egg mostlikely insect or implanter spawned factionless through debug, set to insect Faction spawn_faction = Faction.OfInsects; //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() - insect " + (implanter.Faction == Faction.OfInsects || father.Faction == Faction.OfInsects || mother.Faction == Faction.OfInsects)); //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() - human " + (xxx.is_human(implanter) && xxx.is_human(father))); //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() - animal1 " + (!xxx.is_human(implanter) && !(implanter.Faction?.IsPlayer ?? false))); //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() - animal2 "); //this is probably fucked up, idk how to filter insects from non insects/spiders etc //core Hive Insects... probably if (implanter.Faction == Faction.OfInsects || father.Faction == Faction.OfInsects || mother.Faction == Faction.OfInsects) { //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() - insect "); spawn_faction = Faction.OfInsects; int chance = 5; //random chance to make insect neutral/tamable if (father.Faction == Faction.OfInsects) chance = 5; if (father.Faction != Faction.OfInsects) chance = 10; if (father.Faction == Faction.OfPlayer) chance = 25; if (implanter.Faction == Faction.OfPlayer) chance += 25; if (implanter.Faction == Faction.OfPlayer && xxx.is_human(implanter)) chance += (int)(25 * implanter.GetStatValue(StatDefOf.PsychicSensitivity)); if (Rand.Range(0, 100) <= chance) spawn_faction = null; //chance tame insect on birth if (spawn_faction == null) if (implanter.Faction == Faction.OfPlayer && xxx.is_human(implanter)) if (Rand.Range(0, 100) <= (int)(50 * implanter.GetStatValue(StatDefOf.PsychicSensitivity))) spawn_faction = Faction.OfPlayer; } //humanlikes else if (xxx.is_human(implanter) && xxx.is_human(father)) { spawn_faction = implanter.Faction; } //TODO: humnlike + animal, merge with insect stuff? //else if (xxx.is_human(implanter) && !xxx.is_human(father)) //{ // spawn_faction = implanter.Faction; //} //animal, spawn implanter faction (if not player faction/not tamed) else if (!xxx.is_human(implanter) && !(implanter.Faction?.IsPlayer ?? false)) { spawn_faction = implanter.Faction; } //spawn factionless(tamable, probably) else { spawn_faction = null; } //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() " + spawn_kind_def + " of " + spawn_faction + " in " + (int)(50 * implanter.GetStatValue(StatDefOf.PsychicSensitivity)) + " chance!"); PawnGenerationRequest request = new PawnGenerationRequest(spawn_kind_def, spawn_faction, PawnGenerationContext.NonPlayer, -1, false, true, false, false, false, false, 0, false, true, false, false, false, false, false, null, null, 0, 0); baby = PawnGenerator.GeneratePawn(request); if (PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother)) { Genital_Helper.sexualize_pawn(baby); if (spawn_faction == Faction.OfInsects || (spawn_faction != null && (spawn_faction.def.defName.Contains("insect") || spawn_faction == implanter.Faction))) { //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() GetLord"); //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() " + implanter.GetLord()); //add ai to pawn? //LordManager.lords Lord lord = implanter.GetLord(); if(lord != null) lord.AddPawn(baby); else { //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() lord null"); //LordJob_DefendAndExpandHive lordJob = new LordJob_DefendAndExpandHive(true); //lord = LordMaker.MakeNewLord(baby.Faction, lordJob, baby.Map); //lord.AddPawn(baby); //lord.SetJob(lordJob); } //Log.Message("[RJW]Hediff_InsectEgg::BirthBaby() " + baby.GetLord().DebugString()); } } else { Find.WorldPawns.PassToWorld(baby, PawnDiscardDecideMode.Discard); } // Move the baby in front of the mother, rather than on top if (mother.CurrentBed() != null) { baby.Position = baby.Position + new IntVec3(0, 0, 1).RotatedBy(mother.CurrentBed().Rotation); } /* if (Visible && baby != null) { string key = "MessageGaveBirth"; string text = TranslatorFormattedStringExtensions.Translate(key, mother.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, baby, MessageTypeDefOf.NeutralEvent); } */ mother.records.AddTo(xxx.CountOfBirthEgg, 1); if (mother.records.GetAsInt(xxx.CountOfBirthEgg) > 100) { if (!xxx.has_quirk(mother, "Incubator")) { CompRJW.Comp(mother).quirks.AppendWithComma("Incubator"); } if (!xxx.has_quirk(mother, "Impregnation fetish")) { CompRJW.Comp(mother).quirks.AppendWithComma("Impregnation fetish"); } } } else { string key = "EggDead"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.SituationResolved); } // Post birth if (mother.Spawned) { // Spawn guck if (mother.caller != null) { mother.caller.DoCall(); } if (baby != null) { if (baby.caller != null) { baby.caller.DoCall(); } } FilthMaker.MakeFilth(mother.Position, mother.Map, ThingDefOf.Filth_AmnioticFluid, mother.LabelIndefinite(), 5); int howmuch = xxx.has_quirk(mother, "Incubator") ? Rand.Range(1, 3) * 2 : Rand.Range(1, 3); //DebugThingPlaceHelper.DebugSpawn(ThingDef.Named("InsectJelly"), mother.InteractionCell, howmuch, false); int i = 0; while (i++ < howmuch) GenSpawn.Spawn(ThingDefOf.InsectJelly, mother.InteractionCell, mother.Map); } mother.health.RemoveHediff(this); } //set father/final egg type public void Fertilize(Pawn pawn) { if (!AndroidsCompatibility.IsAndroid(pawn)) if (!fertilized && canbefertilized && ageTicks < abortTick) { if (RJWSettings.DevMode) Log.Message(xxx.get_pawnname(pawn) + " fertilize eggs:" + this.ToString()); father = pawn; ChangeEgg(pawn); } } //set implanter/base egg type public void Implanter(Pawn pawn) { if (implanter == null) { if (RJWSettings.DevMode) Log.Message("Hediff_InsectEgg:: set implanter:" + xxx.get_pawnname(pawn)); implanter = pawn; ChangeEgg(pawn); if (!implanter.health.hediffSet.HasHediff(xxx.sterilized)) { if (((HediffDef_InsectEgg)this.def).selffertilized) Fertilize(implanter); } else canbefertilized = false; } } //Change egg type after implanting/fertilizing public void ChangeEgg(Pawn pawn) { if (pawn != null) { eggssize = pawn.RaceProps.baseBodySize / 5; float gestationPeriod = pawn.RaceProps?.gestationPeriodDays * 60000 ?? 450000; gestationPeriod = (xxx.has_quirk(this.pawn, "Incubator") || this.pawn.health.hediffSet.HasHediff(HediffDef.Named("FertilityEnhancer"))) ? gestationPeriod / 2 : gestationPeriod; bornTick = (int)(gestationPeriod * pawn.RaceProps.baseBodySize + 0.5f); abortTick = (int)(bornTick / 3); Severity = eggssize; } } //for setting implanter/fertilize eggs public bool IsParent(Pawn parent) { //anyone can fertilize if (RJWPregnancySettings.egg_pregnancy_fertilize_anyone) return true; //only set egg parent or implanter can fertilize else return parentDef == parent.kindDef.defName || parentDefs.Contains(parent.kindDef.defName) || implanter.kindDef == parent.kindDef; // unknown eggs } public override string DebugString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.DebugString()); stringBuilder.AppendLine(" Gestation progress: " + ((float)ageTicks / bornTick).ToStringPercent()); if (RJWSettings.DevMode) stringBuilder.AppendLine(" Implanter: " + xxx.get_pawnname(implanter)); if (RJWSettings.DevMode) stringBuilder.AppendLine(" Father: " + xxx.get_pawnname(father)); if (RJWSettings.DevMode) stringBuilder.AppendLine(" bornTick: " + bornTick); //stringBuilder.AppendLine(" potential father: " + parentDef); return stringBuilder.ToString(); } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs
C#
mit
12,725
using RimWorld; using System.Linq; using Verse; using Verse.AI; namespace rjw { internal class Hediff_Orgasm : HediffWithComps { public override void PostAdd(DamageInfo? dinfo) { string key = "FeltOrgasm"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent); } } internal class Hediff_TransportCums : HediffWithComps { public override void PostAdd(DamageInfo? dinfo) { if (pawn.gender == Gender.Female) { string key = "CumsTransported"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent); PawnGenerationRequest req = new PawnGenerationRequest(PawnKindDefOf.Drifter, fixedGender:Gender.Male ); Pawn cumSender = PawnGenerator.GeneratePawn(req); Find.WorldPawns.PassToWorld(cumSender); //Pawn cumSender = (from p in Find.WorldPawns.AllPawnsAlive where p.gender == Gender.Male select p).RandomElement<Pawn>(); //--Log.Message("[RJW]" + this.GetType().ToString() + "PostAdd() - Sending " + xxx.get_pawnname(cumSender) + "'s cum into " + xxx.get_pawnname(pawn) + "'s vagina"); PregnancyHelper.impregnate(pawn, cumSender, xxx.rjwSextype.Vaginal); } pawn.health.RemoveHediff(this); } } internal class Hediff_TransportEggs : HediffWithComps { public override void PostAdd(DamageInfo? dinfo) { if (pawn.gender == Gender.Female) { string key = "EggsTransported"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent); PawnKindDef spawn = PawnKindDefOf.Megascarab; PawnGenerationRequest req1 = new PawnGenerationRequest(spawn, fixedGender:Gender.Female ); PawnGenerationRequest req2 = new PawnGenerationRequest(spawn, fixedGender:Gender.Male ); Pawn implanter = PawnGenerator.GeneratePawn(req1); Pawn fertilizer = PawnGenerator.GeneratePawn(req2); Find.WorldPawns.PassToWorld(implanter); Find.WorldPawns.PassToWorld(fertilizer); Genital_Helper.sexualize_pawn(implanter); Genital_Helper.sexualize_pawn(fertilizer); //Pawn cumSender = (from p in Find.WorldPawns.AllPawnsAlive where p.gender == Gender.Male select p).RandomElement<Pawn>(); //--Log.Message("[RJW]" + this.GetType().ToString() + "PostAdd() - Sending " + xxx.get_pawnname(cumSender) + "'s cum into " + xxx.get_pawnname(pawn) + "'s vagina"); PregnancyHelper.impregnate(pawn, implanter, xxx.rjwSextype.Vaginal); PregnancyHelper.impregnate(pawn, fertilizer, xxx.rjwSextype.Vaginal); } pawn.health.RemoveHediff(this); } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Hediffs/Hediff_MCEvents.cs
C#
mit
2,782
using System.Collections.Generic; using Verse; namespace rjw { internal class Hediff_MechImplants : HediffWithComps { public override bool TryMergeWith(Hediff other) { return false; } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Hediffs/Hediff_MechImplants.cs
C#
mit
203
using System.Collections.Generic; using RimWorld; using Verse; using Verse.AI.Group; using System.Linq; using UnityEngine; namespace rjw { ///<summary> ///This hediff class simulates pregnancy with mechanoids, mother may be human. It is not intended to be reasonable. ///Differences from bestial pregnancy are that ... it is lethal ///TODO: extend with something "friendlier"? than Mech_Scyther.... two Mech_Scyther's? muhahaha ///</summary> class Hediff_MechanoidPregnancy : Hediff_BasePregnancy { public override void PregnancyMessage() { string message_title = "RJW_PregnantTitle".Translate(pawn.LabelIndefinite()); string message_text1 = "RJW_PregnantText".Translate(pawn.LabelIndefinite()); string message_text2 = "RJW_PregnantMechStrange".Translate(); Find.LetterStack.ReceiveLetter(message_title, message_text1 + "\n" + message_text2, LetterDefOf.ThreatBig, pawn); } public void Hack() { is_hacked = true; } public override void Notify_PawnDied() { base.Notify_PawnDied(); GiveBirth(); } //Handles the spawning of pawns public override void GiveBirth() { Pawn mother = pawn; if (mother == null) return; try { //fail if hediff added through debug, since babies not initialized if (babies.Count > 9999) Log.Message("RJW mech pregnancy birthing pawn count: " + babies.Count); } catch { Initialize(mother, father); } foreach (Pawn baby in babies) { Faction spawn_faction = null; if (!is_hacked) spawn_faction = Faction.OfMechanoids; Pawn baby1 = PawnGenerator.GeneratePawn(new PawnGenerationRequest(PawnKindDef.Named("Mech_Scyther"), spawn_faction)); PawnUtility.TrySpawnHatchedOrBornPawn(baby1, mother); if (!is_hacked) { LordJob_MechanoidsDefendShip lordJob = new LordJob_MechanoidsDefendShip(mother, baby1.Faction, 50f, mother.Position); Lord lord = LordMaker.MakeNewLord(baby1.Faction, lordJob, baby1.Map); lord.AddPawn(baby1); } FilthMaker.MakeFilth(baby1.PositionHeld, baby1.MapHeld, mother.RaceProps.BloodDef, mother.LabelIndefinite()); } IEnumerable<BodyPartRecord> source = from x in mother.health.hediffSet.GetNotMissingParts() where x.IsInGroup(BodyPartGroupDefOf.Torso) && !x.IsCorePart //someday include depth filter //so it doesnt cut out external organs (breasts)? //vag is genital part and genital is external //anal is internal //make sep part of vag? //&& x.depth == BodyPartDepth.Inside select x; if (source.Any()) { foreach (BodyPartRecord part in source) { Hediff_MissingPart hediff_MissingPart = (Hediff_MissingPart)HediffMaker.MakeHediff(HediffDefOf.MissingBodyPart, mother, part); hediff_MissingPart.lastInjury = HediffDefOf.Cut; hediff_MissingPart.IsFresh = true; mother.health.AddHediff(hediff_MissingPart); //idk blood doesnt drop //mother.health.DropBloodFilth(); //FilthMaker.MakeFilth(corpse.PositionHeld, corpse.MapHeld, mother.RaceProps.BloodDef, mother.LabelIndefinite()); } } mother.health.RemoveHediff(this); } ///This method should be the only one to create the hediff //Hediffs are made HediffMaker.MakeHediff which returns hediff of class different than the one needed, so we do the cast and then do all the same operations as in parent class //I don't know whether it'd be possible to use standard constructor instead of this retardation public static void Create(Pawn mother, Pawn father) { if (mother == null) return; BodyPartRecord torso = mother.RaceProps.body.AllParts.Find(x => x.def.defName == "Torso"); //Log.Message("RJW beastial "+ mother + " " + father); Hediff_MechanoidPregnancy hediff = (Hediff_MechanoidPregnancy)HediffMaker.MakeHediff(HediffDef.Named("RJW_pregnancy_mech"), mother, torso); hediff.Initialize(mother, father); } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Hediffs/Hediff_MechanoidPregnancy.cs
C#
mit
3,973
using RimWorld; using RimWorld.Planet; using UnityEngine; using Verse; using Multiplayer.API; namespace rjw { internal class Hediff_Parasite : Hediff_Pregnant { [SyncMethod] new public static void DoBirthSpawn(Pawn mother, Pawn father) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); int num = (mother.RaceProps.litterSizeCurve == null) ? 1 : Mathf.RoundToInt(Rand.ByCurve(mother.RaceProps.litterSizeCurve)); if (num < 1) { num = 1; } PawnGenerationRequest request = new PawnGenerationRequest(father.kindDef, father.Faction, PawnGenerationContext.NonPlayer, -1, false, true, false, false, true, false, 1f, false, true, true, false, false, false,false, null, null, null, null); Pawn pawn = null; for (int i = 0; i < num; i++) { pawn = PawnGenerator.GeneratePawn(request); if (PawnUtility.TrySpawnHatchedOrBornPawn(pawn, mother)) { if (pawn.playerSettings != null && mother.playerSettings != null) { pawn.playerSettings.AreaRestriction = father.playerSettings.AreaRestriction; } if (pawn.RaceProps.IsFlesh) { pawn.relations.AddDirectRelation(PawnRelationDefOf.Parent, mother); if (father != null) { pawn.relations.AddDirectRelation(PawnRelationDefOf.Parent, father); } } } else { Find.WorldPawns.PassToWorld(pawn, PawnDiscardDecideMode.Discard); } } if (mother.Spawned) { FilthMaker.MakeFilth(mother.Position, mother.Map, ThingDefOf.Filth_AmnioticFluid, mother.LabelIndefinite(), 5); if (mother.caller != null) { mother.caller.DoCall(); } if (pawn.caller != null) { pawn.caller.DoCall(); } } } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Hediffs/Hediff_ParasitePregnancy.cs
C#
mit
1,720
using System; using System.Collections.Generic; using System.Text; using RimWorld; using Verse; using Multiplayer.API; namespace rjw { public static class AgeStage { public const int Baby = 0; public const int Toddler = 1; public const int Child = 2; public const int Teenager = 3; public const int Adult = 4; } public class Hediff_SimpleBaby : HediffWithComps { // Keeps track of what stage the pawn has grown to private int grown_to = 0; //Properties public int Grown_To { get { return grown_to; } } public override string DebugString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.DebugString()); return stringBuilder.ToString(); } public override void PostMake() { Severity = Math.Max(0, Severity); if (grown_to == 0 && !pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_NoManipulationFlag"))) { pawn.health.AddHediff(HediffDef.Named("RJW_NoManipulationFlag"), null, null); } base.PostMake(); } public override void ExposeData() { //Scribe_Values.LookValue<int> (ref grown_to, "grown_to", 0); Scribe_Values.Look<int>(ref grown_to, "grown_to", 0); base.ExposeData(); } internal void GrowUpTo(int stage) { GrowUpTo(stage, true); } [SyncMethod] internal void GrowUpTo(int stage, bool generated) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); grown_to = stage; // Update the Colonist Bar PortraitsCache.SetDirty(pawn); pawn.Drawer.renderer.graphics.ResolveAllGraphics(); // At the toddler stage. Now we can move and talk. if (stage == 1) { Severity = Math.Max(0.5f, Severity); //pawn.needs.food. } // Re-enable skills that were locked out from toddlers if (stage == 2) { if (!generated) { if (xxx.RimWorldChildrenIsActive) { pawn.story.childhood = BackstoryDatabase.allBackstories["CustomBackstory_Rimchild"]; } // Remove the hidden hediff stopping pawns from manipulating } if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_NoManipulationFlag"))) { pawn.health.hediffSet.hediffs.Remove(pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_NoManipulationFlag"))); } Severity = Math.Max(0.75f, Severity); } // The child has grown to a teenager so we no longer need this effect if (stage == 3) { if (!generated && pawn.story.childhood.title == "Child") { if (xxx.RimWorldChildrenIsActive) { pawn.story.childhood = BackstoryDatabase.allBackstories["CustomBackstory_Rimchild"]; } } // Gain traits from life experiences if (pawn.story.traits.allTraits.Count < 3) { List<Trait> life_traitpool = new List<Trait>(); // Try get cannibalism if (pawn.needs.mood.thoughts.memories.Memories.Find(x => x.def == ThoughtDefOf.AteHumanlikeMeatAsIngredient) != null) { life_traitpool.Add(new Trait(TraitDefOf.Cannibal, 0, false)); } // Try to get bloodlust if (pawn.records.GetValue(RecordDefOf.KillsHumanlikes) > 0 || pawn.records.GetValue(RecordDefOf.AnimalsSlaughtered) >= 2) { life_traitpool.Add(new Trait(TraitDefOf.Bloodlust, 0, false)); } // Try to get shooting accuracy if (pawn.records.GetValue(RecordDefOf.ShotsFired) > 100 && (int)pawn.records.GetValue(RecordDefOf.PawnsDowned) > 0) { life_traitpool.Add(new Trait(TraitDef.Named("ShootingAccuracy"), 1, false)); } else if (pawn.records.GetValue(RecordDefOf.ShotsFired) > 100 && (int)pawn.records.GetValue(RecordDefOf.PawnsDowned) == 0) { life_traitpool.Add(new Trait(TraitDef.Named("ShootingAccuracy"), -1, false)); } // Try to get brawler else if (pawn.records.GetValue(RecordDefOf.ShotsFired) < 15 && pawn.records.GetValue(RecordDefOf.PawnsDowned) > 1) { life_traitpool.Add(new Trait(TraitDefOf.Brawler, 0, false)); } // Try to get necrophiliac if (pawn.records.GetValue(RecordDefOf.CorpsesBuried) > 50) { life_traitpool.Add(new Trait(xxx.necrophiliac, 0, false)); } // Try to get nymphomaniac if (pawn.records.GetValue(RecordDefOf.BodiesStripped) > 50) { life_traitpool.Add(new Trait(xxx.nymphomaniac, 0, false)); } // Try to get rapist if (pawn.records.GetValue(RecordDefOf.TimeAsPrisoner) > 300) { life_traitpool.Add(new Trait(xxx.rapist, 0, false)); } // Try to get Dislikes Men/Women int male_rivals = 0; int female_rivals = 0; foreach (Pawn colinist in Find.AnyPlayerHomeMap.mapPawns.AllPawnsSpawned) { if (pawn.relations.OpinionOf(colinist) <= -20) { if (colinist.gender == Gender.Male) male_rivals++; else female_rivals++; } } // Find which gender we hate if (male_rivals > 3 || female_rivals > 3) { if (male_rivals > female_rivals) life_traitpool.Add(new Trait(TraitDefOf.DislikesMen, 0, false)); else if (female_rivals > male_rivals) life_traitpool.Add(new Trait(TraitDefOf.DislikesWomen, 0, false)); } // Pyromaniac never put out any fires. Seems kinda stupid /*if ((int)pawn.records.GetValue (RecordDefOf.FiresExtinguished) == 0) { life_traitpool.Add (new Trait (TraitDefOf.Pyromaniac, 0, false)); }*/ // Neurotic if (pawn.records.GetValue(RecordDefOf.TimesInMentalState) > 6) { life_traitpool.Add(new Trait(TraitDef.Named("Neurotic"), 2, false)); } else if (pawn.records.GetValue(RecordDefOf.TimesInMentalState) > 3) { life_traitpool.Add(new Trait(TraitDef.Named("Neurotic"), 1, false)); } // People(male or female) can turn gay during puberty //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (Rand.Value <= 0.03f && pawn.story.traits.allTraits.Count <= 3) { pawn.story.traits.GainTrait(new Trait(TraitDefOf.Gay, 0, true)); } // Now let's try to add some life experience traits if (life_traitpool.Count > 0) { int i = 3; while (pawn.story.traits.allTraits.Count < 3 && i > 0) { Trait newtrait = life_traitpool.RandomElement(); if (pawn.story.traits.HasTrait(newtrait.def) == false) pawn.story.traits.GainTrait(newtrait); i--; } } } pawn.health.RemoveHediff(this); } } public void TickRare() { //--Log.Message("[RJW]Hediff_SimpleBaby::TickRare is called"); if (pawn.ageTracker.CurLifeStageIndex > Grown_To) { GrowUpTo(Grown_To + 1, false); } // Update the graphics set if (pawn.ageTracker.CurLifeStageIndex == AgeStage.Toddler) pawn.Drawer.renderer.graphics.ResolveAllGraphics(); if (xxx.RimWorldChildrenIsActive) { //if (Prefs.DevMode) // Log.Message("RJW child tick - CnP active"); //we do not disable our hediff anymore // if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_NoManipulationFlag"))) //{ // pawn.health.hediffSet.hediffs.Remove(pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_NoManipulationFlag"))); // pawn.health.AddHediff(HediffDef.Named("NoManipulationFlag"), null, null); //} //if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_BabyState"))) //{ // pawn.health.hediffSet.hediffs.Remove(pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_BabyState"))); // pawn.health.AddHediff(HediffDef.Named("BabyState"), null, null); // if (Prefs.DevMode) Log.Message("RJW_Babystate self-removing"); // } if (pawn.ageTracker.CurLifeStageIndex <= 1) { //The UnhappBaby feature is not included in RJW, but will // Check if the baby is hungry, and if so, add the whiny baby hediff var hunger = pawn.needs.food; var joy = pawn.needs.joy; if ((joy != null)&&(hunger!=null)) { //There's no way to patch out the CnP adressing nill fields if (hunger.CurLevelPercentage<hunger.PercentageThreshHungry || joy.CurLevelPercentage <0.1) { if (!pawn.health.hediffSet.HasHediff(HediffDef.Named("UnhappyBaby"))){ //--Log.Message("Adding unhappy baby hediff"); pawn.health.AddHediff(HediffDef.Named("UnhappyBaby"), null, null); } } } } } } public override void PostTick() { /* if (xxx.RimWorldChildrenIsActive) { if (pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_BabyState"))!=null) { pawn.health.RemoveHediff(this); } return; } */ //This void call every frame. should not logmes no reason //--Log.Message("[RJW]Hediff_SimpleBaby::PostTick is called"); base.PostTick(); if (pawn.Spawned) { if (pawn.IsHashIntervalTick(120)) { TickRare(); } } } public override bool Visible { get { return false; } } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Hediffs/Hediff_SimpleBaby.cs
C#
mit
8,902
using RimWorld; using Verse; using System; using System.Linq; using System.Collections.Generic; using Multiplayer.API; ///RimWorldChildren pregnancy: //using RimWorldChildren; namespace rjw { /// <summary> /// This handles pregnancy chosing between different types of pregnancy awailable to it /// 1a:RimWorldChildren pregnancy for humanlikes /// 1b:RJW pregnancy for humanlikes /// 2:RJW pregnancy for bestiality /// 3:RJW pregnancy for insects /// 4:RJW pregnancy for mechanoids /// </summary> public static class PregnancyHelper { //called by aftersex (including rape, breed, etc) //called by mcevent private static readonly HashSet<string> Pregnancy_filter = new HashSet<string>(DefDatabase<StringListDef>.GetNamed("Pregnancy_filter").strings); public static readonly HashSet<String> EggRace_filter = new HashSet<string>(DefDatabase<StringListDef>.GetNamed("EggRace_filter").strings); //pawn - "father"; partner = mother public static void impregnate(Pawn pawn, Pawn partner, xxx.rjwSextype sextype = xxx.rjwSextype.None) { if (RJWSettings.DevMode) Log.Message("Rimjobworld::impregnate(" + sextype + "):: " + xxx.get_pawnname(pawn) + " + " + xxx.get_pawnname(partner) + ":"); //"mech" pregnancy if (sextype == xxx.rjwSextype.MechImplant) { if (RJWPregnancySettings.mechanoid_pregnancy_enabled) { if (RJWSettings.DevMode) Log.Message(" mechanoid pregnancy"); //new pregnancy Hediff_MechanoidPregnancy.Create(partner, pawn); Hediff_MechanoidPregnancy hediff = (Hediff_MechanoidPregnancy)partner.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_mech")); if (RJWSettings.DevMode) Log.Message("[RJW] removing other pregnancies"); if (partner.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy"))) partner.health.RemoveHediff(partner.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy"))); if (partner.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_beast"))) partner.health.RemoveHediff(partner.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_beast"))); if (partner.health.hediffSet.HasHediff(HediffDef.Named("Pregnant"))) partner.health.RemoveHediff(partner.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Pregnant"))); return; // Not an actual pregnancy. This implants mechanoid tech into the target. //may lead to pregnancy //old "chip pregnancies", maybe integrate them somehow? //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); HediffDef_MechImplants egg = (from x in DefDatabase<HediffDef_MechImplants>.AllDefs select x).RandomElement(); if (egg != null) { if (RJWSettings.DevMode) Log.Message(" planting MechImplants:" + egg.ToString()); PlantSomething(egg, partner, !Genital_Helper.has_vagina(partner), 1); return; } else { if (RJWSettings.DevMode) Log.Message(" no mech implant found"); } } return; } // Sextype can result in pregnancy. if (!(sextype == xxx.rjwSextype.Vaginal || sextype == xxx.rjwSextype.DoublePenetration)) return; //"insect" pregnancy //straight, female (partner) recives egg insertion from other/sex starter (pawn) if (Genital_Helper.has_vagina(partner) && (Genital_Helper.has_ovipositorF(pawn) || (Genital_Helper.has_ovipositorM(pawn) || (Genital_Helper.has_penis(pawn) && EggRace_filter.Contains(pawn.kindDef.race.defName)))) ) { DoEgg(pawn, partner); return; } //reverse, female (pawn) starts sex/passive bestiality and fills herself with eggs - this is likely fucked up and needs fixing at jobdriver, processsex and aftersex levels else if (Genital_Helper.has_vagina(pawn) && (Genital_Helper.has_ovipositorF(partner) || (Genital_Helper.has_ovipositorM(partner) || (Genital_Helper.has_penis(partner) && EggRace_filter.Contains(partner.kindDef.race.defName)))) ) { DoEgg(partner, pawn); return; } //"normal" and "beastial" pregnancy if (RJWSettings.DevMode) Log.Message(" 'normal' pregnancy checks"); //futa-futa docking? //if (CanImpregnate(partner, pawn, sextype) && CanImpregnate(pawn, partner, sextype)) //{ //Log.Message("[RJW] futa-futa docking..."); //return; //Doimpregnate(pawn, partner); //Doimpregnate(partner, pawn); //} //normal, when female is passive/recives interaction if (Genital_Helper.has_penis(pawn) && Genital_Helper.has_vagina(partner) && CanImpregnate(pawn, partner, sextype)) { if (RJWSettings.DevMode) Log.Message(" impregnate forward"); Doimpregnate(pawn, partner); } //reverse, when female active/starts interaction else if (Genital_Helper.has_vagina(pawn) && Genital_Helper.has_penis(partner) && CanImpregnate(partner, pawn, sextype)) { if (RJWSettings.DevMode) Log.Message(" impregnate reverse"); Doimpregnate(partner, pawn); } } ///<summary>Can get preg with above conditions, do impregnation.</summary> [SyncMethod] public static void DoEgg(Pawn pawn, Pawn partner) { if (RJWPregnancySettings.insect_pregnancy_enabled) { if (RJWSettings.DevMode) Log.Message(" insect pregnancy"); //female "insect" plant eggs //futa "insect" 50% plant eggs if ((Genital_Helper.has_ovipositorF(pawn) && !Genital_Helper.has_ovipositorM(pawn)) || (Genital_Helper.has_ovipositorF(pawn) && Genital_Helper.has_ovipositorM(pawn) && Rand.Value > 0.5f)) { float maxeggssize = partner.BodySize * (xxx.has_quirk(partner, "Incubator") ? 2f : 1f) * (Genital_Helper.has_ovipositorF(partner) ? 2f : 0.5f); float eggedsize = 0; foreach (Hediff_InsectEgg egg in partner.health.hediffSet.GetHediffs<Hediff_InsectEgg>()) { if (egg.father != null) eggedsize += egg.father.RaceProps.baseBodySize / 5; else eggedsize += egg.implanter.RaceProps.baseBodySize / 5; } if (RJWSettings.DevMode) Log.Message(" determine " + xxx.get_pawnname(partner) + " size of eggs inside: " + eggedsize + ", max: " + maxeggssize); if (eggedsize < maxeggssize) { HediffDef_InsectEgg egg = null; string defname = ""; float eggssize = pawn.RaceProps.baseBodySize / 5; while (egg == null) { if (defname == "") { if (RJWSettings.DevMode) Log.Message(" trying to find " + pawn.kindDef.defName + " egg"); defname = pawn.kindDef.defName; } else { if (RJWSettings.DevMode) Log.Message(" no " + defname + " egg found, defaulting to Unknown egg"); defname = "Unknown"; } //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (egg == null) egg = (from x in DefDatabase<HediffDef_InsectEgg>.AllDefs where x.IsParent(defname) select x).RandomElement(); } if (RJWSettings.DevMode) Log.Message("I choose you " + egg + "!"); int count; float maxeggs = 100; float mineggs = 0; if (egg.eggsize != 0) { maxeggs = ((maxeggssize - eggedsize) / eggssize); if (RJWSettings.DevMode) Log.Message(" max eggs: " + maxeggs); } if (maxeggs >= 1) mineggs = 1; count = Rand.Range((int)mineggs, (int)(maxeggs)); if (RJWSettings.DevMode) Log.Message(" planting eggs: " + egg.ToString() + " (" + count + ")"); PlantSomething(egg, partner, false, count); //set implanter foreach (var egg1 in partner.health.hediffSet.GetHediffs<Hediff_InsectEgg>()) egg1.Implanter(pawn); //TODO: add widget toggle for bind all/neutral/hostile pawns if (!pawn.IsColonist) if (!partner.health.hediffSet.HasHediff(HediffDef.Named("RJW_Cocoon")) && pawn.Faction != partner.Faction) //if (!partner.health.hediffSet.HasHediff(HediffDef.Named("RJW_Cocoon")) && pawn.Faction != partner.Faction && pawn.HostileTo(partner)) partner.health.AddHediff(HediffDef.Named("RJW_Cocoon")); } } //male "insect" fertilize eggs else if (!pawn.health.hediffSet.HasHediff(xxx.sterilized)) { foreach (var egg in (from x in partner.health.hediffSet.GetHediffs<Hediff_InsectEgg>() where x.IsParent(pawn) select x)) egg.Fertilize(pawn); } return; } } [SyncMethod] public static void Doimpregnate(Pawn pawn, Pawn partner) { if (RJWSettings.DevMode) Log.Message("[RJW] Doimpregnate " + xxx.get_pawnname(pawn) + " is a father, " + xxx.get_pawnname(partner) + " is a mother"); if (AndroidsCompatibility.IsAndroid(pawn) && !AndroidsCompatibility.AndroidPenisFertility(pawn)) { if (RJWSettings.DevMode) Log.Message(" Father is android with no arcotech penis, abort"); return; } if (AndroidsCompatibility.IsAndroid(partner) && !AndroidsCompatibility.AndroidVaginaFertility(partner)) { if (RJWSettings.DevMode) Log.Message(" Mother is android with no arcotech vagina, abort"); return; } // fertility check float fertility = RJWPregnancySettings.humanlike_impregnation_chance / 100f; if (xxx.is_animal(partner)) fertility = RJWPregnancySettings.animal_impregnation_chance / 100f; // Interspecies modifier if (pawn.def.defName != partner.def.defName) { if (RJWPregnancySettings.complex_interspecies) fertility *= SexUtility.BodySimilarity(pawn, partner); else fertility *= RJWPregnancySettings.interspecies_impregnation_modifier; } //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); float ReproductionFactor = Math.Min(pawn.health.capacities.GetLevel(xxx.reproduction), partner.health.capacities.GetLevel(xxx.reproduction)); float pregnancy_threshold = fertility * ReproductionFactor; float non_pregnancy_chance = Rand.Value; BodyPartRecord torso = partner.RaceProps.body.AllParts.Find(x => x.def == BodyPartDefOf.Torso); if (non_pregnancy_chance > pregnancy_threshold || pregnancy_threshold == 0) { if (RJWSettings.DevMode) Log.Message(" Impregnation failed. Chance: " + pregnancy_threshold.ToStringPercent() + " roll: " + non_pregnancy_chance.ToStringPercent()); return; } if (RJWSettings.DevMode) Log.Message(" Impregnation succeeded. Chance: " + pregnancy_threshold.ToStringPercent() + " roll: " + non_pregnancy_chance.ToStringPercent()); PregnancyDecider(partner, pawn); } ///<summary>For checking normal pregnancy, should not for egg implantion or such.</summary> public static bool CanImpregnate(Pawn fucker, Pawn fucked, xxx.rjwSextype sextype = xxx.rjwSextype.Vaginal) { if (fucker == null || fucked == null) return false; if (RJWSettings.DevMode) Log.Message("Rimjobworld::CanImpregnate checks (" + sextype + "):: " + xxx.get_pawnname(fucker) + " + " + xxx.get_pawnname(fucked) + ":"); if (sextype == xxx.rjwSextype.MechImplant && !RJWPregnancySettings.mechanoid_pregnancy_enabled) { if (RJWSettings.DevMode) Log.Message(" mechanoid 'pregnancy' disabled"); return false; } if (!(sextype == xxx.rjwSextype.Vaginal || sextype == xxx.rjwSextype.DoublePenetration)) { if (RJWSettings.DevMode) Log.Message(" sextype cannot result in pregnancy"); return false; } if (AndroidsCompatibility.IsAndroid(fucker) && AndroidsCompatibility.IsAndroid(fucked)) { if (RJWSettings.DevMode) Log.Message(xxx.get_pawnname(fucked) + " androids cant breed/reproduce androids"); return false; } if (PregnancyHelper.Pregnancy_filter.Contains(fucker.kindDef.defName)) { if (RJWSettings.DevMode) Log.Message(xxx.get_pawnname(fucked) + " filtered race that cant be pregnant"); return false; } if (PregnancyHelper.Pregnancy_filter.Contains(fucked.kindDef.defName)) { if (RJWSettings.DevMode) Log.Message(xxx.get_pawnname(fucker) + " filtered race that cant impregnate"); return false; } if (fucked.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy")) || fucked.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_beast")) || fucked.health.hediffSet.HasHediff(HediffDef.Named("Pregnant"))) { if (RJWSettings.DevMode) Log.Message(" already pregnant."); return false; } if ((from x in fucked.health.hediffSet.GetHediffs<Hediff_InsectEgg>() where x.def == DefDatabase<HediffDef_InsectEgg>.GetNamed(x.def.defName) select x).Any()) { if (RJWSettings.DevMode) Log.Message(xxx.get_pawnname(fucked) + " cant get pregnant while eggs inside"); return false; } if (!(Genital_Helper.has_penis(fucker) && Genital_Helper.has_vagina(fucked)) && !(Genital_Helper.has_penis(fucked) && Genital_Helper.has_vagina(fucker))) { if (RJWSettings.DevMode) Log.Message(" missing genitals for impregnation"); return false; } if (fucker.health.capacities.GetLevel(xxx.reproduction) <= 0 || fucked.health.capacities.GetLevel(xxx.reproduction) <= 0) { if (RJWSettings.DevMode) Log.Message(" one (or both) pawn(s) infertile"); return false; } if (xxx.is_human(fucked) && xxx.is_human(fucker) && (RJWPregnancySettings.humanlike_impregnation_chance == 0 || !RJWPregnancySettings.humanlike_pregnancy_enabled)) { if (RJWSettings.DevMode) Log.Message(" human pregnancy chance set to 0% or pregnancy disabled."); return false; } else if (((xxx.is_animal(fucker) && xxx.is_human(fucked)) || (xxx.is_human(fucker) && xxx.is_animal(fucked))) && !RJWPregnancySettings.bestial_pregnancy_enabled) { if (RJWSettings.DevMode) Log.Message(" bestiality pregnancy chance set to 0% or pregnancy disabled."); return false; } else if (xxx.is_animal(fucked) && xxx.is_animal(fucker) && (RJWPregnancySettings.animal_impregnation_chance == 0 || !RJWPregnancySettings.animal_pregnancy_enabled)) { if (RJWSettings.DevMode) Log.Message(" animal-animal pregnancy chance set to 0% or pregnancy disabled."); return false; } else if (fucker.def.defName != fucked.def.defName && (RJWPregnancySettings.interspecies_impregnation_modifier <= 0.0f && !RJWPregnancySettings.complex_interspecies)) { if (RJWSettings.DevMode) Log.Message(" interspecies pregnancy disabled."); return false; } return true; } //Plant babies for human/bestiality pregnancy public static void PregnancyDecider(Pawn mother, Pawn father) { //human-human if (RJWPregnancySettings.humanlike_pregnancy_enabled && xxx.is_human(mother) && xxx.is_human(father)) { Hediff_HumanlikePregnancy.Create(mother, father); } //human-animal //maybe make separate option for human males vs female animals??? else if (RJWPregnancySettings.bestial_pregnancy_enabled && ((xxx.is_human(mother) && xxx.is_animal(father)) || (xxx.is_animal(mother) && xxx.is_human(father)))) { Hediff_BestialPregnancy.Create(mother, father); } //animal-animal else if (xxx.is_animal(mother) && xxx.is_animal(father)) { CompEggLayer compEggLayer = mother.TryGetComp<CompEggLayer>(); // fertilize eggs of same species if (compEggLayer != null) { if (mother.kindDef == father.kindDef) compEggLayer.Fertilize(father); } else if (RJWPregnancySettings.animal_pregnancy_enabled) { Hediff_BestialPregnancy.Create(mother, father); } } } //Plant Insect eggs/mech chips/other preg mod hediff? public static bool PlantSomething(HediffDef def, Pawn target, bool isToAnal = false, int amount = 1) { if (def == null) return false; if (!isToAnal && !Genital_Helper.has_vagina(target)) return false; if (isToAnal && !Genital_Helper.has_anus(target)) return false; BodyPartRecord Part = (isToAnal) ? Genital_Helper.get_anus(target) : Genital_Helper.get_genitals(target); if (Part != null || Part.parts.Count != 0) { for (int i = 0; i < amount; i++) { if (RJWSettings.DevMode) Log.Message("[RJW] planting something weird"); target.health.AddHediff(def, Part); } //killoff normal preg if (!isToAnal) { if (RJWSettings.DevMode) Log.Message("[RJW] removing other pregnancies"); if (target.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy"))) target.health.RemoveHediff(target.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy"))); if (target.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_beast"))) target.health.RemoveHediff(target.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_beast"))); if (target.health.hediffSet.HasHediff(HediffDef.Named("Pregnant"))) target.health.RemoveHediff(target.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Pregnant"))); } return true; } return false; } /// <summary> /// Remove CnP Pregnancy, that is added without passing rjw checks /// </summary> public static void cleanup_CnP(Pawn pawn) { //They do subpar probability checks and disrespect our settings, but I fail to just prevent their doloving override. //probably needs harmonypatch //So I remove the hediff if it is created and recreate it if needed in our handler later if (Prefs.DevMode) Log.Message("[RJW] cleanup_CnP after love check"); var h = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("HumanPregnancy")); if (h != null && h.ageTicks < 10) { pawn.health.RemoveHediff(h); if (Prefs.DevMode) Log.Message("[RJW] removed hediff from " + xxx.get_pawnname(pawn)); } } /// <summary> /// Remove Vanilla Pregnancy /// </summary> public static void cleanup_vanilla(Pawn pawn) { if (Prefs.DevMode) Log.Message("[RJW] cleanup_vanilla after love check"); var h = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Pregnant")); if (h != null && h.ageTicks < 10) { pawn.health.RemoveHediff(h); if (Prefs.DevMode) Log.Message("[RJW] removed hediff from " + xxx.get_pawnname(pawn)); } } /// <summary> /// Below is stuff for RimWorldChildren /// its not used, we rely only on our own pregnancies /// </summary> /// <summary> /// This function tries to call Children and pregnancy utilities to see if that mod could handle the pregnancy /// </summary> /// <returns>true if cnp pregnancy will work, false if rjw one should be used instead</returns> public static bool CnP_WillAccept(Pawn mother) { if (!xxx.RimWorldChildrenIsActive) return false; return RimWorldChildren.ChildrenUtility.RaceUsesChildren(mother); } /// <summary> /// This funtcion tries to call Children and Pregnancy to create humanlike pregnancy implemented by the said mod. /// </summary> public static void CnP_DoPreg(Pawn mother, Pawn father) { if (!xxx.RimWorldChildrenIsActive) return; RimWorldChildren.Hediff_HumanPregnancy.Create(mother, father); } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Pregnancy_Helper.cs
C#
mit
18,826
using RimWorld; using System; using Verse; using System.Collections.Generic; namespace rjw { public class Recipe_Abortion : Recipe_RemoveHediff { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { BodyPartRecord part = pawn.RaceProps.body.corePart; if (recipe.appliedOnFixedBodyParts[0] != null) part = pawn.RaceProps.body.AllParts.Find(x => x.def == recipe.appliedOnFixedBodyParts[0]); if (part != null) { if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy"), true) && recipe.removesHediff == HediffDef.Named("RJW_pregnancy")) { Hediff_HumanlikePregnancy pregnancy = (Hediff_HumanlikePregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy")); if (pregnancy.is_checked) yield return part; } else if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_beast"), true) && recipe.removesHediff == HediffDef.Named("RJW_pregnancy_beast")) { Hediff_BestialPregnancy pregnancy = (Hediff_BestialPregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_beast")); if (pregnancy.is_checked) yield return part; } else if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_mech"), true) && recipe.removesHediff == HediffDef.Named("RJW_pregnancy_mech")) { Hediff_MechanoidPregnancy pregnancy = (Hediff_MechanoidPregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_mech")); if (pregnancy.is_checked) yield return part; } } } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Recipes/Recipe_Abortion.cs
C#
mit
1,602
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_ClaimChild : RecipeWorker { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { if (pawn != null)//I have no idea how it works but Recipe_ShutDown : RecipeWorker does not return values when not applicable { //Log.Message("RJW Claim child check on " + pawn); if (xxx.is_human(pawn) && !pawn.IsColonist) { if ( (pawn.ageTracker.CurLifeStageIndex < 2))//Guess it is hardcoded for now to `baby` and `toddler` of standard 4 stages of human life { BodyPartRecord brain = pawn.health.hediffSet.GetBrain(); if (brain != null) { //Log.Message("RJW Claim child is applicable"); yield return brain; } } } } } public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { if (pawn == null) { Log.Error("Error applying medical recipe, pawn is null"); return; } pawn.SetFaction(Faction.OfPlayer); //we could do //pawn.SetFaction(billDoer.Faction); //but that is useless because GetPartsToApplyOn does not support factions anyway and all recipes are hardcoded to player. } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Recipes/Recipe_ClaimChild.cs
C#
mit
1,286
using RimWorld; using System; using Verse; using System.Collections.Generic; namespace rjw { public class Recipe_DeterminePregnancy : RecipeWorker { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { /* Males can be impregnated by mechanoids, probably if (!xxx.is_female(pawn)) { yield break; } */ BodyPartRecord part = pawn.RaceProps.body.corePart; if (recipe.appliedOnFixedBodyParts[0] != null) part = pawn.RaceProps.body.AllParts.Find(x => x.def == recipe.appliedOnFixedBodyParts[0]); if (part != null && (pawn.ageTracker.CurLifeStage.reproductive) || pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy"), true) || pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_beast"), true) || pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_mech"), true) ) { yield return part; } } public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy"))) { Hediff_HumanlikePregnancy pregnancy = (Hediff_HumanlikePregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy")); pregnancy.CheckPregnancy(); } else if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_beast"))) { Hediff_BestialPregnancy pregnancy = (Hediff_BestialPregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_beast")); pregnancy.CheckPregnancy(); } else if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_mech"))) { Hediff_MechanoidPregnancy pregnancy = (Hediff_MechanoidPregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_mech")); pregnancy.CheckPregnancy(); } else { Messages.Message(xxx.get_pawnname(billDoer) + " has determined " + xxx.get_pawnname(pawn) + " is not pregnant.", MessageTypeDefOf.NeutralEvent); } } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Recipes/Recipe_DeterminePregnancy.cs
C#
mit
2,279
using System.Collections.Generic; using Verse; namespace rjw { /// <summary> /// IUD - prevent pregnancy /// </summary> public class Recipe_InstallIUD : Recipe_InstallImplantToExistParts { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { if (!xxx.is_female(pawn)) { return new List<BodyPartRecord>(); } return base.GetPartsToApplyOn(pawn, recipe); } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Recipes/Recipe_InstallIUD.cs
C#
mit
430
using RimWorld; using System; using Verse; using System.Collections.Generic; namespace rjw { public class Recipe_PregnancyHackMech : RecipeWorker { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { BodyPartRecord part = pawn.RaceProps.body.corePart; if (recipe.appliedOnFixedBodyParts[0] != null) part = pawn.RaceProps.body.AllParts.Find(x => x.def == recipe.appliedOnFixedBodyParts[0]); if (part != null && pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_mech"), part, true)) { Hediff_MechanoidPregnancy pregnancy = (Hediff_MechanoidPregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_mech")); //Log.Message("RJW_pregnancy_mech hack check: " + pregnancy.is_checked); if (pregnancy.is_checked) yield return part; } } public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { if (pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_pregnancy_mech"))) { Hediff_MechanoidPregnancy pregnancy = (Hediff_MechanoidPregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("RJW_pregnancy_mech")); pregnancy.Hack(); } } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Recipes/Recipe_PregnancyHackMech.cs
C#
mit
1,366
using RimWorld; using System.Collections.Generic; using System.Linq; using Verse; namespace rjw { /// <summary> /// Sterilization /// </summary> public class Recipe_InstallImplantToExistParts : Recipe_InstallImplant { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { bool blocked = Genital_Helper.genitals_blocked(pawn) || xxx.is_slime(pawn); if (!blocked) foreach (BodyPartRecord record in pawn.RaceProps.body.AllParts.Where(x => recipe.appliedOnFixedBodyParts.Contains(x.def))) { if (!pawn.health.hediffSet.hediffs.Any((Hediff x) => x.def == recipe.addsHediff)) { yield return record; } } } } }
Mewtopian/rjw
Source/Modules/Pregnancy/Recipes/Recipe_Sterilize.cs
C#
mit
697
using RimWorld; using Verse; namespace rjw { public class ThoughtWorker_ItchyCrotch : ThoughtWorker { protected override ThoughtState CurrentStateInternal(Pawn p) { int sev = std.genital_rash_severity(p); if (sev <= 0) return ThoughtState.Inactive; else if (sev == 1) return ThoughtState.ActiveAtStage(0); else return ThoughtState.ActiveAtStage(1); } } }
Mewtopian/rjw
Source/Modules/STD/Thoughts/ThoughtWorker_ItchyCrotch.cs
C#
mit
391
using RimWorld; using Verse; namespace rjw { public class ThoughtWorker_SyphiliticThoughts : ThoughtWorker { protected override ThoughtState CurrentStateInternal(Pawn p) { //Log.Message("0"); var syp = p.health.hediffSet.GetFirstHediffOfDef(std.syphilis.hediff_def); //Log.Message("1"); if (syp != null) { //Log.Message("2"); if (syp.Severity >= 0.80f) { //Log.Message("3"); return ThoughtState.ActiveAtStage(1); } else if (syp.Severity >= 0.50f) { //Log.Message("4"); return ThoughtState.ActiveAtStage(0); } //Log.Message("5"); } //Log.Message("6"); return ThoughtState.Inactive; } } }
Mewtopian/rjw
Source/Modules/STD/Thoughts/ThoughtWorker_SyphiliticThoughts.cs
C#
mit
675
using RimWorld; using Verse; namespace rjw { public class ThoughtWorker_WastingAway : ThoughtWorker { protected override ThoughtState CurrentStateInternal(Pawn p) { if (!std.is_wasting_away(p)) return ThoughtState.Inactive; else return ThoughtState.ActiveAtStage(0); } } }
Mewtopian/rjw
Source/Modules/STD/Thoughts/ThoughtWorker_WastingAway.cs
C#
mit
299
using System.Collections.Generic; using System.Linq; using Verse; namespace rjw { /// <summary> /// Common functions and constants relevant to STDs. /// </summary> public static class std { public static std_def hiv = DefDatabase<std_def>.GetNamed("HIV"); public static std_def herpes = DefDatabase<std_def>.GetNamed("Herpes"); public static std_def warts = DefDatabase<std_def>.GetNamed("Warts"); public static std_def syphilis = DefDatabase<std_def>.GetNamed("Syphilis"); public static std_def boobitis = DefDatabase<std_def>.GetNamed("Boobitis"); public static readonly HediffDef immunodeficiency = DefDatabase<HediffDef>.GetNamed("Immunodeficiency"); public static List<std_def> all => DefDatabase<std_def>.AllDefsListForReading; // Returns how severely affected this pawn's crotch is by rashes and warts, on a scale from 0 to 3. public static int genital_rash_severity(Pawn p) { int tr = 0; Hediff her = p.health.hediffSet.GetFirstHediffOfDef(herpes.hediff_def); if (her != null && her.Severity >= 0.25f) ++tr; Hediff war = p.health.hediffSet.GetFirstHediffOfDef(warts.hediff_def); if (war != null) tr += war.Severity < 0.40f ? 1 : 2; return tr; } public static Hediff get_infection(Pawn p, std_def sd) { return p.health.hediffSet.GetFirstHediffOfDef(sd.hediff_def); } public static BodyPartRecord GetRelevantBodyPartRecord(Pawn pawn, std_def std) { if (std.appliedOnFixedBodyParts == null) { return null; } return pawn?.RaceProps.body.GetPartsWithDef(std.appliedOnFixedBodyParts.Single()).Single(); } public static bool is_wasting_away(Pawn p) { Hediff id = p.health.hediffSet.GetFirstHediffOfDef(immunodeficiency); return id != null && id.CurStageIndex > 0; } public static bool IsImmune(Pawn pawn) { // Archotech genitalia automagically purge STDs. return !RJWSettings.stds_enabled || pawn.health.hediffSet.HasHediff(Genital_Helper.archotech_vagina) || pawn.health.hediffSet.HasHediff(Genital_Helper.archotech_penis) || xxx.is_demon(pawn) || xxx.is_slime(pawn) || xxx.is_mechanoid(pawn); } } }
Mewtopian/rjw
Source/Modules/STD/std.cs
C#
mit
2,143
using System.Collections.Generic; using Verse; namespace rjw { /// <summary> /// Defines a disease that has a chance to spread during sex. /// </summary> public class std_def : Def { public HediffDef hediff_def; public HediffDef cohediff_def = null; public float catch_chance; public float environment_pitch_chance = 0.0f; public float spawn_chance = 0.0f; public float spawn_severity = 0.0f; public float autocure_below_severity = -1.0f; public List<BodyPartDef> appliedOnFixedBodyParts = null; } }
Mewtopian/rjw
Source/Modules/STD/std_def.cs
C#
mit
526
using Multiplayer.API; using RimWorld; using System.Text; using UnityEngine; using Verse; namespace rjw { /// <summary> /// Responsible for spreading STDs (adding STD hediffs). Usually happens during sex. /// </summary> public static class std_spreader { /// <summary> /// Check for spreading of every STD the pitcher has to the catcher. /// Includes a small chance to spread STDs that pitcher doesn't have. /// </summary> [SyncMethod] public static void roll_to_catch(Pawn catcher, Pawn pitcher) { if (std.IsImmune(catcher) || std.IsImmune(pitcher)) { return; } //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); float cleanliness_factor = GetCleanlinessFactor(catcher); foreach (std_def sd in std.all) { if (!catcher.health.hediffSet.HasHediff(sd.hediff_def)) { if (catcher.health.immunity.GetImmunity(sd.hediff_def) <= 0.0f) { var bodyPartRecord = std.GetRelevantBodyPartRecord(catcher, sd); var artificial = bodyPartRecord != null && catcher.health.hediffSet.HasDirectlyAddedPartFor(bodyPartRecord); float catch_chance = GetCatchChance(catcher, sd); float catch_rv = Rand.Value; //if (xxx.config.std_show_roll_to_catch) //--Log.Message(" Chance to catch " + sd.label + ": " + catch_chance.ToStringPercent() + "; rolled: " + catch_rv.ToString()); if (catch_rv < catch_chance) { string pitch_source; float pitch_chance; { if (get_severity(pitcher, sd) >= xxx.config.std_min_severity_to_pitch) { pitch_source = xxx.get_pawnname(pitcher); pitch_chance = 1.0f; } else { pitch_source = "the environment"; pitch_chance = sd.environment_pitch_chance * cleanliness_factor; if (!RJWSettings.std_floor) { pitch_chance = -9001f; } } } float pitch_rv = Rand.Value; //if (xxx.config.std_show_roll_to_catch) //--Log.Message(" Chance to pitch (from " + pitch_source + "): " + pitch_chance.ToStringPercent() + "; rolled: " + pitch_rv.ToString()); if (pitch_rv < pitch_chance) { infect(catcher, sd); show_infection_letter(catcher, sd, pitch_source, catch_chance * pitch_chance); //if (xxx.config.std_show_roll_to_catch) //--Log.Message(" INFECTED!"); } } } //else //if (xxx.config.std_show_roll_to_catch) //--Log.Message(" Still immune to " + sd.label); } //else //if (xxx.config.std_show_roll_to_catch) //--Log.Message(" Already infected with " + sd.label); } } public static float get_severity(Pawn p, std_def sd) { Hediff hed = std.get_infection(p, sd); return hed?.Severity ?? 0.0f; } public static Hediff infect(Pawn p, std_def sd, bool include_coinfection = true) { Hediff existing = std.get_infection(p, sd); if (existing != null) { return existing; } BodyPartRecord part = std.GetRelevantBodyPartRecord(p, sd); p.health.AddHediff(sd.hediff_def, part); if (include_coinfection && sd.cohediff_def != null) { p.health.AddHediff(sd.cohediff_def, part); } //--Log.Message("[RJW]std::infect genitals std"); return std.get_infection(p, sd); } static float GetCatchChance(Pawn pawn, std_def sd) { var bodyPartRecord = std.GetRelevantBodyPartRecord(pawn, sd); float artificialFactor = 1f; if (bodyPartRecord == null && pawn.health.hediffSet.HasDirectlyAddedPartFor(Genital_Helper.get_genitals(pawn))) { artificialFactor = .15f; } else if (pawn.health.hediffSet.HasDirectlyAddedPartFor(bodyPartRecord)) { artificialFactor = 0f; } return sd.catch_chance * artificialFactor; } public static void show_infection_letter(Pawn p, std_def sd, string source = null, float? chance = null) { StringBuilder info; { info = new StringBuilder(); info.Append(xxx.get_pawnname(p) + " has caught " + sd.label + (source != null ? " from " + source + "." : "")); if (chance.HasValue) info.Append(" (" + chance.Value.ToStringPercent() + " chance)"); info.AppendLine(); info.AppendLine(); info.Append(sd.description); } Find.LetterStack.ReceiveLetter("Infection: " + sd.label, info.ToString(), LetterDefOf.ThreatSmall, p); } static float GetCleanlinessFactor(Pawn catcher) { Room room = catcher.GetRoom(); float cle = room?.GetStat(RoomStatDefOf.Cleanliness) ?? xxx.config.std_outdoor_cleanliness; float exa = cle >= 0.0f ? xxx.config.std_env_pitch_cleanliness_exaggeration : xxx.config.std_env_pitch_dirtiness_exaggeration; return Mathf.Max(0.0f, 1.0f - exa * cle); } // Not called anywhere? [SyncMethod] public static void generate_on(Pawn p) { if (p == null) return; //prevent error on world gen for pawns with broken bodies(no genitals) if (p.RaceProps.body.HasPartWithTag(BodyPartTagDefOf.RJW_FertilitySource)) return; if (!xxx.is_human(p)) return; float nymph_mul = !xxx.is_nympho(p) ? 1.0f : xxx.config.nymph_spawn_with_std_mul; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); foreach (std_def sd in std.all) if (Rand.Value < sd.spawn_chance * nymph_mul) { Hediff hed = infect(p, sd, false); float sev; { float r = Rand.Range(sd.hediff_def.minSeverity, sd.hediff_def.maxSeverity); sev = Mathf.Clamp(sd.spawn_severity * r, sd.hediff_def.minSeverity, sd.hediff_def.maxSeverity); } hed.Severity = sev; } } } }
Mewtopian/rjw
Source/Modules/STD/std_spreader.cs
C#
mit
5,573
using Multiplayer.API; using RimWorld; using Verse; namespace rjw { /// <summary> /// Responsible for handling the periodic effects of having an STD hediff. /// Not technically tied to the infection vector itself, /// but some of the STD effects are weird and complicated. /// </summary> public static class std_updater { public const float UpdatesPerDay = 60000f / 150f / (float)Need_Sex.needsex_tick_timer; public static void update(Pawn p) { update_immunodeficiency(p); // Check if any infections are below the autocure threshold and cure them if so foreach (std_def sd in std.all) { Hediff inf = std.get_infection(p, sd); if (inf != null && (inf.Severity < sd.autocure_below_severity || std.IsImmune(p))) { p.health.RemoveHediff(inf); if (sd.cohediff_def != null) { Hediff coinf = p.health.hediffSet.GetFirstHediffOfDef(sd.cohediff_def); if (coinf != null) p.health.RemoveHediff(coinf); } } } UpdateBoobitis(p); roll_for_syphilis_damage(p); } [SyncMethod] public static void roll_for_syphilis_damage(Pawn p) { Hediff syp = p.health.hediffSet.GetFirstHediffOfDef(std.syphilis.hediff_def); if (syp == null || !(syp.Severity >= 0.60f) || syp.FullyImmune()) return; // A 30% chance per day of getting any permanent damage works out to ~891 in 1 million for each roll // The equation is (1-x)^(60000/150)=.7 // Important Note: // this function is called from Need_Sex::NeedInterval(), where it involves a needsex_tick and a std_tick to actually trigger this roll_for_syphilis_damage. // j(this is not exactly the same as the value in Need_Sex, that value is 0, but here j should be 1) std_ticks per this function called, k needsex_ticks per std_tick, 150 ticks per needsex_tick, and x is the chance per 150 ticks, // The new equation should be .7 = (1-x)^(400/kj) // 1-x = .7^(kj/400), x =1-.7^(kj/400) // Since k=10,j=1, so kj=10, new x is 1-.7^(10/400)=0.0088772362, let it be 888/100000 //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (Rand.RangeInclusive(1, 100000) <= 888) { BodyPartRecord part; float sev; var parts = p.RaceProps.body.AllParts; float rv = Rand.Value; if (rv < 0.10f) { part = parts.Find(bpr => string.Equals(bpr.def.defName, "Brain")); sev = 1.0f; } else if (rv < 0.50f) { part = parts.Find(bpr => string.Equals(bpr.def.defName, "Liver")); sev = Rand.RangeInclusive(1, 3); } else if (rv < 0.75f) { //LeftKidney, probably part = parts.Find(bpr => string.Equals(bpr.def.defName, "Kidney")); sev = Rand.RangeInclusive(1, 2); } else { //RightKidney, probably part = parts.FindLast(bpr => string.Equals(bpr.def.defName, "Kidney")); sev = Rand.RangeInclusive(1, 2); } if (part != null && !p.health.hediffSet.PartIsMissing(part) && !p.health.hediffSet.HasDirectlyAddedPartFor(part)) { DamageDef vir_dam = DefDatabase<DamageDef>.GetNamed("ViralDamage"); HediffDef dam_def = HealthUtility.GetHediffDefFromDamage(vir_dam, p, part); Hediff_Injury inj = (Hediff_Injury)HediffMaker.MakeHediff(dam_def, p, null); inj.Severity = sev; inj.TryGetComp<HediffComp_GetsPermanent>().IsPermanent = true; p.health.AddHediff(inj, part, null); string message_title = std.syphilis.label + " Damage"; string baby_pronoun = p.gender == Gender.Male ? "his" : "her"; string message_text = "RJW_Syphilis_Damage_Message".Translate(xxx.get_pawnname(p), baby_pronoun, part.def.label, std.syphilis.label); Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.ThreatSmall, p); } } } [SyncMethod] public static void update_immunodeficiency(Pawn p) { float min_bf_for_id = 1.0f - std.immunodeficiency.minSeverity; Hediff id = p.health.hediffSet.GetFirstHediffOfDef(std.immunodeficiency); float bf = p.health.capacities.GetLevel(PawnCapacityDefOf.BloodFiltration); bool has = id != null; bool should_have = bf <= min_bf_for_id; if (has && !should_have) { p.health.RemoveHediff(id); id = null; } else if (!has && should_have) { p.health.AddHediff(std.immunodeficiency); id = p.health.hediffSet.GetFirstHediffOfDef(std.immunodeficiency); } if (id == null) return; id.Severity = 1.0f - bf; // Roll for and apply opportunistic infections: // Pawns will have a 90% chance for at least one infection each year at 0% filtration, and a 0% // chance at 40% filtration, scaling linearly. // Let x = chance infected per roll // Then chance not infected per roll = 1 - x // And chance not infected on any roll in one day = (1 - x) ^ (60000 / 150) = (1 - x) ^ 400 // And chance not infected on any roll in one year = (1 - x) ^ (400 * 60) = (1 - x) ^ 24000 // So 0.10 = (1 - x) ^ 24000 // log (0.10) = 24000 log (1 - x) // x = 0.00009593644334648975435114691213 = ~96 in 1 million // Important Note: // this function is called from Need_Sex::NeedInterval(), where it involves a needsex_tick and a std_tick to actually trigger this update_immunodeficiency. // j(this is not exactly the same as the value in Need_Sex, that value is 0, but here j should be 1) std_ticks per this function called, k needsex_ticks per std_tick, 150 ticks per needsex_tick, and x is the chance per 150 ticks, // The new equation should be .1 = (1-x)^(24000/kj) // log(.1) = (24000/kj) log(1-x), so log(1-x)= (kj/24000) log(.1), 1-x = .1^(kj/24000), x= 1-.1^(kj/24000) // Since k=10,j=1, so kj=10, new x is 1-.1^(10/24000)=0.0009589504, let it be 959/1000000 //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (Rand.RangeInclusive(1, 1000000) <= 959 && Rand.Value < bf / min_bf_for_id) { BodyPartRecord part; { float rv = Rand.Value; var parts = p.RaceProps.body.AllParts; if (rv < 0.25f) part = parts.Find(bpr => string.Equals(bpr.def.defName, "Jaw")); else if (rv < 0.50f) part = parts.Find(bpr => string.Equals(bpr.def.defName, "Lung")); else if (rv < 0.75f) part = parts.FindLast(bpr => string.Equals(bpr.def.defName, "Lung")); else part = parts.RandomElement(); } if (part != null && !p.health.hediffSet.PartIsMissing(part) && !p.health.hediffSet.HasDirectlyAddedPartFor(part) && p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.WoundInfection) == null && // If the pawn already has a wound infection, we can't properly set the immunity for the new one p.health.immunity.GetImmunity(HediffDefOf.WoundInfection) <= 0.0f) { // Dont spawn infection if pawn already has immunity p.health.AddHediff(HediffDefOf.WoundInfection, part); p.health.HealthTick(); // Creates the immunity record ImmunityRecord ir = p.health.immunity.GetImmunityRecord(HediffDefOf.WoundInfection); if (ir != null) ir.immunity = xxx.config.opp_inf_initial_immunity; const string message_title = "Opportunistic Infection"; string message_text = "RJW_Opportunistic_Infection_Message".Translate(xxx.get_pawnname(p)); Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.ThreatSmall); } } } /// <summary> /// For meanDays = 1.0, will return true on average once per day. For 2.0, will return true on average once every two days. /// </summary> [SyncMethod] static bool RollFor(float meanDays) { return Rand.Chance(1.0f / meanDays / UpdatesPerDay); } public static void UpdateBoobitis(Pawn pawn) { var hediff = std.get_infection(pawn, std.boobitis); if (hediff == null || !(hediff.Severity >= 0.20f) || hediff.FullyImmune() || !BreastSize_Helper.TryGetBreastSize(pawn, out var oldSize, out var oldBoobs) || oldSize >= BreastSize_Helper.MaxSize || !RollFor(hediff.Severity > 0.90f ? 1f : 5f)) { return; } var chest = Genital_Helper.get_breasts(pawn); var newSize = oldSize + 1; var newBoobs = BreastSize_Helper.GetHediffDef(newSize); GenderHelper.ChangeSex(pawn, () => { if (oldBoobs != null) { pawn.health.RemoveHediff(oldBoobs); } pawn.health.AddHediff(newBoobs, chest); }); var message = "RJW_BreastsHaveGrownFromBoobitis".Translate(pawn); Messages.Message(message, pawn, MessageTypeDefOf.SilentInput); } } }
Mewtopian/rjw
Source/Modules/STD/std_updater.cs
C#
mit
8,423
using Verse; using UnityEngine; using Multiplayer.API; namespace rjw { [StaticConstructorOnStartup] public static class BukkakeContent { //UI: public static readonly Texture2D SemenIcon_little = ContentFinder<Texture2D>.Get("Bukkake/SemenIcon_little", true); public static readonly Texture2D SemenIcon_some = ContentFinder<Texture2D>.Get("Bukkake/SemenIcon_some", true); public static readonly Texture2D SemenIcon_dripping = ContentFinder<Texture2D>.Get("Bukkake/SemenIcon_dripping", true); public static readonly Texture2D SemenIcon_drenched = ContentFinder<Texture2D>.Get("Bukkake/SemenIcon_drenched", true); //on pawn: public static readonly Material semenSplatch1 = MaterialPool.MatFrom("Bukkake/splatch_1", ShaderDatabase.Cutout); public static readonly Material semenSplatch2 = MaterialPool.MatFrom("Bukkake/splatch_2", ShaderDatabase.Cutout); public static readonly Material semenSplatch3 = MaterialPool.MatFrom("Bukkake/splatch_3", ShaderDatabase.Cutout); public static readonly Material semenSplatch4 = MaterialPool.MatFrom("Bukkake/splatch_4", ShaderDatabase.Cutout); public static readonly Material semenSplatch5 = MaterialPool.MatFrom("Bukkake/splatch_5", ShaderDatabase.Cutout); public static readonly Material semenSplatch6 = MaterialPool.MatFrom("Bukkake/splatch_6", ShaderDatabase.Cutout); public static readonly Material semenSplatch7 = MaterialPool.MatFrom("Bukkake/splatch_7", ShaderDatabase.Cutout); public static readonly Material semenSplatch8 = MaterialPool.MatFrom("Bukkake/splatch_8", ShaderDatabase.Cutout); public static readonly Material semenSplatch9 = MaterialPool.MatFrom("Bukkake/splatch_9", ShaderDatabase.Cutout); [SyncMethod] public static Material pickRandomSplatch() { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); int rand = Rand.Range(0, 8); switch (rand) { case 0: return semenSplatch1; case 1: return semenSplatch2; case 2: return semenSplatch3; case 3: return semenSplatch4; case 4: return semenSplatch5; case 5: return semenSplatch6; case 6: return semenSplatch7; case 7: return semenSplatch8; case 8: return semenSplatch9; } return null; } } }
Mewtopian/rjw
Source/Modules/SemenOverlay/BukkakeContent.cs
C#
mit
2,265
using RimWorld; using Verse; namespace rjw { //I took the liberty of adding the new DefOf files since I find that easier than managing all the defs via xxx.cs [DefOf] public static class RJW_SemenoOverlayHediffDefOf { public static HediffDef Hediff_Semen;//for humans & animals; also parent for insect and mech spunk public static HediffDef Hediff_InsectSpunk; public static HediffDef Hediff_MechaFluids; public static HediffDef Hediff_Bukkake;//Master + manager } }
Mewtopian/rjw
Source/Modules/SemenOverlay/DefOf/RJW_HediffDefOf.cs
C#
mit
487
using RimWorld; using Verse; namespace rjw { [DefOf] static class RJW_SemenOverlayJobDefOf { public static JobDef CleanSelf; } }
Mewtopian/rjw
Source/Modules/SemenOverlay/DefOf/RJW_JobDefOf.cs
C#
mit
139
using System; using System.Collections.Generic; using System.Linq; using Verse; using RimWorld; using UnityEngine; namespace rjw { class Hediff_Bukkake : HediffWithComps { /* Whenever semen is applied, this hediff is also added to the pawn. Since there is always only a single hediff of this type on the pawn, it serves as master controller, adding up the individual Semen hediffs, applying debuffs and drawing overlays */ private static readonly float semenWeight = 0.2f;//how much individual semen_hediffs contribute to the overall bukkake severity List<Hediff> hediffs_semen; Dictionary<string, SemenSplatch> splatches; public override void ExposeData() { base.ExposeData(); //Scribe_Values.Look<Dictionary<string, SemenSplatch>>(ref splatches, "splatches", new Dictionary<string, SemenSplatch>()); - causes errors when loading. for now, just make a new dictionary splatches = new Dictionary<string, SemenSplatch>();//instead of loading, just recreate anew hediffs_semen = new List<Hediff>(); } public override void PostMake() { base.PostMake(); splatches = new Dictionary<string, SemenSplatch>(); } public override void PostTick() { if (pawn.RaceProps.Humanlike)//for now, only humans are supported { hediffs_semen = this.pawn.health.hediffSet.hediffs.FindAll(x => (x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Semen || x.def == RJW_SemenoOverlayHediffDefOf.Hediff_InsectSpunk || x.def == RJW_SemenoOverlayHediffDefOf.Hediff_MechaFluids)); float bukkakeLevel = CalculateBukkakeLevel();//sum of severity of all the semen hediffs x semenWeight this.Severity = bukkakeLevel; bool updatePortrait = false; //loop through all semen hediffs, add missing ones to dictionary for (int i = 0; i < hediffs_semen.Count(); i++) { Hediff_Semen h = (Hediff_Semen)hediffs_semen[i]; string ID = h.GetUniqueLoadID();//unique ID for each hediff if (!splatches.ContainsKey(ID))//if it isn't here yet, make new object { updatePortrait = true; bool leftSide = h.Part.Label.Contains("left") ? true : false;//depending on whether the body part is left or right, drawing-offset on x-aixs may be inverted splatches[ID] = new SemenSplatch(h, pawn.story.bodyType, h.Part.def, leftSide, h.semenType); } } //remove splatch objects once their respective semen hediff is gone List<string> removeKeys = new List<string>(); foreach (string key in splatches.Keys) { SemenSplatch s = splatches[key]; if (!hediffs_semen.Contains(s.hediff_Semen)) { removeKeys.Add(key); updatePortrait = true; } } //loop over and remove elements that should be destroyed: foreach (string key in removeKeys) { SemenSplatch s = splatches[key]; splatches.Remove(key); } if (updatePortrait)//right now, portraits are only updated when a completely new semen hediff is added or an old one removed - maybe that should be done more frequently { PortraitsCache.SetDirty(pawn); } } } //called from the PawnWoundDrawer (see HarmonyPatches) public void DrawSemen(Vector3 drawLoc, Quaternion quat, bool forPortrait, float angle, bool inBed = false) { Rot4 bodyFacing = pawn.Rotation; int facingDir = bodyFacing.AsInt;//0: north, 1:east, 2:south, 3:west foreach (string key in splatches.Keys) { SemenSplatch s = splatches[key]; s.Draw(drawLoc, quat, forPortrait, facingDir, angle, inBed); } } //new Hediff_Bukkake added to pawn -> just combine the two public override bool TryMergeWith(Hediff other) { if (other == null || other.def != this.def) { return false; } return true; } private float CalculateBukkakeLevel() { float num = 0f; for (int i = 0; i < hediffs_semen.Count; i++) { num += hediffs_semen[i].Severity * semenWeight; } return num; } //class for handling drawing of the individual splatches private class SemenSplatch { public readonly Hediff_Semen hediff_Semen; public readonly Material semenMaterial; public readonly BodyPartDef bodyPart; private bool mirrorMesh; private const float maxSize = 0.20f;//1.0 = 1 tile private const float minSize = 0.05f; //data taken from SemenHelper.cs: private readonly float[] xAdjust; private readonly float[] zAdjust; private readonly float[] yAdjust; public SemenSplatch(Hediff_Semen hediff, BodyTypeDef bodyType, BodyPartDef bodyPart, bool leftSide = false, int semenType = SemenHelper.CUM_NORMAL) { hediff_Semen = hediff; semenMaterial = new Material(BukkakeContent.pickRandomSplatch());//needs to create new material in order to allow for different colors semenMaterial.SetTextureScale("_MainTex", new Vector2(-1, 1)); this.bodyPart = bodyPart; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); //set color: switch (semenType) { case SemenHelper.CUM_NORMAL: semenMaterial.color = SemenHelper.color_normal; break; case SemenHelper.CUM_INSECT: semenMaterial.color = SemenHelper.color_insect; break; case SemenHelper.CUM_MECHA: semenMaterial.color = SemenHelper.color_mecha; break; } mirrorMesh = (Rand.Value > 0.5f);//in 50% of the cases, flip mesh horizontally for more variance //x,y,z adjustments to draw splatches over the approximately correct locations; values stored in semen helper - accessed by unique combinations of bodyTypes and bodyParts SemenHelper.key k = new SemenHelper.key(bodyType, bodyPart); if (SemenHelper.splatchAdjust.Keys.Contains(k)) { SemenHelper.values helperValues = SemenHelper.splatchAdjust[k]; //invert, x-adjust (horizontal) depending on left/right body side: if (!leftSide) { float[] xAdjTemp = new float[4]; for (int i = 0; i < xAdjTemp.Length; i++) { xAdjTemp[i] = helperValues.x[i] * -1f; } xAdjust = xAdjTemp; } else { xAdjust = helperValues.x; } zAdjust = helperValues.z;//vertical adjustment } else//fallback in the the key can't be found { if (Prefs.DevMode) { Log.Message("created semen splatch for undefined body type or part. BodyType: " + bodyType + " , BodyPart: " + bodyPart); } xAdjust = new float[] { 0f, 0f, 0f, 0f }; zAdjust = new float[] { 0f, 0f, 0f, 0f }; } //y adjustments: plane/layer of drawing, > 0 -> above certain objects, < 0 -> below SemenHelper.key_layer k2 = new SemenHelper.key_layer(leftSide, bodyPart); if (SemenHelper.layerAdjust.Keys.Contains(k2)) { SemenHelper.values_layer helperValues_layer = SemenHelper.layerAdjust[k2]; yAdjust = helperValues_layer.y; } else { yAdjust = new float[] { 0.02f, 0.02f, 0.02f, 0.02f };//over body in every direction } } public void Draw(Vector3 drawPos, Quaternion quat, bool forPortrait, int facingDir = 0, float angle = 0,bool inBed=false) { if (inBed) { if (this.bodyPart != BodyPartDefOf.Jaw && this.bodyPart != BodyPartDefOf.Head)//when pawn is in bed (=bed with sheets), only draw semen on head { return; } } //these two create new mesh instance and never destroying it, filling ram and crashing //float size = minSize+((maxSize-minSize)*hediff_Semen.Severity); //mesh = MeshMakerPlanes.NewPlaneMesh(size); //use core MeshPool.plane025 instead //if (mirrorMesh)//horizontal flip //{ //mesh = flipMesh(mesh); //} //rotation: if (angle == 0)//normal situation (pawn standing upright) { drawPos.x += xAdjust[facingDir]; drawPos.z += zAdjust[facingDir]; } else//if downed etc, more complex calculation becomes necessary { float radian = angle / 180 * (float)Math.PI; radian = -radian; drawPos.x += Mathf.Cos(radian) * xAdjust[hediff_Semen.pawn.Rotation.AsInt] - Mathf.Sin(radian) * zAdjust[facingDir];//facingDir doesn't appear to be chosen correctly in all cases drawPos.z += Mathf.Cos(radian) * zAdjust[hediff_Semen.pawn.Rotation.AsInt] + Mathf.Sin(radian) * xAdjust[facingDir]; } //drawPos.y += yAdjust[facingDir];// 0.00: over body; 0.01: over body but under face, 0.02: over face, but under hair, -99 = "never" visible drawPos.y += yAdjust[facingDir]; GenDraw.DrawMeshNowOrLater(MeshPool.plane025, drawPos, quat, semenMaterial, forPortrait); } //flips mesh UV horizontally, thereby mirroring the texture private Mesh flipMesh(Mesh meshToFlip) { var uvs = meshToFlip.uv; if (uvs.Length != 4) { return (meshToFlip); } for (var i = 0; i < uvs.Length; i++) { if (Mathf.Approximately(uvs[i].x, 1.0f)) uvs[i].x = 0.0f; else uvs[i].x = 1.0f; } meshToFlip.uv = uvs; return (meshToFlip); } } } }
Mewtopian/rjw
Source/Modules/SemenOverlay/Hediffs/Hediff_Bukkake.cs
C#
mit
8,920
using System.Collections.Generic; using System.Linq; using System.Text; using Verse; using UnityEngine; using Multiplayer.API; namespace rjw { public class Hediff_Semen : HediffWithComps { public int semenType = SemenHelper.CUM_NORMAL;//-> different colors public string giverName = null;//not utilized right now, maybe in the future save origin of the semen public override string LabelInBrackets { get { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.LabelInBrackets); if (this.sourceHediffDef != null) { if (stringBuilder.Length != 0) { stringBuilder.Append(", "); } stringBuilder.Append(this.sourceHediffDef.label); } else if (this.source != null) { if (stringBuilder.Length != 0) { stringBuilder.Append(", "); } stringBuilder.Append(this.source.label); if (this.sourceBodyPartGroup != null) { stringBuilder.Append(" "); stringBuilder.Append(this.sourceBodyPartGroup.LabelShort); } } return stringBuilder.ToString(); } } public override string SeverityLabel { get { if (this.Severity == 0f) { return null; } return this.Severity.ToString("F1"); } } [SyncMethod] public override bool TryMergeWith(Hediff other) { //if a new Semen hediff is added to the same body part, they are combined. if severity reaches more than 1, spillover to other body parts occurs Hediff_Semen hediff_Semen = other as Hediff_Semen; if (hediff_Semen != null && hediff_Semen.def == this.def && hediff_Semen.Part == base.Part && this.def.injuryProps.canMerge) { semenType = hediff_Semen.semenType;//take over new creature color float totalAmount = hediff_Semen.Severity + this.Severity; if (totalAmount > 1.0f) { BodyPartDef spillOverTo = SemenHelper.spillover(this.Part.def);//SemenHelper saves valid other body parts for spillover if (spillOverTo != null) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); IEnumerable<BodyPartRecord> availableParts = SemenHelper.getAvailableBodyParts(pawn);//gets all non missing, valid body parts IEnumerable<BodyPartRecord> filteredParts = availableParts.Where(x => x.def == spillOverTo);//filters again for valid spill target BodyPartRecord spillPart = filteredParts.RandomElement<BodyPartRecord>();//then pick one if (spillPart != null) { SemenHelper.cumOn(pawn, spillPart, totalAmount - this.Severity, null, semenType); } } } return (base.TryMergeWith(other)); } return (false); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look<int>(ref semenType, "semenType", SemenHelper.CUM_NORMAL); if (Scribe.mode == LoadSaveMode.PostLoadInit && base.Part == null) { //Log.Error("Hediff_Semen has null part after loading.", false); this.pawn.health.hediffSet.hediffs.Remove(this); return; } } //handles the icon in the health tab and its color public override TextureAndColor StateIcon { get { TextureAndColor tex = TextureAndColor.None; Color color = Color.white; switch (semenType) { case SemenHelper.CUM_NORMAL: color = SemenHelper.color_normal; break; case SemenHelper.CUM_INSECT: color = SemenHelper.color_insect; break; case SemenHelper.CUM_MECHA: color = SemenHelper.color_mecha; break; } Texture2D tex2d = BukkakeContent.SemenIcon_little; switch (this.CurStageIndex) { case 0: tex2d = BukkakeContent.SemenIcon_little; break; case 1: tex2d = BukkakeContent.SemenIcon_some; break; case 2: tex2d = BukkakeContent.SemenIcon_dripping; break; case 3: tex2d = BukkakeContent.SemenIcon_drenched; break; } tex = new TextureAndColor(tex2d, color); return tex; } } } }
Mewtopian/rjw
Source/Modules/SemenOverlay/Hediffs/Hediff_Semen.cs
C#
mit
3,984
using System.Collections.Generic; using Verse; using Verse.AI; namespace rjw { class JobDriver_CleanSelf : JobDriver { float cleanAmount = 1f;//severity of a single SemenHediff removed per cleaning-round; 1f = remove entirely int cleaningTime = 120;//ticks - 120 = 2 real seconds, 3 in-game minutes public override bool TryMakePreToilReservations(bool errorOnFailed) { return pawn.Reserve(pawn, job, 1, -1, null, errorOnFailed); } protected override IEnumerable<Toil> MakeNewToils() { this.FailOn(delegate { List<Hediff> hediffs = pawn.health.hediffSet.hediffs; return !hediffs.Exists(x => x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Bukkake);//fail if bukkake disappears - means that also all the semen is gone }); Toil cleaning = Toils_General.Wait(cleaningTime, TargetIndex.None);//duration of cleaning.WithProgressBarToilDelay(TargetIndex.A); yield return cleaning; yield return new Toil() { initAction = delegate () { //get one of the semen hediffs, reduce its severity Hediff hediff = pawn.health.hediffSet.hediffs.Find(x => (x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Semen || x.def == RJW_SemenoOverlayHediffDefOf.Hediff_InsectSpunk || x.def == RJW_SemenoOverlayHediffDefOf.Hediff_MechaFluids)); if (hediff != null) { hediff.Severity -= cleanAmount; } } }; yield break; } } }
Mewtopian/rjw
Source/Modules/SemenOverlay/JobDrivers/JobDriver_CleanSelf.cs
C#
mit
1,399
using System; using System.Collections.Generic; using System.Linq; using RimWorld; using Verse; using Harmony; using UnityEngine; using Multiplayer.API; namespace rjw { [StaticConstructorOnStartup] public static class SemenHelper { /* contains many important functions of use to the other classes */ //amount of semen per sex act: public static readonly Dictionary<key, values> splatchAdjust;//saves x (horizontal) and z (vertical) adjustments of texture positiion for each unique combination of bodyType and bodyPart public static readonly Dictionary<key_layer, values_layer> layerAdjust;//saves y adjustments (drawing plane) for left/right appendages + bodyPart combinations to hide spunk if pawn looks in the wrong direction //structs are used to pack related variables together - used as keys for the dictionaries public struct key//allows to save all unique combinations of bodyType and bodyPart { public readonly BodyTypeDef bodyType; public readonly BodyPartDef bodyPart; public key(BodyTypeDef bodyType, BodyPartDef bodyPart) { this.bodyType = bodyType; this.bodyPart = bodyPart; } } //for the 4 directions, use arrays to store the different adjust for north, east, south, west (in that order) public struct values { public readonly float[] x; public readonly float[] z; //public readonly bool over_clothing;//on gentials: hide when clothes are worn - in case of the other body parts it can't be said (for now) if it was added on the clothing or not public values(float[] xAdjust, float[] zAdjust) { x = xAdjust; z = zAdjust; //this.over_clothing = over_clothing; } } public struct key_layer//used to save left/right appendage + bodyPart combinations { public readonly bool left_side; public readonly BodyPartDef bodyPart; public key_layer(bool left_side, BodyPartDef bodyPart) { this.left_side = left_side; this.bodyPart = bodyPart; } } public struct values_layer//saves the y-adjustments for different body parts and sides -> e.g. allows hiding spunk on the right arm if pawn is looking to the left (aka west) { public readonly float[] y; public values_layer(float[] yAdjust) { y = yAdjust; } } //get defs of the rjw parts public static BodyPartDef genitalsDef = BodyDefOf.Human.AllParts.Find(bpr => string.Equals(bpr.def.defName, "Genitals")).def; public static BodyPartDef anusDef = BodyDefOf.Human.AllParts.Find(bpr => string.Equals(bpr.def.defName, "Anus")).def; public static BodyPartDef chestDef = BodyDefOf.Human.AllParts.Find(bpr => string.Equals(bpr.def.defName, "Chest")).def; static SemenHelper() { splatchAdjust = new Dictionary<key, values>(); //maybe there is a more elegant way to save and load this data, but I don't know about it //structure explained: //1) key: struct consisting of bodyType + bodyPart (= unique key for every combination of bodyType + part) //2) values: struct containing positioning information (xAdjust: horizontal positioning, yAdjust: vertical positioning, zAdjust: whether to draw above or below pawn //note: arms, hands, and legs (which are only visible from one direction) values need not be inverted between west and east //BodyType Thin splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Arm), new values(new float[] { -0.13f, 0.05f, 0.13f, 0.05f }, new float[] { 0f, 0f, 0f, 0f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Hand), new values(new float[] { -0.12f, 0.15f, 0.12f, 0.15f }, new float[] { -0.25f, -0.25f, -0.25f, -0.25f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Head), new values(new float[] { 0f, -0.23f, 0f, 0.23f }, new float[] { 0.37f, 0.35f, 0.33f, 0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Jaw), new values(new float[] { 0f, -0.19f, 0f, 0.19f }, new float[] { 0.15f, 0.15f, 0.15f, 0.15f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Leg), new values(new float[] { -0.1f, 0.1f, 0.1f, 0.1f }, new float[] { -0.4f, -0.4f, -0.4f, -0.4f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Neck), new values(new float[] { 0f, -0.07f, 0f, 0.07f }, new float[] { 0.06f, 0.06f, 0.06f, 0.06f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, BodyPartDefOf.Torso), new values(new float[] { 0f, 0f, 0f, 0f }, new float[] { -0.18f, -0.20f, -0.25f, -0.25f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, genitalsDef), new values(new float[] { 0f, 0.01f, 0f, -0.01f }, new float[] { 0, -0.35f, -0.35f, -0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, anusDef), new values(new float[] { 0, 0.18f, 0, -0.18f }, new float[] { -0.42f, -0.35f, 0, -0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Thin, chestDef), new values(new float[] { 0f, -0.1f, 0f, 0.1f }, new float[] { -0.06f, -0.05f, -0.06f, -0.05f })); //BodyType Female splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Arm), new values(new float[] { -0.17f, 0f, 0.17f, 0f }, new float[] { 0f, 0f, 0f, 0f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Hand), new values(new float[] { -0.17f, 0.1f, 0.17f, 0.1f }, new float[] { -0.25f, -0.25f, -0.25f, -0.25f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Head), new values(new float[] { 0f, -0.23f, 0f, 0.23f }, new float[] { 0.37f, 0.35f, 0.33f, 0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Jaw), new values(new float[] { 0f, -0.19f, 0f, 0.19f }, new float[] { 0.15f, 0.15f, 0.15f, 0.15f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Leg), new values(new float[] { -0.2f, 0.1f, 0.2f, 0.1f }, new float[] { -0.4f, -0.4f, -0.4f, -0.4f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Neck), new values(new float[] { 0f, -0.07f, 0f, 0.07f }, new float[] { 0.06f, 0.06f, 0.06f, 0.06f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, BodyPartDefOf.Torso), new values(new float[] { 0f, -0.05f, 0f, 0.05f }, new float[] { -0.20f, -0.25f, -0.25f, -0.25f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, genitalsDef), new values(new float[] { 0f, -0.10f, 0f, 0.10f }, new float[] { 0, -0.42f, -0.45f, -0.42f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, anusDef), new values(new float[] { 0, 0.26f, 0, -0.26f }, new float[] { -0.42f, -0.35f, 0, -0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Female, chestDef), new values(new float[] { 0f, -0.12f, 0f, 0.12f }, new float[] { -0.06f, -0.05f, -0.06f, -0.05f })); //BodyType Male splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Arm), new values(new float[] { -0.21f, 0.05f, 0.21f, 0.05f }, new float[] { 0f, -0.02f, 0f, -0.02f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Hand), new values(new float[] { -0.17f, 0.07f, 0.17f, 0.07f }, new float[] { -0.25f, -0.25f, -0.25f, -0.25f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Head), new values(new float[] { 0f, -0.23f, 0f, 0.23f }, new float[] { 0.37f, 0.35f, 0.33f, 0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Jaw), new values(new float[] { 0f, -0.19f, 0f, 0.19f }, new float[] { 0.15f, 0.15f, 0.15f, 0.15f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Leg), new values(new float[] { -0.17f, 0.07f, 0.17f, 0.07f }, new float[] { -0.4f, -0.4f, -0.4f, -0.4f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Neck), new values(new float[] { 0f, -0.07f, 0f, 0.07f }, new float[] { 0.06f, 0.06f, 0.06f, 0.06f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, BodyPartDefOf.Torso), new values(new float[] { 0f, -0.05f, 0f, 0.05f }, new float[] { -0.20f, -0.25f, -0.25f, -0.25f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, genitalsDef), new values(new float[] { 0f, -0.07f, 0f, 0.07f }, new float[] { 0, -0.35f, -0.42f, -0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, anusDef), new values(new float[] { 0, 0.17f, 0, -0.17f }, new float[] { -0.42f, -0.35f, 0, -0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Male, chestDef), new values(new float[] { 0f, -0.16f, 0f, 0.16f }, new float[] { -0.06f, -0.05f, -0.06f, -0.05f })); //BodyType Hulk splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Arm), new values(new float[] { -0.3f, 0.05f, 0.3f, 0.05f }, new float[] { 0f, -0.02f, 0f, -0.02f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Hand), new values(new float[] { -0.22f, 0.07f, 0.22f, 0.07f }, new float[] { -0.28f, -0.28f, -0.28f, -0.28f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Head), new values(new float[] { 0f, -0.23f, 0f, 0.23f }, new float[] { 0.37f, 0.35f, 0.33f, 0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Jaw), new values(new float[] { 0f, -0.19f, 0f, 0.19f }, new float[] { 0.15f, 0.15f, 0.15f, 0.15f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Leg), new values(new float[] { -0.17f, 0.07f, 0.17f, 0.07f }, new float[] { -0.5f, -0.5f, -0.5f, -0.5f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Neck), new values(new float[] { 0f, -0.07f, 0f, 0.07f }, new float[] { 0.06f, 0.06f, 0.06f, 0.06f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, BodyPartDefOf.Torso), new values(new float[] { 0f, -0.05f, 0f, 0.05f }, new float[] { -0.20f, -0.3f, -0.3f, -0.3f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, genitalsDef), new values(new float[] { 0f, -0.02f, 0f, 0.02f }, new float[] { 0, -0.55f, -0.55f, -0.55f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, anusDef), new values(new float[] { 0, 0.35f, 0, -0.35f }, new float[] { -0.5f, -0.5f, 0, -0.5f })); splatchAdjust.Add(new key(BodyTypeDefOf.Hulk, chestDef), new values(new float[] { 0f, -0.22f, 0f, 0.22f }, new float[] { -0.06f, -0.05f, -0.06f, -0.05f })); //BodyType Fat splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Arm), new values(new float[] { -0.3f, 0.05f, 0.3f, 0.05f }, new float[] { 0f, -0.02f, 0f, -0.02f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Hand), new values(new float[] { -0.32f, 0.07f, 0.32f, 0.07f }, new float[] { -0.28f, -0.28f, -0.28f, -0.28f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Head), new values(new float[] { 0f, -0.23f, 0f, 0.23f }, new float[] { 0.37f, 0.35f, 0.33f, 0.35f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Jaw), new values(new float[] { 0f, -0.19f, 0f, 0.19f }, new float[] { 0.15f, 0.15f, 0.15f, 0.15f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Leg), new values(new float[] { -0.17f, 0.07f, 0.17f, 0.07f }, new float[] { -0.45f, -0.45f, -0.45f, -0.45f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Neck), new values(new float[] { 0f, -0.07f, 0f, 0.07f }, new float[] { 0.06f, 0.06f, 0.06f, 0.06f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, BodyPartDefOf.Torso), new values(new float[] { 0f, -0.15f, 0f, 0.15f }, new float[] { -0.20f, -0.3f, -0.3f, -0.3f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, genitalsDef), new values(new float[] { 0f, -0.25f, 0f, 0.25f }, new float[] { 0, -0.45f, -0.50f, -0.45f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, anusDef), new values(new float[] { 0, 0.35f, 0, -0.35f }, new float[] { -0.5f, -0.4f, 0, -0.4f })); splatchAdjust.Add(new key(BodyTypeDefOf.Fat, chestDef), new values(new float[] { 0f, -0.27f, 0f, 0.27f }, new float[] { -0.07f, -0.05f, -0.07f, -0.05f })); //now for the layer/plane adjustments: layerAdjust = new Dictionary<key_layer, values_layer>(); //left body parts: //in theory, all body parts not coming in pairs should have the bool as false -> be listed as right, so I wouldn't need to add them here, but it doesn't hurt to be safe layerAdjust.Add(new key_layer(true, BodyPartDefOf.Arm), new values_layer(new float[] { 0f, -99f, 0f, 0f }));//0.00 = drawn over body (=visible) if the pawn looks in any direction except west, in which case it's hidden (-99) layerAdjust.Add(new key_layer(true, BodyPartDefOf.Hand), new values_layer(new float[] { 0f, -99f, 0f, 0f })); layerAdjust.Add(new key_layer(true, BodyPartDefOf.Leg), new values_layer(new float[] { 0f, -99f, 0f, 0f })); layerAdjust.Add(new key_layer(true, BodyPartDefOf.Head), new values_layer(new float[] { 0.02f, 0.02f, 0.02f, 0.02f }));//drawn from all directions, 0.02 = over hair layerAdjust.Add(new key_layer(true, BodyPartDefOf.Jaw), new values_layer(new float[] { -9f, 0.01f, 0.01f, 0.01f }));//0.01 = drawn over head but under hair, only hidden if facing north layerAdjust.Add(new key_layer(true, BodyPartDefOf.Neck), new values_layer(new float[] { 0f, 0f, 0f, 0f })); layerAdjust.Add(new key_layer(true, BodyPartDefOf.Torso), new values_layer(new float[] { 0f, 0f, 0f, 0f })); layerAdjust.Add(new key_layer(true, genitalsDef), new values_layer(new float[] { -99f, 0f, 0f, 0f }));//only hidden if facing north layerAdjust.Add(new key_layer(true, anusDef), new values_layer(new float[] { 0f, 0f, -99f, 0f })); layerAdjust.Add(new key_layer(true, chestDef), new values_layer(new float[] { -99f, 0f, 0f, 0f })); //right body parts: layerAdjust.Add(new key_layer(false, BodyPartDefOf.Arm), new values_layer(new float[] { 0f, 0f, 0f, -99f })); layerAdjust.Add(new key_layer(false, BodyPartDefOf.Hand), new values_layer(new float[] { 0f, 0f, 0f, -99f })); layerAdjust.Add(new key_layer(false, BodyPartDefOf.Leg), new values_layer(new float[] { 0f, 0f, 0f, -99f })); layerAdjust.Add(new key_layer(false, BodyPartDefOf.Head), new values_layer(new float[] { 0.02f, 0.02f, 0.02f, 0.02f })); layerAdjust.Add(new key_layer(false, BodyPartDefOf.Jaw), new values_layer(new float[] { -99f, 0.01f, 0.01f, 0.01f })); layerAdjust.Add(new key_layer(false, BodyPartDefOf.Neck), new values_layer(new float[] { 0f, 0f, 0f, 0f })); layerAdjust.Add(new key_layer(false, BodyPartDefOf.Torso), new values_layer(new float[] { 0f, 0f, 0f, 0f })); layerAdjust.Add(new key_layer(false, genitalsDef), new values_layer(new float[] { -99f, 0f, 0f, 0f })); layerAdjust.Add(new key_layer(false, anusDef), new values_layer(new float[] { 0f, 0f, -99f, 0f })); layerAdjust.Add(new key_layer(false, chestDef), new values_layer(new float[] { -99f, 0f, 0f, 0f })); } //all body parts that semen can theoretically be applied to: public static List<BodyPartDef> getAllowedBodyParts() { List<BodyPartDef> allowedParts = new List<BodyPartDef>(); allowedParts.Add(BodyPartDefOf.Arm); allowedParts.Add(BodyPartDefOf.Hand); allowedParts.Add(BodyPartDefOf.Leg); allowedParts.Add(BodyPartDefOf.Head); allowedParts.Add(BodyPartDefOf.Jaw); allowedParts.Add(BodyPartDefOf.Neck); allowedParts.Add(BodyPartDefOf.Torso); allowedParts.Add(genitalsDef); allowedParts.Add(anusDef); allowedParts.Add(chestDef); return allowedParts; } //get valid body parts for a specific pawn public static IEnumerable<BodyPartRecord> getAvailableBodyParts(Pawn pawn) { //get all non-missing body parts: IEnumerable<BodyPartRecord> bodyParts = pawn.health.hediffSet.GetNotMissingParts(BodyPartHeight.Undefined, BodyPartDepth.Outside, null, null); BodyPartRecord anus = pawn.def.race.body.AllParts.Find(bpr => string.Equals(bpr.def.defName, "Anus"));//not found by above function since depth is "inside" if (anus != null) { bodyParts = bodyParts.Add(anus); } //filter for allowed body parts (e.g. no single fingers/toes): List<BodyPartDef> filterParts = SemenHelper.getAllowedBodyParts(); IEnumerable<BodyPartRecord> filteredParts = bodyParts.Where(item1 => filterParts.Any(item2 => item2.Equals(item1.def))); return filteredParts; } public const int CUM_NORMAL = 0; public const int CUM_INSECT = 1; public const int CUM_MECHA = 2; public static readonly Color color_normal = new Color(0.95f, 0.95f, 0.95f); public static readonly Color color_insect = new Color(0.6f, 0.83f, 0.35f);//green-yellowish public static readonly Color color_mecha = new Color(0.37f, 0.71f, 0.82f);//cyan-ish //name should be self-explanatory: public static void cumOn(Pawn receiver, BodyPartRecord bodyPart, float amount = 0.2f, Pawn giver = null, int semenType = CUM_NORMAL) { Hediff_Semen hediff; if (semenType == CUM_NORMAL) { hediff = (Hediff_Semen)HediffMaker.MakeHediff(RJW_SemenoOverlayHediffDefOf.Hediff_Semen, receiver, null); } else if (semenType == CUM_INSECT) { hediff = (Hediff_Semen)HediffMaker.MakeHediff(RJW_SemenoOverlayHediffDefOf.Hediff_InsectSpunk, receiver, null); } else { hediff = (Hediff_Semen)HediffMaker.MakeHediff(RJW_SemenoOverlayHediffDefOf.Hediff_MechaFluids, receiver, null); } hediff.Severity = amount;//if this body part is already maximally full -> spill over to other parts //idea: here, a log entry that can act as source could be linked to the hediff - maybe reuse the playlog entry of rjw: hediff.semenType = semenType; receiver.health.AddHediff(hediff, bodyPart, null, null); //Log.Message(xxx.get_pawnname(receiver) + " cum ammount" + amount); //causes significant memory leak, fixx someday //if (amount > 1f)//spillover in case of very large amounts: just apply hediff a second time //{ // Hediff_Semen hediff2 = (Hediff_Semen)HediffMaker.MakeHediff(hediff.def, receiver, null); // hediff2.semenType = semenType; // hediff2.Severity = amount - 1f; // receiver.health.AddHediff(hediff2, bodyPart, null, null); //} //always also add bukkake hediff as manager receiver.health.AddHediff(RJW_SemenoOverlayHediffDefOf.Hediff_Bukkake); } //if spunk on one body part reaches a certain level, it can spill over to others, this function returns from where to where [SyncMethod] public static BodyPartDef spillover(BodyPartDef sourcePart) { //caution: danger of infinite loop if circular spillover between 2 full parts -> don't define possible circles BodyPartDef newPart = null; int sel; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (sourcePart == BodyPartDefOf.Torso) { sel = Rand.Range(0, 4); if (sel == 0) { newPart = BodyPartDefOf.Arm; } else if (sel == 1) { newPart = BodyPartDefOf.Leg; } else if (sel == 2) { newPart = BodyPartDefOf.Neck; } else if (sel == 3) { newPart = chestDef; } } else if (sourcePart == BodyPartDefOf.Jaw) { sel = Rand.Range(0, 4); if (sel == 0) { newPart = BodyPartDefOf.Head; } else if (sel == 1) { newPart = BodyPartDefOf.Torso; } else if (sel == 2) { newPart = BodyPartDefOf.Neck; } else if (sel == 3) { newPart = chestDef; } } else if (sourcePart == genitalsDef) { sel = Rand.Range(0, 2); if (sel == 0) { newPart = BodyPartDefOf.Leg; } else if (sel == 1) { newPart = BodyPartDefOf.Torso; } } else if (sourcePart == anusDef) { sel = Rand.Range(0, 2); if (sel == 0) { newPart = BodyPartDefOf.Leg; } else if (sel == 1) { newPart = BodyPartDefOf.Torso; } } else if (sourcePart == chestDef) { sel = Rand.Range(0, 3); if (sel == 0) { newPart = BodyPartDefOf.Arm; } else if (sel == 1) { newPart = BodyPartDefOf.Torso; } else if (sel == 2) { newPart = BodyPartDefOf.Neck; } } return newPart; } //determines who is the active male (or equivalent) in the exchange and the amount of semen dispensed and where to [SyncMethod] public static void calculateAndApplySemen(Pawn pawn, Pawn partner, xxx.rjwSextype sextype) { if (!RJWSettings.cum_on_body) return; Pawn giver, receiver; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); //dispenser of the seed if (Genital_Helper.has_penis(pawn) || xxx.is_mechanoid(pawn) || xxx.is_insect(pawn)) { giver = pawn; receiver = partner; } else if (partner != null && (Genital_Helper.has_penis(partner) || xxx.is_mechanoid(partner) || xxx.is_insect(partner))) { giver = partner; receiver = pawn; } else//female on female or genderless - no semen dispensed; maybe add futa support? { return; } //slimes do not waste fluids? //if (xxx.is_slime(giver)) return; //determine entity: int entityType = SemenHelper.CUM_NORMAL; if (xxx.is_mechanoid(giver)) { entityType = SemenHelper.CUM_MECHA; } else if (xxx.is_insect(giver)) { entityType = SemenHelper.CUM_INSECT; } //get pawn genitalia: BodyPartRecord genitals; if (xxx.is_mechanoid(giver)) { genitals = giver.RaceProps.body.AllParts.Find(x => string.Equals(x.def.defName, "MechGenitals")); } else//insects, animals, humans { genitals = giver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.genitalsDef); } //no cum without genitals if (genitals == null) { return; } //calculate semen amount: Need sexNeed = giver.needs.AllNeeds.Find(x => string.Equals(x.def.defName, "Sex")); float horniness = 1f; if (sexNeed != null)//non-humans don't have it - therefore just use the default value { horniness = 1f - sexNeed.CurLevel; } float ageScale = Math.Min(80 / SexUtility.ScaleToHumanAge(giver), 1.0f);//calculation lifted from rjw float cumAmount = horniness * giver.BodySize * ageScale * RJWSettings.cum_on_body_amount_adjust; ; if (xxx.has_quirk(giver, "Messy")) { cumAmount *= 1.5f; } //if no partner -> masturbation, apply some cum on self: //if (partner == null && sextype == xxx.rjwSextype.Autofellatio) //{ // if (!xxx.is_slime(giver)) // SemenHelper.cumOn(giver, BodyPartDefOf.Jaw, cumAmount, giver); // return; //} if (partner == null && sextype == xxx.rjwSextype.Masturbation) { if (!xxx.is_slime(giver)) SemenHelper.cumOn(giver, genitals, cumAmount * 0.3f, giver);//pawns are usually not super-messy -> only apply 30% return; } else if (partner != null) { List<BodyPartRecord> targetParts = new List<BodyPartRecord>();//which to apply semen on IEnumerable<BodyPartRecord> availableParts = SemenHelper.getAvailableBodyParts(receiver); BodyPartRecord randomPart;//not always needed switch (sextype) { case rjw.xxx.rjwSextype.Anal: targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.anusDef)); break; case rjw.xxx.rjwSextype.Boobjob: targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.chestDef)); break; case rjw.xxx.rjwSextype.DoublePenetration: targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.anusDef)); targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.genitalsDef)); break; case rjw.xxx.rjwSextype.Fingering: cumAmount = 0; break; case rjw.xxx.rjwSextype.Fisting: cumAmount = 0; break; case rjw.xxx.rjwSextype.Footjob: //random part: availableParts.TryRandomElement<BodyPartRecord>(out randomPart); targetParts.Add(randomPart); break; case rjw.xxx.rjwSextype.Handjob: //random part: availableParts.TryRandomElement<BodyPartRecord>(out randomPart); targetParts.Add(randomPart); break; case rjw.xxx.rjwSextype.Masturbation: cumAmount *= 2f; break; case rjw.xxx.rjwSextype.MechImplant: //one of the openings: int random = Rand.Range(0, 3); if (random == 0) { targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.genitalsDef)); } else if (random == 1) { targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.anusDef)); } else if (random == 2) { targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == BodyPartDefOf.Jaw)); } break; case rjw.xxx.rjwSextype.MutualMasturbation: //random availableParts.TryRandomElement<BodyPartRecord>(out randomPart); targetParts.Add(randomPart); break; case rjw.xxx.rjwSextype.None: cumAmount = 0; break; case rjw.xxx.rjwSextype.Oral: targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == BodyPartDefOf.Jaw)); break; case rjw.xxx.rjwSextype.Scissoring: //I guess if it came to here, a male must be involved? targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.genitalsDef)); break; case rjw.xxx.rjwSextype.Vaginal: targetParts.Add(receiver.RaceProps.body.AllParts.Find(x => x.def == SemenHelper.genitalsDef)); break; } if (cumAmount > 0) { if (xxx.is_slime(receiver)) { //slime absorb cum //this needs balancing, since cumamount ranges 0-10(?) which is fine for cum/hentai but not very realistic for feeding //using TransferNutrition for now //Log.Message("cumAmount " + cumAmount); //float nutrition_amount = cumAmount/10; Need_Food need = need = giver.needs.TryGetNeed<Need_Food>(); if (need == null) { //Log.Message("xxx::TransferNutrition() " + xxx.get_pawnname(pawn) + " doesn't track nutrition in itself, probably shouldn't feed the others"); return; } if (receiver?.needs?.TryGetNeed<Need_Food>() != null) { //Log.Message("xxx::TransferNutrition() " + xxx.get_pawnname(partner) + " can receive"); float nutrition_amount = Math.Min(need.MaxLevel / 15f, need.CurLevel); //body size is taken into account implicitly by need.MaxLevel receiver.needs.food.CurLevel += nutrition_amount; } } else { SemenHelper.cumOn(giver, genitals, cumAmount * 0.3f, giver, entityType);//cum on self - smaller amount foreach (BodyPartRecord bpr in targetParts) { if (bpr != null) { SemenHelper.cumOn(receiver, bpr, cumAmount, giver, entityType);//cum on partner } } } } } } } }
Mewtopian/rjw
Source/Modules/SemenOverlay/SemenHelper.cs
C#
mit
26,318
using RimWorld; using Verse; using Verse.AI; namespace rjw { public class WorkGiver_CleanSelf : WorkGiver_Scanner { public override PathEndMode PathEndMode { get { return PathEndMode.InteractionCell; } } public override Danger MaxPathDanger(Pawn pawn) { return Danger.Deadly; } public override ThingRequest PotentialWorkThingRequest { get { return ThingRequest.ForGroup(ThingRequestGroup.Pawn); } } //conditions for self-cleaning job to be available public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false) { if (!pawn.CanReserve(t, 1, -1, null, forced)) return false; Hediff hediff = pawn.health.hediffSet.hediffs.Find(x => (x.def == RJW_SemenoOverlayHediffDefOf.Hediff_Bukkake)); if (pawn != t || hediff == null ) return false; if (xxx.DubsBadHygieneIsActive) return false; if (pawn.IsDesignatedHero()) { if (!forced) { //Log.Message("[RJW]WorkGiver_CleanSelf::not player interaction for hero, exit"); return false; } if (!pawn.IsHeroOwner()) { //Log.Message("[RJW]WorkGiver_CleanSelf::player interaction for not owned hero, exit"); return false; } } else { int minAge = 3 * 2500;//3 hours in-game must have passed if (!(hediff.ageTicks > minAge)) { //Log.Message("[RJW]WorkGiver_CleanSelf:: 3 hours in-game must pass to self-clean, exit"); return false; } } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(RJW_SemenOverlayJobDefOf.CleanSelf); } } }
Mewtopian/rjw
Source/Modules/SemenOverlay/WorkGivers/WorkGiver_CleanSelf.cs
C#
mit
1,621
using System; using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using UnityEngine; using Verse; namespace rjw { public class Building_WhoreBed : Building_Bed { private static readonly Color WhoreFieldColor = new Color(170/255f, 79/255f, 255/255f); private static readonly Color sheetColorForWhores = new Color(89/255f, 55/255f, 121/255f); private static readonly List<IntVec3> WhoreField = new List<IntVec3>(); public Pawn CurOccupant { get { var list = Map.thingGrid.ThingsListAt(Position); return list.OfType<Pawn>() .Where(pawn => pawn.jobs.curJob != null) .FirstOrDefault(pawn => pawn.jobs.curJob.def == JobDefOf.LayDown && pawn.jobs.curJob.targetA.Thing == this); } } public override Color DrawColor { get { if (def.MadeFromStuff) { return base.DrawColor; } return DrawColorTwo; } } public override void Draw() { base.Draw(); if (Medical) Medical = false; if (ForPrisoners) ForPrisoners = false; } public override Color DrawColorTwo { get { return sheetColorForWhores; } } public override void DeSpawn(DestroyMode mode = DestroyMode.Vanish) { foreach (var owner in owners.ToArray()) { owner.ownership.UnclaimBed(); } var room = Position.GetRoom(Map); base.DeSpawn(mode); if (room != null) { room.Notify_RoomShapeOrContainedBedsChanged(); } } //public override void DrawExtraSelectionOverlays() //{ // base.DrawExtraSelectionOverlays(); // var room = this.GetRoom(); // if (room == null) return; // if (room.isPrisonCell) return; // // if (room.RegionCount < 20 && !room.TouchesMapEdge) // { // foreach (var current in room.Cells) // { // WhoreField.Add(current); // } // var color = WhoreFieldColor; // color.a = Pulser.PulseBrightness(1f, 0.6f); // GenDraw.DrawFieldEdges(WhoreField, color); // WhoreField.Clear(); // } //} public override string GetInspectString() { var stringBuilder = new StringBuilder(); //stringBuilder.Append(base.GetInspectString()); stringBuilder.Append(InspectStringPartsFromComps()); stringBuilder.AppendLine(); stringBuilder.Append("ForWhoreUse".Translate()); stringBuilder.AppendLine(); if (owners.Count == 0) { stringBuilder.Append("Owner".Translate() + ": " + "Nobody".Translate()); } else if (owners.Count == 1) { stringBuilder.Append("Owner".Translate() + ": " + owners[0].LabelCap); } else { stringBuilder.Append("Owners".Translate() + ": "); bool notFirst = false; foreach (Pawn owner in owners) { if (notFirst) { stringBuilder.Append(", "); } notFirst = true; stringBuilder.Append(owner.Label); } //if(notFirst) stringBuilder.AppendLine(); } return stringBuilder.ToString(); } // Is this one even being used?? public override IEnumerable<Gizmo> GetGizmos() { // Get original gizmos from Building class var method = typeof(Building).GetMethod("GetGizmos"); var ftn = method.MethodHandle.GetFunctionPointer(); var func = (Func<IEnumerable<Gizmo>>)Activator.CreateInstance(typeof(Func<IEnumerable<Gizmo>>), this, ftn); foreach (var gizmo in func()) { yield return gizmo; } if(def.building.bed_humanlike) { yield return new Command_Toggle { defaultLabel = "CommandBedSetAsWhoreLabel".Translate(), defaultDesc = "CommandBedSetAsWhoreDesc".Translate(), icon = ContentFinder<Texture2D>.Get("UI/Commands/AsWhore"), isActive = () => true, toggleAction = () => Swap(this), hotKey = KeyBindingDefOf.Misc4 }; } } public override void PostMake() { base.PostMake(); PlayerKnowledgeDatabase.KnowledgeDemonstrated(ConceptDef.Named("WhoreBeds"), KnowledgeAmount.Total); } public override void DrawGUIOverlay() { //if (Find.CameraMap.CurrentZoom == CameraZoomRange.Closest) //{ // if (owner != null && owner.InBed() && owner.CurrentBed().owner == owner) // { // return; // } // string text; // if (owner != null) // { // text = owner.NameStringShort; // } // else // { // text = "Unowned".Translate(); // } // GenWorldUI.DrawThingLabel(this, text, new Color(1f, 1f, 1f, 0.75f)); //} } public static void Swap(Building_Bed bed) { Building_Bed newBed; if (bed is Building_WhoreBed) { newBed = (Building_Bed) MakeBed(bed, bed.def.defName.Split(new[] { "RJW_" }, StringSplitOptions.RemoveEmptyEntries)[0]); } else { newBed = (Building_WhoreBed) MakeBed(bed, "RJW_"+bed.def.defName); } newBed.SetFactionDirect(bed.Faction); var spawnedBed = (Building_Bed)GenSpawn.Spawn(newBed, bed.Position, bed.Map, bed.Rotation); spawnedBed.HitPoints = bed.HitPoints; spawnedBed.ForPrisoners = bed.ForPrisoners; var compQuality = spawnedBed.TryGetComp<CompQuality>(); if(compQuality != null) compQuality.SetQuality(bed.GetComp<CompQuality>().Quality, ArtGenerationContext.Outsider); //var compArt = bed.TryGetComp<CompArt>(); //if (compArt != null) //{ // var art = spawnedBed.GetComp<CompArt>(); // Traverse.Create(art).Field("authorNameInt").SetValue(Traverse.Create(compArt).Field("authorNameInt").GetValue()); // Traverse.Create(art).Field("titleInt").SetValue(Traverse.Create(compArt).Field("titleInt").GetValue()); // Traverse.Create(art).Field("taleRef").SetValue(Traverse.Create(compArt).Field("taleRef").GetValue()); // // // TODO: Make this work, art is now destroyed //} Find.Selector.Select(spawnedBed, false); } public static Thing MakeBed(Building_Bed bed, string defName) { Log.Message("1"); ThingDef newDef = DefDatabase<ThingDef>.GetNamed(defName); Log.Message("2"); return ThingMaker.MakeThing(newDef, bed.Stuff); } } }
Mewtopian/rjw
Source/Modules/Whoring/Building_WhoreBed.cs
C#
mit
7,695
using System.Collections.Generic; using RimWorld; using Verse; using Verse.AI; namespace rjw { public class JobDriver_WhoreInvitingVisitors : JobDriver { // List of jobs that can be interrupted by whores. public static readonly List<JobDef> allowedJobs = new List<JobDef> { null, JobDefOf.Wait_Wander, JobDefOf.GotoWander, JobDefOf.Clean, JobDefOf.ClearSnow, JobDefOf.CutPlant, JobDefOf.HaulToCell, JobDefOf.Deconstruct, JobDefOf.Harvest, JobDefOf.LayDown, JobDefOf.Research, JobDefOf.SmoothFloor, JobDefOf.SmoothWall, JobDefOf.SocialRelax, JobDefOf.StandAndBeSociallyActive, JobDefOf.RemoveApparel, JobDefOf.Strip, JobDefOf.Tame, JobDefOf.Wait, JobDefOf.Wear, JobDefOf.FixBrokenDownBuilding, JobDefOf.FillFermentingBarrel, JobDefOf.DoBill, JobDefOf.Sow, JobDefOf.Shear, JobDefOf.BuildRoof, JobDefOf.DeliverFood, JobDefOf.HaulToContainer, JobDefOf.Hunt, JobDefOf.Mine, JobDefOf.OperateDeepDrill, JobDefOf.OperateScanner, JobDefOf.RearmTurret, JobDefOf.Refuel, JobDefOf.RefuelAtomic, JobDefOf.RemoveFloor, JobDefOf.RemoveRoof, JobDefOf.Repair, JobDefOf.TakeBeerOutOfFermentingBarrel, JobDefOf.Train, JobDefOf.Uninstall, xxx.fappin}; public bool successfulPass = true; private Pawn Whore => GetActor(); private Pawn TargetPawn => TargetThingA as Pawn; private Building_Bed TargetBed => TargetThingB as Building_Bed; private readonly TargetIndex TargetPawnIndex = TargetIndex.A; private readonly TargetIndex TargetBedIndex = TargetIndex.B; private bool DoesTargetPawnAcceptAdvance() { //if (xxx.config.always_accept_whores) // return true; //Log.Message("[RJW]JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() is called"); if (PawnUtility.EnemiesAreNearby(TargetPawn)) { //Log.Message("[RJW]JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() fail - enemy near"); return false; } if (!allowedJobs.Contains(TargetPawn.jobs.curJob.def)) { //Log.Message("[RJW]JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() fail - not allowed job"); return false; } //Log.Message("Will try " + WhoringHelper.WillPawnTryHookup(TargetPawn)); //Log.Message("Appeal " + WhoringHelper.IsHookupAppealing(TargetPawn, Whore)); //Log.Message("Afford " + WhoringHelper.CanAfford(TargetPawn, Whore)); //Log.Message("Need sex " + (xxx.need_some_sex(TargetPawn) >= 1)); Whore.skills.Learn(SkillDefOf.Social, 1.2f); return WhoringHelper.WillPawnTryHookup(TargetPawn) && WhoringHelper.IsHookupAppealing(TargetPawn, Whore) && WhoringHelper.CanAfford(TargetPawn, Whore) && xxx.need_some_sex(TargetPawn) >= 1f; } public override bool TryMakePreToilReservations(bool errorOnFailed) => true; protected override IEnumerable<Toil> MakeNewToils() { this.FailOnDespawnedOrNull(TargetPawnIndex); this.FailOnDespawnedNullOrForbidden(TargetBedIndex); this.FailOn(() => Whore is null || !xxx.CanUse(Whore, TargetBed));//|| !Whore.CanReserve(TargetPawn) this.FailOn(() => pawn.Drafted); yield return Toils_Goto.GotoThing(TargetPawnIndex, PathEndMode.Touch); Toil TryItOn = new Toil(); TryItOn.AddFailCondition(() => !xxx.IsTargetPawnOkay(TargetPawn)); TryItOn.defaultCompleteMode = ToilCompleteMode.Delay; TryItOn.initAction = delegate { //Log.Message("[RJW]JobDriver_InvitingVisitors::MakeNewToils - TryItOn - initAction is called"); Whore.jobs.curDriver.ticksLeftThisToil = 50; MoteMaker.ThrowMetaIcon(Whore.Position, Whore.Map, ThingDefOf.Mote_Heart); }; yield return TryItOn; Toil AwaitResponse = new Toil(); AwaitResponse.AddFailCondition(() => !successfulPass); AwaitResponse.defaultCompleteMode = ToilCompleteMode.Instant; AwaitResponse.initAction = delegate { List<RulePackDef> extraSentencePacks = new List<RulePackDef>(); successfulPass = DoesTargetPawnAcceptAdvance(); //Log.Message("[RJW]JobDriver_InvitingVisitors::MakeNewToils - AwaitResponse - initAction is called"); if (successfulPass) { MoteMaker.ThrowMetaIcon(TargetPawn.Position, TargetPawn.Map, ThingDefOf.Mote_Heart); TargetPawn.jobs.EndCurrentJob(JobCondition.Incompletable); if (xxx.RomanceDiversifiedIsActive) { extraSentencePacks.Add(RulePackDef.Named("HookupSucceeded")); } if (Whore.health.HasHediffsNeedingTend()) { successfulPass = false; const string key = "RJW_VisitorSickWhore"; string text = key.Translate(TargetPawn.LabelIndefinite(), Whore.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, Whore, MessageTypeDefOf.TaskCompletion); } else { const string key = "RJW_VisitorAcceptWhore"; string text = key.Translate(TargetPawn.LabelIndefinite(), Whore.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, TargetPawn, MessageTypeDefOf.TaskCompletion); } } else { MoteMaker.ThrowMetaIcon(TargetPawn.Position, TargetPawn.Map, ThingDefOf.Mote_IncapIcon); TargetPawn.needs.mood.thoughts.memories.TryGainMemory( TargetPawn.Faction == Whore.Faction ? ThoughtDef.Named("RJWTurnedDownWhore") : ThoughtDef.Named("RJWFailedSolicitation"), Whore); if (xxx.RomanceDiversifiedIsActive) { Whore.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("RebuffedMyHookupAttempt"), TargetPawn); TargetPawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("FailedHookupAttemptOnMe"), Whore); extraSentencePacks.Add(RulePackDef.Named("HookupFailed")); } //Disabled rejection notifications //Messages.Message("RJW_VisitorRejectWhore".Translate(new object[] { xxx.get_pawnname(TargetPawn), xxx.get_pawnname(Whore) }), TargetPawn, MessageTypeDefOf.SilentInput); } if (xxx.RomanceDiversifiedIsActive) { Find.PlayLog.Add(new PlayLogEntry_Interaction(DefDatabase<InteractionDef>.GetNamed("TriedHookupWith"), pawn, TargetPawn, extraSentencePacks)); } }; yield return AwaitResponse; Toil BothGoToBed = new Toil(); BothGoToBed.AddFailCondition(() => !successfulPass || !xxx.CanUse(Whore, TargetBed)); BothGoToBed.defaultCompleteMode = ToilCompleteMode.Instant; BothGoToBed.initAction = delegate { //Log.Message("[RJW]JobDriver_InvitingVisitors::MakeNewToils - BothGoToBed - initAction is called0"); if (!successfulPass) return; if (!xxx.CanUse(Whore, TargetBed) && Whore.CanReserve(TargetPawn, 1, 0)) { //Log.Message("[RJW]JobDriver_InvitingVisitors::MakeNewToils - BothGoToBed - cannot use the whore bed"); return; } //Log.Message("[RJW]JobDriver_InvitingVisitors::MakeNewToils - BothGoToBed - initAction is called1"); Whore.jobs.jobQueue.EnqueueFirst(new Job(xxx.whore_is_serving_visitors, TargetPawn, TargetBed, TargetBed.SleepPosOfAssignedPawn(Whore))); //TargetPawn.jobs.jobQueue.EnqueueFirst(new Job(DefDatabase<JobDef>.GetNamed("WhoreIsServingVisitors"), Whore, TargetBed, (TargetBed.MaxAssignedPawnsCount>1)?TargetBed.GetSleepingSlotPos(1): TargetBed.)), null); Whore.jobs.curDriver.EndJobWith(JobCondition.InterruptOptional); //TargetPawn.jobs.curDriver.EndJobWith(JobCondition.InterruptOptional); }; yield return BothGoToBed; } } }
Mewtopian/rjw
Source/Modules/Whoring/JobDrivers/JobDriver_WhoreInvitingVisitors.cs
C#
mit
7,217
using System.Collections.Generic; using RimWorld; using Verse; using Verse.AI; using Multiplayer.API; namespace rjw { public class JobDriver_WhoreIsServingVisitors : JobDriver { private readonly TargetIndex PartnerInd = TargetIndex.A; private readonly TargetIndex BedInd = TargetIndex.B; private readonly TargetIndex SlotInd = TargetIndex.C; private int ticks_left = 200; private const int ticks_between_hearts = 100; private static readonly ThoughtDef thought_free = ThoughtDef.Named("Whorish_Thoughts"); private static readonly ThoughtDef thought_captive = ThoughtDef.Named("Whorish_Thoughts_Captive"); public Pawn Actor => GetActor(); public Pawn Partner => (Pawn)(job.GetTarget(PartnerInd)); public Building_Bed Bed => (Building_Bed)(job.GetTarget(BedInd)); public IntVec3 WhoreSleepSpot => (IntVec3)job.GetTarget(SlotInd); public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref ticks_left, "ticksLeft"); } private static bool IsInOrByBed(Building_Bed b, Pawn p) { for (int i = 0; i < b.SleepingSlotsCount; i++) { if (b.GetSleepingSlotPos(i).InHorDistOf(p.Position, 1f)) { return true; } } return false; } public override bool TryMakePreToilReservations(bool errorOnFailed) { return pawn.Reserve(Partner, job, 1, 0, null, errorOnFailed); } [SyncMethod] protected override IEnumerable<Toil> MakeNewToils() { //Log.Message("[RJW]JobDriver_WhoreIsServingVisitors::MakeNewToils() - making toils"); this.FailOnDespawnedOrNull(PartnerInd); this.FailOnDespawnedNullOrForbidden(BedInd); //Log.Message("[RJW]JobDriver_WhoreIsServingVisitors::MakeNewToils() fail conditions check " + (Actor is null) + " " + !xxx.CanUse(Actor, Bed) + " " + !Actor.CanReserve(Partner)); this.FailOn(() => Actor is null || !xxx.CanUse(Actor, Bed) || !Actor.CanReserve(Partner)); this.FailOn(() => pawn.Drafted); int price = WhoringHelper.PriceOfWhore(Actor); yield return Toils_Reserve.Reserve(PartnerInd, 1, 0); //yield return Toils_Reserve.Reserve(BedInd, Bed.SleepingSlotsCount, 0); bool partnerHasPenis = Genital_Helper.has_penis(Partner) || Genital_Helper.has_penis_infertile(Partner); Toil gotoWhoreBed = new Toil { initAction = delegate { //Log.Message("[RJW]JobDriver_WhoreIsServingVisitors::MakeNewToils() - gotoWhoreBed initAction is called"); Actor.pather.StartPath(WhoreSleepSpot, PathEndMode.OnCell); Partner.jobs.StopAll(); Partner.pather.StartPath(WhoreSleepSpot, PathEndMode.Touch); }, tickAction = delegate { if (Partner.IsHashIntervalTick(150)) { Partner.pather.StartPath(Actor, PathEndMode.Touch); //Log.Message(xxx.get_pawnname(Partner) + ": I'm following the whore"); } }, defaultCompleteMode = ToilCompleteMode.PatherArrival }; gotoWhoreBed.FailOnWhorebedNoLongerUsable(BedInd, Bed); yield return gotoWhoreBed; Toil waitInBed = new Toil { initAction = delegate { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); //Log.Message("JobDriver_WhoreIsServingVisitors::MakeNewToils() - waitInBed, initAction is called"); ticksLeftThisToil = 5000; ticks_left = (int)(2000.0f * Rand.Range(0.30f, 1.30f)); //Actor.pather.StopDead(); //Let's just make whores standing at the bed //JobDriver curDriver = Actor.jobs.curDriver; //curDriver.layingDown = LayingDownState.LayingInBed; //curDriver.asleep = false; var gettin_loved = new Job(xxx.gettin_loved, Actor, Bed); Partner.jobs.StartJob(gettin_loved, JobCondition.InterruptForced); }, tickAction = delegate { Actor.GainComfortFromCellIfPossible(); if (IsInOrByBed(Bed, Partner)) { //Log.Message("JobDriver_WhoreIsServingVisitors::MakeNewToils() - waitInBed, tickAction pass"); ticksLeftThisToil = 0; } }, defaultCompleteMode = ToilCompleteMode.Delay, }; waitInBed.FailOn(() => pawn.GetRoom() == null); yield return waitInBed; bool canAfford = WhoringHelper.CanAfford(Partner, Actor, price); if (canAfford) { Toil loveToil = new Toil { initAction = delegate { //Actor.jobs.curDriver.ticksLeftThisToil = 1200; //Using ticks_left to control the time of sex //--Log.Message("JobDriver_WhoreIsServingVisitors::MakeNewToils() - loveToil, setting initAction"); /* //Hoge: Whore is just work. no feel cheatedOnMe. if (xxx.HasNonPolyPartner(Actor)) { Pawn pawn = LovePartnerRelationUtility.ExistingLovePartner(Actor); if (((Partner != pawn) && !pawn.Dead) && ((pawn.Map == Actor.Map) || (Rand.Value < 0.15))) { pawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.CheatedOnMe, Actor); } } */ if (xxx.HasNonPolyPartnerOnCurrentMap(Partner)) { Pawn lover = LovePartnerRelationUtility.ExistingLovePartner(Partner); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); // We have to do a few other checks because the pawn might have multiple lovers and ExistingLovePartner() might return the wrong one if (lover != null && Actor != lover && !lover.Dead && (lover.Map == Partner.Map || Rand.Value < 0.25)) { lover.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.CheatedOnMe, Partner); } } if (!partnerHasPenis) Actor.rotationTracker.Face(Partner.DrawPos); }, defaultCompleteMode = ToilCompleteMode.Never, //Changed from Delay }; loveToil.AddPreTickAction(delegate { //Actor.Reserve(Partner, 1, 0); --ticks_left; xxx.reduce_rest(Partner); xxx.reduce_rest(Actor, 2); if (ticks_left <= 0) ReadyForNextToil(); else if (pawn.IsHashIntervalTick(ticks_between_hearts)) { MoteMaker.ThrowMetaIcon(Actor.Position, Actor.Map, ThingDefOf.Mote_Heart); } Actor.GainComfortFromCellIfPossible(); Partner.GainComfortFromCellIfPossible(); }); loveToil.AddFinishAction(delegate { //Log.Message("[RJW] JobDriver_WhoreIsServingVisitors::MakeNewToils() - finished loveToil"); //// Trying to add some interactions and social logs //xxx.processAnalSex(Partner, Actor, ref isAnalSex, partnerHasPenis); }); loveToil.AddFailCondition(() => Partner.Dead || !IsInOrByBed(Bed, Partner)); loveToil.socialMode = RandomSocialMode.Off; yield return loveToil; Toil afterSex = new Toil { initAction = delegate { // Adding interactions, social logs, etc SexUtility.ProcessSex(Actor, Partner, false, false, true); //--Log.Message("JobDriver_WhoreIsServingVisitors::MakeNewToils() - Partner should pay the price now in afterSex.initAction"); int remainPrice = WhoringHelper.PayPriceToWhore(Partner, price, Actor); /*if (remainPrice <= 0) { --Log.Message("JobDriver_WhoreIsServingVisitors::MakeNewToils() - Paying price is success"); } else { --Log.Message("JobDriver_WhoreIsServingVisitors::MakeNewToils() - Paying price failed"); }*/ xxx.UpdateRecords(Actor, price-remainPrice); var thought = (Actor.IsPrisoner) ? thought_captive : thought_free; pawn.needs.mood.thoughts.memories.TryGainMemory(thought); if (SexUtility.ConsiderCleaning(pawn)) { LocalTargetInfo cum = pawn.PositionHeld.GetFirstThing<Filth>(pawn.Map); Job clean = new Job(JobDefOf.Clean); clean.AddQueuedTarget(TargetIndex.A, cum); pawn.jobs.jobQueue.EnqueueFirst(clean); } }, defaultCompleteMode = ToilCompleteMode.Instant }; yield return afterSex; } } } }
Mewtopian/rjw
Source/Modules/Whoring/JobDrivers/JobDriver_WhoreIsServingVisitors.cs
C#
mit
7,755
using System.Collections.Generic; using System.Linq; using RimWorld; using Verse; using Verse.AI; using Multiplayer.API; namespace rjw { public class JobGiver_WhoreInvitingVisitors : ThinkNode_JobGiver { // Checks if pawn has a memory. // Maybe not the best place for function, might be useful elsewhere too. public static bool MemoryChecker(Pawn pawn, ThoughtDef thought) { Thought_Memory val = pawn.needs.mood.thoughts.memories.Memories.Find((Thought_Memory x) => (object)x.def == thought); return val == null ? false : true; } [SyncMethod] private static bool Roll_to_skip(Pawn client, Pawn whore) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); float fuckability = xxx.would_fuck(client, whore); // 0.0 to 1. // More likely to skip other whores, because they're supposed to be working. if (client.IsDesignatedService()) fuckability *= 0.6f; return fuckability >= 0.1f && xxx.need_some_sex(client) >= 1f && Rand.Chance(0.5f); } /* public static Pawn Find_pawn_to_fuck(Pawn whore, Map map) { Pawn best_fuckee = null; float best_distance = 1.0e6f; foreach (Pawn q in map.mapPawns.FreeColonists) if ((q != whore) && xxx.need_some_sex(q)>0 && whore.CanReserve(q, 1, 0) && q.CanReserve(whore, 1, 0) && Roll_to_skip(whore, q) && (!q.Position.IsForbidden(whore)) && xxx.is_healthy(q)) { var dis = whore.Position.DistanceToSquared(q.Position); if (dis < best_distance) { best_fuckee = q; best_distance = dis; } } return best_fuckee; } */ private sealed class FindAttractivePawnHelper { internal Pawn whore; internal bool TraitCheckFail(Pawn client) { if (!xxx.is_human(client)) return true; if (!xxx.has_traits(client)) return true; if (!(xxx.can_fuck(client) || xxx.can_be_fucked(client)) || !xxx.IsTargetPawnOkay(client)) return true; //Log.Message("client:" + client + " whore:" + whore); if (CompRJW.CheckPreference(client, whore) == false) return true; return false; // Everything ok. } //Use this check when client is not in the same faction as the whore internal bool FactionCheckPass(Pawn client) { return ((client.Map == whore.Map) && (client.Faction != null && client.Faction != whore.Faction) && !client.IsPrisoner && !client.HostileTo(whore)); } //Use this check when client is in the same faction as the whore internal bool RelationCheckPass(Pawn client) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (xxx.isSingleOrPartnerNotHere(client) || xxx.is_lecher(client) || Rand.Value < 0.9f) { if (client != LovePartnerRelationUtility.ExistingLovePartner(whore)) { //Exception for prisoners to account for PrisonerWhoreSexualEmergencyTree, which allows prisoners to try to hook up with anyone who's around (mostly other prisoners or warden) return (client != whore) & (client.Map == whore.Map) && (client.Faction == whore.Faction || whore.IsPrisoner) && (client.IsColonist || whore.IsPrisoner) && WhoringHelper.IsHookupAppealing(whore, client); } } return false; } } [SyncMethod] public static Pawn FindAttractivePawn(Pawn whore, out int price) { price = 0; if (whore == null || xxx.is_asexual(whore)) { return null; } //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); FindAttractivePawnHelper client = new FindAttractivePawnHelper { whore = whore }; price = WhoringHelper.PriceOfWhore(whore); int priceOfWhore = price; IntVec3 pos = whore.Position; IEnumerable<Pawn> potentialClients = whore.Map.mapPawns.AllPawnsSpawned; potentialClients = potentialClients.Where(x => x != whore && !x.IsForbidden(whore) && !x.HostileTo(whore) && !x.IsPrisoner && x.Position.DistanceTo(pos) < 100 && whore.CanReserveAndReach(x, PathEndMode.ClosestTouch, Danger.Some, 1) && xxx.is_healthy_enough(x)); potentialClients = potentialClients.Except(potentialClients.Where(client.TraitCheckFail)); if (!potentialClients.Any()) return null; //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn whore: " + xxx.get_pawnname(whore)); //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of potential clients pass1 " + potentialClients.Count()); List<Pawn> valid_targets = new List<Pawn>(); foreach (Pawn target in potentialClients) { if(xxx.can_path_to_target(whore, target.Position)) valid_targets.Add(target); } IEnumerable<Pawn> guestsSpawned = valid_targets.Where(x => x.Faction != whore.Faction && WhoringHelper.CanAfford(x, whore, priceOfWhore) && !MemoryChecker(x, ThoughtDef.Named("RJWFailedSolicitation")) && x != LovePartnerRelationUtility.ExistingLovePartner(whore)); //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of potential clients pass2 " + potentialClients.Count()); if (guestsSpawned.Any()) { //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of acceptable guests " + guestsSpawned.Count()); return guestsSpawned.RandomElement(); } //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn - found no guests, trying colonists"); if (!WhoringHelper.WillPawnTryHookup(whore)) { return null; } IEnumerable<Pawn> freeColonists = valid_targets.Where(x => x.Faction == whore.Faction && Roll_to_skip(x, whore)); //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of free colonists " + freeColonists.Count()); freeColonists = freeColonists.Where(x => client.RelationCheckPass(x) && !MemoryChecker(x, ThoughtDef.Named("RJWTurnedDownWhore"))); //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of acceptable colonists " + freeColonists.Count()); if (freeColonists.Any()) { //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of acceptable guests " + guestsSpawned.Count()); return freeColonists.RandomElement(); } return null; } protected override Job TryGiveJob(Pawn pawn) { // Most things are now checked in the ThinkNode_ConditionalWhore. if (pawn.Drafted) return null; if (MP.IsInMultiplayer) return null; //fix error someday, maybe //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::TryGiveJob( " + xxx.get_pawnname(pawn) + " ) called"); if (!SexUtility.ReadyForLovin(pawn)) { //Whores need rest too, but this'll reduxe the wait a bit every it triggers. pawn.mindState.canLovinTick -= 40; return null; } int price; Pawn client = FindAttractivePawn(pawn, out price); //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::TryGiveJob( " + xxx.get_pawnname(pawn) + " ) called1 - pawn2 is " + (pawn2 == null ? "NULL" : xxx.get_pawnname(pawn2))); if (client == null) { return null; } Building_Bed whorebed = xxx.FindBed(pawn); if (whorebed == null || !xxx.CanUse(pawn, whorebed) || !client.CanReach(whorebed, PathEndMode.OnCell, Danger.Some)) { return null; } //Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::TryGiveJob( " + xxx.get_pawnname(pawn) + " ) whore - " + xxx.get_pawnname(client) + " is client."); //whorebed.priceOfWhore = price; return new Job(xxx.whore_inviting_visitors, client, whorebed); } } }
Mewtopian/rjw
Source/Modules/Whoring/JobGivers/JobGiver_WhoreInvitingVisitors.cs
C#
mit
7,492
namespace rjw { //This class is not used now. /* public class ThinkNode_ChancePerHour_Whore : ThinkNode_ChancePerHour { protected override float MtbHours(Pawn pawn) { // Use the fappin mtb hours as the base number b/c it already accounts for things like age var base_mtb = xxx.config.whore_mtbh_mul * ThinkNode_ChancePerHour_Fappin.get_fappin_mtb_hours(pawn); if (base_mtb < 0.0f) return -1.0f; float desire_factor; { var need_sex = pawn.needs.TryGetNeed<Need_Sex>(); if (need_sex != null) { if (need_sex.CurLevel <= need_sex.thresh_frustrated()) desire_factor = 0.15f; else if (need_sex.CurLevel <= need_sex.thresh_horny()) desire_factor = 0.60f; else desire_factor = 1.00f; } else desire_factor = 1.00f; } float personality_factor; { personality_factor = 1.0f; if (pawn.story != null) { foreach (var trait in pawn.story.traits.allTraits) { if (trait.def == xxx.nymphomaniac) personality_factor *= 0.25f; else if (trait.def == TraitDefOf.Greedy) personality_factor *= 0.50f; else if (xxx.RomanceDiversifiedIsActive&&(trait.def==xxx.philanderer || trait.def == xxx.polyamorous)) personality_factor *= 0.75f; else if (xxx.RomanceDiversifiedIsActive && (trait.def == xxx.faithful)&& LovePartnerRelationUtility.HasAnyLovePartner(pawn)) personality_factor *= 30f; } } } float fun_factor; { if ((pawn.needs.joy != null) && (xxx.is_nympho(pawn))) fun_factor = Mathf.Clamp01(0.50f + pawn.needs.joy.CurLevel); else fun_factor = 1.00f; } var gender_factor = (pawn.gender == Gender.Male) ? 1.0f : 3.0f; return base_mtb * desire_factor * personality_factor * fun_factor * gender_factor; } } */ }
Mewtopian/rjw
Source/Modules/Whoring/ThinkTreeNodes/ThinkNode_ChancePerHour_Whore.cs
C#
mit
1,781
using Verse; using Verse.AI; using RimWorld; namespace rjw { /// <summary> /// Whore/prisoner look for customers /// </summary> public class ThinkNode_ConditionalWhore : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { // No animal whorin' for now. if (xxx.is_animal(p)) return false; if (!InteractionUtility.CanInitiateInteraction(p)) return false; if (DebugSettings.alwaysDoLovin) return true; return xxx.is_whore(p) || RJWSettings.WildMode; } } }
Mewtopian/rjw
Source/Modules/Whoring/ThinkTreeNodes/ThinkNode_ConditionalWhore.cs
C#
mit
511
using RimWorld; using Verse; using System; using System.Collections.Generic; namespace rjw { /// <summary> /// Extends the standard thought to add a counter for the whore stages /// </summary> class ThoughtDef_Whore : ThoughtDef { public List<int> stageCounts = new List<int>(); public int storyOffset = 0; } class ThoughtWorker_Whore : Thought_Memory { public static readonly HashSet<string> backstories = new HashSet<string>(DefDatabase<StringListDef>.GetNamed("WhoreBackstories").strings); protected readonly RecordDef whore_count = DefDatabase<RecordDef>.GetNamed("CountOfWhore"); protected List<int> stages { get {return ((ThoughtDef_Whore)def).stageCounts; } } protected int storyOffset { get { return ((ThoughtDef_Whore)def).storyOffset; } } //protected virtual readonly List<int> stages = new List<int>() { 10, 40}; //protected virtual readonly int story_offset = 10; public override int CurStageIndex { get { //Log.Message("Static fields are not null " + !(backstories is null) + !(whore_count is null)); var c = pawn.records.GetAsInt(whore_count); //Log.Message("Whore count of " + pawn + " is " + c); var b = backstories.Contains(pawn.story?.adulthood?.titleShort) ? storyOffset : 0; //Log.Message("Got offset " + b); var score = c + b; if (score > stages[stages.Count-1]) { return stages.Count - 1; } //Log.Message("Starting search"); var stage = stages.FindLastIndex(v => score > v)+1; //Log.Message("Search done, stage is " + stage); return stage; } } } }
Mewtopian/rjw
Source/Modules/Whoring/Thoughts/ThoughtWorker_Whore.cs
C#
mit
1,574
// #define TESTMODE // Uncomment to enable logging. using Verse; using Verse.AI; using System.Collections.Generic; using System.Linq; using RimWorld; using System.Diagnostics; using System; using UnityEngine; using Verse.AI.Group; using Multiplayer.API; namespace rjw { /// <summary> /// Helper for whoring related stuff /// </summary> public class WhoringHelper { private static readonly SimpleCurve whoring_age_curve = new SimpleCurve { // life expectancy to price modifier new CurvePoint(0.15f, 0f), // 12 by human age, No whoring allowed for underage. new CurvePoint(0.22f, 1.5f), // 18 new CurvePoint(0.3f, 1.4f), // 24 new CurvePoint(0.4f, 1f), // 32 new CurvePoint(0.6f, 0.75f), // 48 new CurvePoint(1.0f, 0.5f), // 80 new CurvePoint(5.0f, 0.5f), // Lifespan extended by bionics, misconfigurated alien races, etc. }; public static int WhoreMinPrice(Pawn whore) { float min_price = 20f; min_price *= whoring_age_curve.Evaluate(SexUtility.ScaleToHumanAge(whore)); if (xxx.has_traits(whore)) { if (xxx.IndividualityIsActive && whore.story.traits.HasTrait(TraitDef.Named("SYR_Haggler"))) min_price *= 1.5f; if (whore.story.traits.DegreeOfTrait(TraitDefOf.Industriousness) == 2) // Industrious min_price *= 1.5f; if (whore.story.traits.DegreeOfTrait(TraitDefOf.NaturalMood) == -2) // Depressive min_price *= 0.5f; if (whore.story.traits.HasTrait(TraitDefOf.CreepyBreathing)) min_price *= 0.75f; if (whore.story.traits.HasTrait(TraitDefOf.Beauty)) { switch (whore.story.traits.DegreeOfTrait(TraitDefOf.Beauty)) { case 2: min_price *= 3f; break; case 1: min_price *= 1.5f; break; case -1: min_price *= 0.5f; break; case -2: min_price *= 0.2f; break; } } if (xxx.is_masochist(whore)) // Won't haggle, may settle for low price min_price *= 0.7f; if (xxx.is_nympho(whore)) // Same as above min_price *= 0.4f; } min_price *= WhoreInjuryAdjustment(whore); if (whore.ownership.OwnedRoom != null) min_price *= WhoreRoomAdjustment(whore); return (int)min_price; } public static int WhoreMaxPrice(Pawn whore) { float max_price = 40f; max_price *= whoring_age_curve.Evaluate(SexUtility.ScaleToHumanAge(whore)); if (whore.gender == Gender.Female) max_price *= 1.2f; if (xxx.has_traits(whore)) { if (whore.story.traits.HasTrait(TraitDefOf.Greedy)) max_price *= 2f; if (xxx.IndividualityIsActive && whore.story.traits.HasTrait(TraitDef.Named("SYR_Haggler"))) max_price *= 1.5f; if (whore.story.traits.DegreeOfTrait(TraitDefOf.Industriousness) == 2) // Industrious max_price *= 1.5f; if (whore.story.traits.DegreeOfTrait(TraitDefOf.Industriousness) == 1) // Hard Worker max_price *= 1.2f; if (whore.story.traits.HasTrait(TraitDefOf.CreepyBreathing)) max_price *= 0.75f; if (whore.story.traits.HasTrait(TraitDefOf.Beauty)) { switch (whore.story.traits.DegreeOfTrait(TraitDefOf.Beauty)) { case 2: max_price *= 3.5f; break; case 1: max_price *= 2f; break; case -1: max_price *= 0.8f; break; case -2: max_price *= 0.6f; break; } } } max_price *= WhoreInjuryAdjustment(whore); if (whore.ownership.OwnedRoom != null) max_price *= WhoreRoomAdjustment(whore); return (int)max_price; } public static float WhoreInjuryAdjustment(Pawn whore) { float modifier = 1.0f; int injuries = whore.health.hediffSet.hediffs.Count(x => x.Visible && x.def.everCurableByItem && x.IsPermanent()); if (injuries == 0) return modifier; while (injuries > 0) { modifier *= 0.85f; injuries--; } return modifier; } public static float WhoreRoomAdjustment(Pawn whore) { float room_multiplier = 1f; Room ownedRoom = whore.ownership.OwnedRoom; if (ownedRoom == null) return 0f; //Room sharing is not liked by patrons room_multiplier = room_multiplier / (2 * (ownedRoom.Owners.Count() - 1) + 1); int scoreStageIndex = RoomStatDefOf.Impressiveness.GetScoreStageIndex(ownedRoom.GetStat(RoomStatDefOf.Impressiveness)); //Room impressiveness factor //0 < scoreStageIndex < 10 (Last time checked) //3 is mediocore if (scoreStageIndex == 0) { room_multiplier *= 0.3f; } if (scoreStageIndex > 3) { room_multiplier *= 1 + (scoreStageIndex - 3) / 3; } //top room triples the price return room_multiplier; } [SyncMethod] public static int PriceOfWhore(Pawn whore) { float NeedSexFactor = xxx.need_some_sex(whore) > 1 ? 1 - xxx.need_some_sex(whore) / 8 : 1f; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); float price = Rand.Range(WhoreMinPrice(whore), WhoreMaxPrice(whore)); price *= NeedSexFactor; //--Log.Message("[RJW] xxx::PriceOfWhore - price is " + price); return (int)Math.Round(price); } public static bool CanAfford(Pawn targetPawn, Pawn whore, int priceOfWhore = -1) { if (targetPawn.Faction == whore.Faction) return true; int price = priceOfWhore < 0 ? PriceOfWhore(whore) : priceOfWhore; if (price == 0) return true; Lord lord = targetPawn.GetLord(); Faction faction = targetPawn.Faction; int totalAmountOfSilvers = targetPawn.inventory.innerContainer.TotalStackCountOfDef(ThingDefOf.Silver); if (faction != null) { List<Pawn> caravanMembers = targetPawn.Map.mapPawns.PawnsInFaction(targetPawn.Faction).Where(x => x.GetLord() == lord && x.inventory?.innerContainer?.TotalStackCountOfDef(ThingDefOf.Silver) > 0).ToList(); if (!caravanMembers.Any()) { //--Log.Message("[RJW]CanAfford::(" + xxx.get_pawnname(targetPawn) + "," + xxx.get_pawnname(whore) + ") - totalAmountOfSilvers is " + totalAmountOfSilvers); return totalAmountOfSilvers >= price; } totalAmountOfSilvers += caravanMembers.Sum(animal => animal.inventory.innerContainer.TotalStackCountOfDef(ThingDefOf.Silver)); } //Log.Message("[RJW]CanAfford:: caravan can afford the price: " + (totalAmountOfSilvers >= price)); return totalAmountOfSilvers >= price; } //priceOfWhore is assumed >=0, and targetPawn is assumed to be able to pay the price(either by caravan, or by himself) //This means that targetPawn has total stackcount of silvers >= priceOfWhore. public static int PayPriceToWhore(Pawn targetPawn, int priceOfWhore, Pawn whore) { int AmountLeft = priceOfWhore; if (targetPawn.Faction == whore.Faction || priceOfWhore == 0) { //--Log.Message("[RJW] xxx::PayPriceToWhore - No need to pay price"); return AmountLeft; } Lord lord = targetPawn.GetLord(); //Caravan guestCaravan = Find.WorldObjects.Caravans.Where(x => x.Spawned && x.ContainsPawn(targetPawn) && x.Faction == targetPawn.Faction && !x.IsPlayerControlled).FirstOrDefault(); List<Pawn> caravanAnimals = targetPawn.Map.mapPawns.PawnsInFaction(targetPawn.Faction).Where(x => x.GetLord() == lord && x.inventory?.innerContainer != null && x.inventory.innerContainer.TotalStackCountOfDef(ThingDefOf.Silver) > 0).ToList(); IEnumerable<Thing> TraderSilvers; if (!caravanAnimals.Any()) { TraderSilvers = targetPawn.inventory.innerContainer.Where(x => x.def == ThingDefOf.Silver); foreach (Thing silver in TraderSilvers) { if (AmountLeft <= 0) return AmountLeft; int dropAmount = silver.stackCount >= AmountLeft ? AmountLeft : silver.stackCount; if (targetPawn.inventory.innerContainer.TryDrop(silver, whore.Position, whore.Map, ThingPlaceMode.Near, dropAmount, out Thing resultingSilvers)) { if (resultingSilvers is null) { //--Log.Message("[RJW] xxx::PayPriceToWhore - silvers is null0"); return AmountLeft; } AmountLeft -= resultingSilvers.stackCount; if (AmountLeft <= 0) { return AmountLeft; } } else { //--Log.Message("[RJW] xxx::PayPriceToWhore - TryDrop failed0"); return AmountLeft; } } return AmountLeft; } foreach (Pawn animal in caravanAnimals) { TraderSilvers = animal.inventory.innerContainer.Where(x => x.def == ThingDefOf.Silver); foreach (Thing silver in TraderSilvers) { if (AmountLeft <= 0) return AmountLeft; int dropAmount = silver.stackCount >= AmountLeft ? AmountLeft : silver.stackCount; if (animal.inventory.innerContainer.TryDrop(silver, whore.Position, whore.Map, ThingPlaceMode.Near, dropAmount, out Thing resultingSilvers)) { if (resultingSilvers is null) { //--Log.Message("[RJW] xxx::PayPriceToWhore - silvers is null1"); return AmountLeft; } AmountLeft -= resultingSilvers.stackCount; if (AmountLeft <= 0) { return AmountLeft; } } } } return AmountLeft; } [SyncMethod] public static bool IsHookupAppealing(Pawn target, Pawn whore) { if (PawnUtility.WillSoonHaveBasicNeed(target)) { //Log.Message("IsHookupAppealing - fail: " + xxx.get_pawnname(target) + " has need to do"); return false; } float num = target.relations.SecondaryRomanceChanceFactor(whore) / 1.5f; if (xxx.need_some_sex(target) > 2f) { num *= 3.0f; } else if (xxx.need_some_sex(target) > 1f) { num *= 2.0f; } if (xxx.is_zoophile(target) && !xxx.is_animal(whore)) { num *= 0.5f; } if (xxx.AlienFrameworkIsActive) { if (xxx.is_xenophile(target)) { if (target.def.defName == whore.def.defName) num *= 0.5f; // Same species, xenophile less interested. else num *= 1.5f; // Different species, xenophile more interested. } else if (xxx.is_xenophobe(target)) { if (target.def.defName != whore.def.defName) num *= 0.25f; // Different species, xenophobe less interested. } } num *= 0.8f + ((float)whore.skills.GetSkill(SkillDefOf.Social).Level / 40); // 0.8 to 1.3 num *= Mathf.InverseLerp(-100f, 0f, target.relations.OpinionOf(whore)); //Log.Message("IsHookupAppealing - score: " + num); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); return Rand.Range(0.05f, 1f) < num; } // Summary: // Check if the pawn is willing to hook up. Checked for both target and the whore. [SyncMethod] public static bool WillPawnTryHookup(Pawn target) { if (xxx.RomanceDiversifiedIsActive && target.story.traits.HasTrait(xxx.asexual)) { return false; } Pawn lover = LovePartnerRelationUtility.ExistingMostLikedLovePartner(target, false); if (lover == null) { return true; } float num = target.relations.OpinionOf(lover); float num2 = Mathf.InverseLerp(30f, -80f, num); if (xxx.is_prude(target)) { num2 = 0f; } else if (xxx.is_lecher(target)) { //Lechers are always up for it. num2 = Mathf.InverseLerp(100f, 50f, num); } else if (target.Map == lover.Map) { //Less likely to cheat if the lover is on the same map. num2 = Mathf.InverseLerp(70f, 15f, num); } //else default values if (xxx.need_some_sex(target) > 2) { num2 *= 1.8f; } else if (xxx.need_some_sex(target) > 1) { num2 *= 1.4f; } num2 /= 1.5f; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); return Rand.Range(0f, 1f) < num2; } } }
Mewtopian/rjw
Source/Modules/Whoring/Whoring_Helper.cs
C#
mit
11,439
using System; using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Need_Sex : Need_Seeker { private bool isInvisible => pawn.Map == null; private bool BootStrapTriggered = false; protected static readonly HashSet<string> Sex_Need_filter = new HashSet<string>(DefDatabase<StringListDef>.GetNamed("Sex_Need_filter").strings); private int needsex_tick = needsex_tick_timer; public const int needsex_tick_timer = 10; private static float decay_per_day = 0.3f; private float decay_rate_modifier = RJWSettings.sexneed_decay_rate; public float thresh_frustrated() { return 0.05f; } public float thresh_horny() { return 0.25f; } public float thresh_neutral() { return 0.50f; } public float thresh_satisfied() { return 0.75f; } public float thresh_ahegao() { return 0.95f; } public Need_Sex(Pawn pawn) : base(pawn) { //if (xxx.is_mechanoid(pawn)) return; //Added by nizhuan-jjr:Misc.Robots are not allowed to have sex, so they don't need sex actually. threshPercents = new List<float> { thresh_frustrated(), thresh_horny(), thresh_neutral(), thresh_satisfied(), thresh_ahegao() }; } public static float brokenbodyfactor(Pawn pawn) { //This adds in the broken body system float broken_body_factor = 1f; if (pawn.health.hediffSet.HasHediff(xxx.feelingBroken)) { switch (pawn.health.hediffSet.GetFirstHediffOfDef(xxx.feelingBroken).CurStageIndex) { case 0: return 0.75f; case 1: return 1.4f; case 2: return 2f; } } return broken_body_factor; } public static float druggedfactor(Pawn pawn) { //This adds in the drugged/shroom system if (pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomAddiction"))) { if (!xxx.is_nympho(pawn)) { pawn.story.traits.GainTrait(new Trait(xxx.nymphomaniac)); //Log.Message(xxx.get_pawnname(pawn) + " is HumpShroomAddicted, not nymphomaniac, adding nymphomaniac trait"); } } if (pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomAddiction")) && !pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomEffect"))) { //Log.Message("[RJW]Need_Sex::druggedfactor 0.5 pawn is " + xxx.get_pawnname(pawn)); return 0.5f; } if (pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomEffect"))) { //Log.Message("[RJW]Need_Sex::druggedfactor 3 pawn is " + xxx.get_pawnname(pawn)); return 3f; } //Log.Message("[RJW]Need_Sex::druggedfactor 1 pawn is " + xxx.get_pawnname(pawn)); return 1f; } static float diseasefactor(Pawn pawn) { if (pawn.health.hediffSet.HasHediff(HediffDef.Named("Boobitis"))) { return 3f; } return 1f; } public override void NeedInterval() //150 ticks between each calls { if (isInvisible) return; if (needsex_tick <= 0) { std_updater.update(pawn); if (xxx.is_asexual(pawn)) return; //--Log.Message("[RJW]Need_Sex::NeedInterval is called0 - pawn is "+xxx.get_pawnname(pawn)); needsex_tick = needsex_tick_timer; //age = age / maxage; if (!def.freezeWhileSleeping || pawn.Awake()) { decay_rate_modifier = RJWSettings.sexneed_decay_rate * xxx.get_sex_drive(pawn); //every 200 calls will have a real functioning call var fall_per_tick = //def.fallPerDay * decay_per_day * brokenbodyfactor(pawn) * druggedfactor(pawn) * diseasefactor(pawn) * (((Genital_Helper.has_penis(pawn) || Genital_Helper.has_penis_infertile(pawn)) && Genital_Helper.has_vagina(pawn)) ? 2.0f : 1.0f) / 60000.0f; //--Log.Message("[RJW]Need_Sex::NeedInterval is called - pawn is " + xxx.get_pawnname(pawn) + " is has both genders " + (Genital_Helper.has_penis(pawn) && Genital_Helper.has_vagina(pawn))); //Log.Message("[RJW] " + xxx.get_pawnname(pawn) + "'s sex need stats:: fall_per_tick: " + fall_per_tick + ", sex_need_factor_from_lifestage: " + sex_need_factor_from_lifestage(pawn) ); var fall_per_call = 150 * fall_per_tick * needsex_tick_timer; CurLevel -= fall_per_call * decay_rate_modifier; // Each day has 60000 ticks, each hour has 2500 ticks, so each hour has 50/3 calls, in other words, each call takes .06 hour. //Log.Message("[RJW] " + xxx.get_pawnname(pawn) + "'s sex need stats:: Decay/call: " + fall_per_call * decay_rate_modifier + ", Cur.lvl: " + CurLevel + ", Dec. rate: " + decay_rate_modifier); } //--Log.Message("[RJW]Need_Sex::NeedInterval is called1"); //If they need it, they should seek it if (CurLevel < thresh_horny() && (pawn.mindState.canLovinTick - Find.TickManager.TicksGame > 300) ) { pawn.mindState.canLovinTick = Find.TickManager.TicksGame + 300; } // the bootstrap of the mapInjector will only be triggered once per visible pawn. if (!BootStrapTriggered) { //--Log.Message("[RJW]Need_Sex::NeedInterval::calling boostrap - pawn is " + xxx.get_pawnname(pawn)); xxx.bootstrap(pawn.Map); BootStrapTriggered = true; } } else { needsex_tick--; } //--Log.Message("[RJW]Need_Sex::NeedInterval is called2 - needsex_tick is "+needsex_tick); } } }
Mewtopian/rjw
Source/Needs/Need_Sex.cs
C#
mit
5,259
using System; using Verse; using RimWorld; using System.Linq; using System.Collections.Generic; namespace rjw { /// <summary> /// Looks up and returns a BodyPartTagDef defined in the XML /// </summary> public static class BodyPartTagDefOf { public static BodyPartTagDef RJW_FertilitySource { get { if (a == null) a = (BodyPartTagDef)GenDefDatabase.GetDef(typeof(BodyPartTagDef), "RJW_FertilitySource"); return a; } } private static BodyPartTagDef a; } }
Mewtopian/rjw
Source/PawnCapacities/BodyPartTagDefOf.cs
C#
mit
490
using RimWorld; using System; using System.Collections.Generic; using UnityEngine; using Verse; namespace rjw { /// <summary> /// Calculates a pawn's fertility based on its age and fertility sources /// </summary> public class PawnCapacityWorker_Fertility : PawnCapacityWorker { private readonly HashSet<String> Fertility_filter = new HashSet<string>(DefDatabase<StringListDef>.GetNamed("Fertility_filter").strings); public override float CalculateCapacityLevel(HediffSet diffSet, List<PawnCapacityUtility.CapacityImpactor> impactors = null) { Pawn pawn = diffSet.pawn; if (!Genital_Helper.has_penis(pawn) && !Genital_Helper.has_vagina(pawn)) return 0; if (Genital_Helper.has_ovipositorF(pawn) || Genital_Helper.has_ovipositorM(pawn)) return 0; //Log.Message("[RJW]PawnCapacityWorker_Fertility::CalculateCapacityLevel is called for: " + xxx.get_pawnname(pawn)); RaceProperties race = diffSet.pawn.RaceProps; if (Fertility_filter.Contains(pawn.kindDef.defName)) { //Log.Message(" Fertility_filter, no fertility for : " + pawn.kindDef.defName); return 0f; } //androids only fertile with archotech parts if (AndroidsCompatibility.IsAndroid(pawn) && !(AndroidsCompatibility.AndroidPenisFertility(pawn) || AndroidsCompatibility.AndroidVaginaFertility(pawn))) { //Log.Message(" Android has no archotech genitals set fertility to 0 for: " + pawn.kindDef.defName); return 0f; } //archotech always fertile mode if (pawn.health.hediffSet.HasHediff(HediffDef.Named("FertilityEnhancer"))) { //Log.Message(" has archotech FertilityEnhancer set fertility to 100%"); return 1f; } float startAge = 0f; //raise fertility float startMaxAge = 0f; //max fertility float endAge = race.lifeExpectancy * (RJWPregnancySettings.fertility_endage_male * 0.7f); // Age when males start to lose potency. float zeroFertility = race.lifeExpectancy * RJWPregnancySettings.fertility_endage_male; // Age when fertility hits 0%. if (xxx.is_female(pawn)) { if (xxx.is_animal(pawn)) { endAge = race.lifeExpectancy * (RJWPregnancySettings.fertility_endage_female_animal * 0.6f); zeroFertility = race.lifeExpectancy * RJWPregnancySettings.fertility_endage_female_animal; } else { endAge = race.lifeExpectancy * (RJWPregnancySettings.fertility_endage_female_humanlike * 0.6f); // Age when fertility begins to drop. zeroFertility = race.lifeExpectancy * RJWPregnancySettings.fertility_endage_female_humanlike; // Age when fertility hits 0%. } } foreach (LifeStageAge lifestage in race.lifeStageAges) { if (lifestage.def.reproductive) //presumably teen stage if (startAge == 0f && startMaxAge == 0f) { startAge = lifestage.minAge; startMaxAge = (Mathf.Max(startAge + (startAge + endAge) * 0.08f, startAge)); } //presumably adult stage else { if (startMaxAge > lifestage.minAge) startMaxAge = lifestage.minAge; } } //Log.Message(" Fertility ages for " + pawn.Name + " are: " + startAge + ", " + startMaxAge + ", " + endAge + ", " + endMaxAge); float result = PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.RJW_FertilitySource, 1f, FloatRange.ZeroToOne, impactors); result *= GenMath.FlatHill(startAge, startMaxAge, endAge, zeroFertility, pawn.ageTracker.AgeBiologicalYearsFloat); //Log.Message("[RJW]PawnCapacityWorker_Fertility::CalculateCapacityLevel result is: " + result); return result; } public override bool CanHaveCapacity(BodyDef body) { return body.HasPartWithTag(BodyPartTagDefOf.RJW_FertilitySource); } } }
Mewtopian/rjw
Source/PawnCapacities/PawnCapacityWorker_Fertility.cs
C#
mit
3,675
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_InstallAnus : Recipe_InstallPrivates { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { var gen_blo = Genital_Helper.anus_blocked(p); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if ((!gen_blo) || (part != xxx.anus)) yield return part; } } }
Mewtopian/rjw
Source/Recipes/Install_Part/Recipe_InstallAnus.cs
C#
mit
421
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_InstallBreasts : Recipe_InstallPrivates { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { var gen_blo = Genital_Helper.breasts_blocked(p); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if ((!gen_blo) || (part != xxx.breasts)) yield return part; } } }
Mewtopian/rjw
Source/Recipes/Install_Part/Recipe_InstallBreasts.cs
C#
mit
430
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_InstallGenitals : Recipe_InstallPrivates { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { var gen_blo = Genital_Helper.genitals_blocked(p); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if ((!gen_blo) || (part != xxx.genitals)) yield return part; } } }
Mewtopian/rjw
Source/Recipes/Install_Part/Recipe_InstallGenitals.cs
C#
mit
437
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_InstallPart : rjw_CORE_EXPOSED.Recipe_InstallOrReplaceBodyPart { public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { GenderHelper.Sex before = GenderHelper.GetSex(pawn); base.ApplyOnPawn(pawn, part, billDoer, ingredients, bill); GenderHelper.Sex after = GenderHelper.GetSex(pawn); GenderHelper.ChangeSex(pawn, before, after); } } public class Recipe_InstallGenitals : Recipe_InstallPart { public override bool blocked(Pawn p) { return (Genital_Helper.genitals_blocked(p) || xxx.is_slime(p));//|| xxx.is_demon(p) } } public class Recipe_InstallBreasts : Recipe_InstallPart { public override bool blocked(Pawn p) { return (Genital_Helper.breasts_blocked(p) || xxx.is_slime(p));//|| xxx.is_demon(p) } } public class Recipe_InstallAnus : Recipe_InstallPart { public override bool blocked(Pawn p) { return (Genital_Helper.anus_blocked(p) || xxx.is_slime(p));//|| xxx.is_demon(p) } } }
Mewtopian/rjw
Source/Recipes/Install_Part/Recipe_InstallPart.cs
C#
mit
1,111
using System.Collections.Generic; using RimWorld; using Verse; using System.Linq; using System; namespace rjw { public class Recipe_GrowBreasts : Recipe_Surgery { public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { if (billDoer != null) { if (CheckSurgeryFail(billDoer, pawn, ingredients, part, bill)) { return; } TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[] { billDoer, pawn }); } var oldBoobs = pawn.health.hediffSet.hediffs.FirstOrDefault(hediff => hediff.def == bill.recipe.removesHediff); var newBoobs = bill.recipe.addsHediff; var newSize = BreastSize_Helper.GetSize(newBoobs); GenderHelper.ChangeSex(pawn, () => { BreastSize_Helper.HurtBreasts(pawn, part, 3 * (newSize - 1)); if (pawn.health.hediffSet.PartIsMissing(part)) { return; } if (oldBoobs != null) { pawn.health.RemoveHediff(oldBoobs); } pawn.health.AddHediff(newBoobs, part); }); } public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipeDef) { var chest = Genital_Helper.get_breasts(pawn); if (pawn.health.hediffSet.PartIsMissing(chest) || Genital_Helper.breasts_blocked(pawn)) { yield break; } var old = recipeDef.removesHediff; if (old == null ? BreastSize_Helper.HasNipplesOnly(pawn, chest) : pawn.health.hediffSet.HasHediff(old, chest)) { yield return chest; } } } }
Mewtopian/rjw
Source/Recipes/Recipe_GrowBreasts.cs
C#
mit
1,519
using RimWorld; using System.Collections.Generic; using Verse; namespace rjw { /// <summary> /// Removes heddifs (restraints/cocoon) /// </summary> public class Recipe_RemoveRestraints : Recipe_RemoveHediff { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) { List<Hediff> allHediffs = pawn.health.hediffSet.hediffs; int i = 0; while (true) { if (i >= allHediffs.Count) { yield break; } if (allHediffs[i].def == recipe.removesHediff && allHediffs[i].Visible) { break; } i++; } yield return allHediffs[i].Part; } } }
Mewtopian/rjw
Source/Recipes/Recipe_Restraints.cs
C#
mit
631
using System.Collections.Generic; using RimWorld; using Verse; using System.Linq; using System; namespace rjw { public class Recipe_ShrinkBreasts : Recipe_Surgery { public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { if (billDoer != null) { if (CheckSurgeryFail(billDoer, pawn, ingredients, part, bill)) { return; } TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[] { billDoer, pawn }); } if (!BreastSize_Helper.TryGetBreastSize(pawn, out var oldSize)) { throw new ApplicationException("Recipe_ShrinkBreasts could not find any breasts to shrink."); } var oldBoobs = pawn.health.hediffSet.GetFirstHediffOfDef(BreastSize_Helper.GetHediffDef(oldSize)); var newSize = oldSize - 1; var newBoobs = BreastSize_Helper.GetHediffDef(newSize); // I can't figure out how to spawn a stack of 2 meat. for (var i = 0; i < 2; i++) { GenSpawn.Spawn(pawn.RaceProps.meatDef, billDoer.Position, billDoer.Map); } GenderHelper.ChangeSex(pawn, () => { BreastSize_Helper.HurtBreasts(pawn, part, 5); if (pawn.health.hediffSet.PartIsMissing(part)) { return; } pawn.health.RemoveHediff(oldBoobs); pawn.health.AddHediff(newBoobs, part); }); } public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipeDef) { var chest = Genital_Helper.get_breasts(pawn); if (Genital_Helper.breasts_blocked(pawn)) { yield break; } if (BreastSize_Helper.TryGetBreastSize(pawn, out var size) && size > BreastSize_Helper.GetSize(Genital_Helper.flat_breasts)) { yield return chest; } } } }
Mewtopian/rjw
Source/Recipes/Recipe_ShrinkBreasts.cs
C#
mit
1,728
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemoveAnus : Recipe_RemovePart { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { if (Genital_Helper.has_anus(p)) { bool blocked = Genital_Helper.anus_blocked(p) || xxx.is_slime(p);//|| xxx.is_demon(p) foreach (BodyPartRecord part in p.health.hediffSet.GetNotMissingParts()) if (r.appliedOnFixedBodyParts.Contains(part.def) && (!blocked)) yield return part; } } } }
Mewtopian/rjw
Source/Recipes/Remove_Part/Recipe_RemoveAnus.cs
C#
mit
542
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemoveBreasts : Recipe_RemovePart { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { if (Genital_Helper.has_breasts(p)) { bool blocked = Genital_Helper.breasts_blocked(p) || xxx.is_slime(p);//|| xxx.is_demon(p) foreach (BodyPartRecord part in p.health.hediffSet.GetNotMissingParts()) if (r.appliedOnFixedBodyParts.Contains(part.def) && (!blocked)) yield return part; } } } }
Mewtopian/rjw
Source/Recipes/Remove_Part/Recipe_RemoveBreasts.cs
C#
mit
551
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemoveGenitals : Recipe_RemovePart { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { if (Genital_Helper.has_genitals(p)) { bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p);//|| xxx.is_demon(p) foreach (BodyPartRecord part in p.health.hediffSet.GetNotMissingParts()) if (r.appliedOnFixedBodyParts.Contains(part.def) && (!blocked)) yield return part; } } } }
Mewtopian/rjw
Source/Recipes/Remove_Part/Recipe_RemoveGenitals.cs
C#
mit
554
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemovePart : rjw_CORE_EXPOSED.Recipe_RemoveBodyPart { // Quick and dirty method to guess whether the player is harvesting the genitals or amputating them // due to infection. The core code can't do this properly because it considers the private part // hediffs as "unclean". public override bool blocked(Pawn p) { return xxx.is_slime(p);//|| xxx.is_demon(p) } public bool is_harvest(Pawn p, BodyPartRecord part) { foreach (Hediff hed in p.health.hediffSet.hediffs) { if ((hed.Part?.def == part.def) && hed.def.isBad && (hed.Severity >= 0.70f)) return false; } return true; } public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) { if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked(p)) yield return part; } } public override void ApplyOnPawn(Pawn p, BodyPartRecord part, Pawn doer, List<Thing> ingredients, Bill bill) { var har = is_harvest(p, part); base.ApplyOnPawn(p, part, doer, ingredients, bill); if (har) { if (!p.Dead) { //Log.Message("alive harvest " + part); ThoughtUtility.GiveThoughtsForPawnOrganHarvested(p); } else { //Log.Message("dead harvest " + part); ThoughtUtility.GiveThoughtsForPawnExecuted(p, PawnExecutionKind.OrganHarvesting); } } } public override string GetLabelWhenUsedOn(Pawn p, BodyPartRecord part) { return recipe.label.CapitalizeFirst(); } } /* public class Recipe_RemovePenis : Recipe_RemovePart { public override bool blocked(Pawn p) { return (Genital_Helper.genitals_blocked(p) || !(Genital_Helper.has_penis(p) && Genital_Helper.has_penis_infertile(p) && Genital_Helper.has_ovipositorF(p))); } } public class Recipe_RemoveVagina : Recipe_RemovePart { public override bool blocked(Pawn p) { return (Genital_Helper.genitals_blocked(p) || !Genital_Helper.has_vagina(p)); } } public class Recipe_RemoveGenitals : Recipe_RemovePart { public override bool blocked(Pawn p) { return (Genital_Helper.genitals_blocked(p) || !Genital_Helper.has_genitals(p)); } } public class Recipe_RemoveBreasts : Recipe_RemovePart { public override bool blocked(Pawn p) { return (Genital_Helper.breasts_blocked(p) || !Genital_Helper.has_breasts(p)); } } public class Recipe_RemoveAnus : Recipe_RemovePart { public override bool blocked(Pawn p) { return (Genital_Helper.anus_blocked(p) || !Genital_Helper.has_anus(p)); } } */ }
Mewtopian/rjw
Source/Recipes/Remove_Part/Recipe_RemovePart.cs
C#
mit
2,689
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemovePenis : Recipe_RemovePart { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { if (Genital_Helper.has_penis(p) || Genital_Helper.has_penis_infertile(p) || Genital_Helper.has_ovipositorF(p)) { bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p); foreach (var part in p.health.hediffSet.GetNotMissingParts()) if (r.appliedOnFixedBodyParts.Contains(part.def) && (!blocked)) yield return part; } } } }
Mewtopian/rjw
Source/Recipes/Remove_Part/Recipe_RemovePenis.cs
C#
mit
595
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemoveVagina : Recipe_RemovePart { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { if (Genital_Helper.has_vagina(p) ) { bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p); foreach (var part in p.health.hediffSet.GetNotMissingParts()) if (r.appliedOnFixedBodyParts.Contains(part.def) && (!blocked)) yield return part; } } } }
Mewtopian/rjw
Source/Recipes/Remove_Part/Recipe_RemoveVagina.cs
C#
mit
520
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_MakeFuta : rjw_CORE_EXPOSED.Recipe_AddBodyPart { public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { GenderHelper.Sex before = GenderHelper.GetSex(pawn); base.ApplyOnPawn(pawn, part, billDoer, ingredients, bill); GenderHelper.Sex after = GenderHelper.GetSex(pawn); GenderHelper.ChangeSex(pawn, before, after); } } //Female to futa public class Recipe_MakeFutaF : Recipe_MakeFuta { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p); //|| xxx.is_demon(p); bool has_vag = Genital_Helper.has_vagina(p); bool has_cock = Genital_Helper.has_penis(p) || Genital_Helper.has_penis_infertile(p) || Genital_Helper.has_ovipositorF(p); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked && (has_vag && !has_cock)) yield return part; } } //Male to futa public class Recipe_MakeFutaM : Recipe_MakeFuta { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p); //|| xxx.is_demon(p); bool has_vag = Genital_Helper.has_vagina(p); bool has_cock = Genital_Helper.has_penis(p) || Genital_Helper.has_penis_infertile(p) || Genital_Helper.has_ovipositorF(p); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked && (!has_vag && has_cock)) yield return part; } } //TODO: maybe merge with above to make single recipe, but meh for now just copy-paste recipes or some filter to disable multiparts if normal part doesnt exist yet //add multi parts public class Recipe_AddMultiPart : Recipe_MakeFuta { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { //dont add artifical - peg, hydraulics, bionics, archo if (r.addsHediff.addedPartProps?.solid ?? false) yield break; //dont add if artifical parts present if (p.health.hediffSet.hediffs.Any((Hediff hed) => (hed.Part != null) && r.appliedOnFixedBodyParts.Contains(hed.Part.def) && (hed.def.addedPartProps?.solid ?? false))) yield break; //cant install parts when part blocked, on slimes, on demons bool blocked = (xxx.is_slime(p) //|| xxx.is_demon(p) || (Genital_Helper.genitals_blocked(p) && r.appliedOnFixedBodyParts.Contains(xxx.genitalsDef)) || (Genital_Helper.anus_blocked(p) && r.appliedOnFixedBodyParts.Contains(xxx.anusDef)) || (Genital_Helper.breasts_blocked(p) && r.appliedOnFixedBodyParts.Contains(xxx.breastsDef))); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked) yield return part; } } }
Mewtopian/rjw
Source/Recipes/Transgender/Recipe_MakeFuta.cs
C#
mit
3,016
using System; using UnityEngine; using Verse; namespace rjw { public class RJWDebugSettings : ModSettings { public static void DoWindowContents(Rect inRect) { Listing_Standard listingStandard = new Listing_Standard(); listingStandard.ColumnWidth = inRect.width / 2.05f; listingStandard.Begin(inRect); listingStandard.Gap(4f); listingStandard.CheckboxLabeled("submit_button_enabled".Translate(), ref RJWSettings.submit_button_enabled, "submit_button_enabled_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RJW_designation_box".Translate(), ref RJWSettings.show_RJW_designation_box, "RJW_designation_box_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("StackRjwParts_name".Translate(), ref RJWSettings.StackRjwParts, "StackRjwParts_desc".Translate()); listingStandard.Gap(5f); listingStandard.Label("maxDistancetowalk_name".Translate() + ": " + (RJWSettings.maxDistancetowalk), -1f, "maxDistancetowalk_desc".Translate()); RJWSettings.maxDistancetowalk = listingStandard.Slider((int)RJWSettings.maxDistancetowalk, 0, 5000); //listingStandard.Gap(30f); listingStandard.NewColumn(); listingStandard.Gap(4f); GUI.contentColor = Color.yellow; listingStandard.CheckboxLabeled("WildMode_name".Translate(), ref RJWSettings.WildMode, "WildMode_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("override_RJW_designation_checks_name".Translate(), ref RJWSettings.override_RJW_designation_checks, "override_RJW_designation_checks_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("GenderlessAsFuta_name".Translate(), ref RJWSettings.GenderlessAsFuta, "GenderlessAsFuta_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DevMode_name".Translate(), ref RJWSettings.DevMode, "DevMode_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DebugLogJoinInBed".Translate(), ref RJWSettings.DebugLogJoinInBed, "DebugLogJoinInBed_desc".Translate()); listingStandard.Gap(5f); GUI.contentColor = Color.white; listingStandard.End(); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref RJWSettings.submit_button_enabled, "submit_button_enabled", true, true); Scribe_Values.Look(ref RJWSettings.show_RJW_designation_box, "show_RJW_designation_box", true, true); Scribe_Values.Look(ref RJWSettings.StackRjwParts, "StackRjwParts", false, true); Scribe_Values.Look(ref RJWSettings.maxDistancetowalk, "maxDistancetowalk", 250, true); Scribe_Values.Look(ref RJWSettings.GenderlessAsFuta, "GenderlessAsFuta", false, true); Scribe_Values.Look(ref RJWSettings.WildMode, "Wildmode", false, true); Scribe_Values.Look(ref RJWSettings.override_RJW_designation_checks, "override_RJW_designation_checks", false, true); Scribe_Values.Look(ref RJWSettings.DevMode, "DevMode", false, true); Scribe_Values.Look(ref RJWSettings.DebugLogJoinInBed, "DebugLogJoinInBed", false, true); } } }
Mewtopian/rjw
Source/Settings/RJWDebugSettings.cs
C#
mit
3,094
using System; using UnityEngine; using Verse; namespace rjw { public class RJWHookupSettings : ModSettings { public static bool HookupsEnabled = true; public static bool NoHookupsDuringWorkHours = true; public static bool ColonistsCanHookup = true; public static bool ColonistsCanHookupWithVisitor = false; public static bool CanHookupWithPrisoner = false; public static bool VisitorsCanHookupWithColonists = false; public static bool VisitorsCanHookupWithVisitors = true; public static bool PrisonersCanHookupWithNonPrisoner = false; public static bool PrisonersCanHookupWithPrisoner = false; public static float HookupChanceForNonNymphos = 0.3f; public static float MinimumFuckabilityToHookup = 0.1f; public static float MinimumAttractivenessToHookup = 0.5f; public static float MinimumRelationshipToHookup = 20f; public static bool NymphosCanPickAnyone = true; public static bool NymphosCanCheat = true; public static bool NymphosCanHomewreck = true; public static bool NymphosCanHomewreckReverse = true; public static void DoWindowContents(Rect inRect) { MinimumFuckabilityToHookup = Mathf.Clamp(MinimumFuckabilityToHookup, 0.1f, 1f); MinimumAttractivenessToHookup = Mathf.Clamp(MinimumAttractivenessToHookup, 0.0f, 1f); MinimumRelationshipToHookup = Mathf.Clamp(MinimumRelationshipToHookup, -100, 100); Listing_Standard listingStandard = new Listing_Standard(); listingStandard.ColumnWidth = inRect.width / 2.05f; listingStandard.Begin(inRect); listingStandard.Gap(4f); // Casual sex settings listingStandard.CheckboxLabeled("SettingHookupsEnabled".Translate(), ref HookupsEnabled, "SettingHookupsEnabled_desc".Translate()); listingStandard.CheckboxLabeled("SettingNoHookupsDuringWorkHours".Translate(), ref NoHookupsDuringWorkHours, "SettingNoHookupsDuringWorkHours_desc".Translate()); listingStandard.Gap(10f); listingStandard.CheckboxLabeled("SettingColonistsCanHookup".Translate(), ref ColonistsCanHookup, "SettingColonistsCanHookup_desc".Translate()); listingStandard.CheckboxLabeled("SettingColonistsCanHookupWithVisitor".Translate(), ref ColonistsCanHookupWithVisitor, "SettingColonistsCanHookupWithVisitor_desc".Translate()); listingStandard.CheckboxLabeled("SettingVisitorsCanHookupWithColonists".Translate(), ref VisitorsCanHookupWithColonists, "SettingVisitorsCanHookupWithColonists_desc".Translate()); listingStandard.CheckboxLabeled("SettingVisitorsCanHookupWithVisitors".Translate(), ref VisitorsCanHookupWithVisitors, "SettingVisitorsCanHookupWithVisitors_desc".Translate()); listingStandard.Gap(10f); listingStandard.CheckboxLabeled("SettingPrisonersCanHookupWithNonPrisoner".Translate(), ref PrisonersCanHookupWithNonPrisoner, "SettingPrisonersCanHookupWithNonPrisoner_desc".Translate()); listingStandard.CheckboxLabeled("SettingPrisonersCanHookupWithPrisoner".Translate(), ref PrisonersCanHookupWithPrisoner, "SettingPrisonersCanHookupWithPrisoner_desc".Translate()); listingStandard.CheckboxLabeled("SettingCanHookupWithPrisoner".Translate(), ref CanHookupWithPrisoner, "SettingCanHookupWithPrisoner_desc".Translate()); listingStandard.Gap(10f); listingStandard.CheckboxLabeled("SettingNymphosCanPickAnyone".Translate(), ref NymphosCanPickAnyone, "SettingNymphosCanPickAnyone_desc".Translate()); listingStandard.CheckboxLabeled("SettingNymphosCanCheat".Translate(), ref NymphosCanCheat, "SettingNymphosCanCheat_desc".Translate()); listingStandard.CheckboxLabeled("SettingNymphosCanHomewreck".Translate(), ref NymphosCanHomewreck, "SettingNymphosCanHomewreck_desc".Translate()); listingStandard.CheckboxLabeled("SettingNymphosCanHomewreckReverse".Translate(), ref NymphosCanHomewreckReverse, "SettingNymphosCanHomewreckReverse_desc".Translate()); listingStandard.Gap(10f); listingStandard.Label("SettingHookupChanceForNonNymphos".Translate() + ": " + (int)(HookupChanceForNonNymphos * 100) + "%", -1f, "SettingHookupChanceForNonNymphos_desc".Translate()); HookupChanceForNonNymphos = listingStandard.Slider(HookupChanceForNonNymphos, 0.0f, 1.0f); listingStandard.Label("SettingMinimumFuckabilityToHookup".Translate() + ": " + (int)(MinimumFuckabilityToHookup * 100) + "%", -1f, "SettingMinimumFuckabilityToHookup_desc".Translate()); MinimumFuckabilityToHookup = listingStandard.Slider(MinimumFuckabilityToHookup, 0.1f, 1.0f); // Minimum must be above 0.0 to avoid breaking xxx.would_fuck()'s hard-failure cases that return 0f listingStandard.Label("SettingMinimumAttractivenessToHookup".Translate() + ": " + (int)(MinimumAttractivenessToHookup * 100) + "%", -1f, "SettingMinimumAttractivenessToHookup_desc".Translate()); MinimumAttractivenessToHookup = listingStandard.Slider(MinimumAttractivenessToHookup, 0.0f, 1.0f); listingStandard.Label("SettingMinimumRelationshipToHookup".Translate() + ": " + (MinimumRelationshipToHookup), -1f, "SettingMinimumRelationshipToHookup_desc".Translate()); MinimumRelationshipToHookup = listingStandard.Slider((int)MinimumRelationshipToHookup, -100f, 100f); listingStandard.NewColumn(); listingStandard.Gap(4f); listingStandard.End(); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref HookupsEnabled, "SettingHookupsEnabled", true, true); Scribe_Values.Look(ref NoHookupsDuringWorkHours, "NoHookupsDuringWorkHours", true, true); Scribe_Values.Look(ref ColonistsCanHookup, "SettingColonistsCanHookup", false, true); Scribe_Values.Look(ref ColonistsCanHookupWithVisitor, "SettingColonistsCanHookupWithVisitor", false, true); Scribe_Values.Look(ref VisitorsCanHookupWithColonists, "SettingVisitorsCanHookupWithColonists", false, true); Scribe_Values.Look(ref VisitorsCanHookupWithVisitors, "SettingVisitorsCanHookupWithVisitors", true, true); // Prisoner settings Scribe_Values.Look(ref CanHookupWithPrisoner, "SettingCanHookupWithPrisoner", false, true); Scribe_Values.Look(ref PrisonersCanHookupWithNonPrisoner, "SettingPrisonersCanHookupWithNonPrisoner", false, true); Scribe_Values.Look(ref PrisonersCanHookupWithPrisoner, "SettingPrisonersCanHookupWithPrisoner", false, true); // Nympho settings Scribe_Values.Look(ref NymphosCanPickAnyone, "SettingNymphosCanPickAnyone", true, true); Scribe_Values.Look(ref NymphosCanCheat, "SettingNymphosCanCheat", true, true); Scribe_Values.Look(ref NymphosCanHomewreck, "SettingNymphosCanHomewreck", true, true); Scribe_Values.Look(ref NymphosCanHomewreckReverse, "SettingNymphosCanHomewreckReverse", true, true); Scribe_Values.Look(ref HookupChanceForNonNymphos, "SettingHookupChanceForNonNymphos", 0.3f, true); Scribe_Values.Look(ref MinimumFuckabilityToHookup, "SettingMinimumFuckabilityToHookup", 0.1f, true); Scribe_Values.Look(ref MinimumAttractivenessToHookup, "SettingMinimumAttractivenessToHookup", 0.5f, true); Scribe_Values.Look(ref MinimumRelationshipToHookup, "SettingMinimumRelationshipToHookup", 20f, true); } } }
Mewtopian/rjw
Source/Settings/RJWHookupSettings.cs
C#
mit
6,990
using System; using UnityEngine; using Verse; namespace rjw { public class RJWPregnancySettings : ModSettings { public static bool humanlike_pregnancy_enabled = true; public static bool animal_pregnancy_enabled = true; public static bool bestial_pregnancy_enabled = true; public static bool insect_pregnancy_enabled = true; public static bool egg_pregnancy_implant_anyone = true; public static bool egg_pregnancy_fertilize_anyone = false; public static bool mechanoid_pregnancy_enabled = true; public static bool trait_filtering_enabled = true; public static bool use_parent_method = true; public static bool complex_interspecies = true; public static int animal_impregnation_chance = 25; public static int humanlike_impregnation_chance = 25; public static float interspecies_impregnation_modifier = 0.2f; public static float humanlike_DNA_from_mother = 0.5f; public static float bestial_DNA_from_mother = 1.0f; public static float bestiality_DNA_inheritance = 0.5f; public static float fertility_endage_male = 1.2f; public static float fertility_endage_female_humanlike = 0.58f; public static float fertility_endage_female_animal = 0.96f; private static Vector2 scrollPosition; private static float height_modifier = 100f; public static void DoWindowContents(Rect inRect) { //30f for top page description and bottom close button Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f); //-16 for slider, height_modifier - additional height for options Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier); Listing_Standard listingStandard = new Listing_Standard(); listingStandard.maxOneColumn = true; listingStandard.ColumnWidth = viewRect.width / 2.05f; listingStandard.BeginScrollView(outRect, ref scrollPosition, ref viewRect); listingStandard.Begin(viewRect); listingStandard.Gap(4f); listingStandard.CheckboxLabeled("RJWH_pregnancy".Translate(), ref humanlike_pregnancy_enabled, "RJWH_pregnancy_desc".Translate()); if (humanlike_pregnancy_enabled) { listingStandard.Gap(5f); listingStandard.CheckboxLabeled(" " + "genetic_trait_filter".Translate(), ref trait_filtering_enabled, "genetic_trait_filter_desc".Translate()); } else { trait_filtering_enabled = false; } listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RJWA_pregnancy".Translate(), ref animal_pregnancy_enabled, "RJWA_pregnancy_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RJWB_pregnancy".Translate(), ref bestial_pregnancy_enabled, "RJWB_pregnancy_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RJWI_pregnancy".Translate(), ref insect_pregnancy_enabled, "RJWI_pregnancy_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("egg_pregnancy_implant_anyone".Translate(), ref egg_pregnancy_implant_anyone, "egg_pregnancy_implant_anyone_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("egg_pregnancy_fertilize_anyone".Translate(), ref egg_pregnancy_fertilize_anyone, "egg_pregnancy_fertilize_anyone_desc".Translate()); listingStandard.Gap(12f); listingStandard.CheckboxLabeled("UseParentMethod".Translate(), ref use_parent_method, "UseParentMethod_desc".Translate()); listingStandard.Gap(5f); if (use_parent_method) { if (humanlike_DNA_from_mother == 0.0f) { listingStandard.Label(" " + "OffspringLookLikeTheirMother".Translate() + ": " + "AlwaysFather".Translate(), -1f, "OffspringLookLikeTheirMother_desc".Translate()); humanlike_DNA_from_mother = listingStandard.Slider(humanlike_DNA_from_mother, 0.0f, 1.0f); } else if (humanlike_DNA_from_mother == 1.0f) { listingStandard.Label(" " + "OffspringLookLikeTheirMother".Translate() + ": " + "AlwaysMother".Translate(), -1f, "OffspringLookLikeTheirMother_desc".Translate()); humanlike_DNA_from_mother = listingStandard.Slider(humanlike_DNA_from_mother, 0.0f, 1.0f); } else { int value = (int)(humanlike_DNA_from_mother * 100); listingStandard.Label(" " + "OffspringLookLikeTheirMother".Translate() + ": " + value + "%", -1f, "OffspringLookLikeTheirMother_desc".Translate()); humanlike_DNA_from_mother = listingStandard.Slider(humanlike_DNA_from_mother, 0.0f, 1.0f); } if (bestial_DNA_from_mother == 0.0f) { listingStandard.Label(" " + "OffspringIsHuman".Translate() + ": " + "AlwaysFather".Translate(), -1f, "OffspringIsHuman_desc".Translate()); bestial_DNA_from_mother = listingStandard.Slider(bestial_DNA_from_mother, 0.0f, 1.0f); } else if (bestial_DNA_from_mother == 1.0f) { listingStandard.Label(" " + "OffspringIsHuman".Translate() + ": " + "AlwaysMother".Translate(), -1f, "OffspringIsHuman_desc".Translate()); bestial_DNA_from_mother = listingStandard.Slider(bestial_DNA_from_mother, 0.0f, 1.0f); } else { int value = (int)(bestial_DNA_from_mother * 100); listingStandard.Label(" " + "OffspringIsHuman".Translate() + ": " + value + "%", -1f, "OffspringIsHuman_desc".Translate()); bestial_DNA_from_mother = listingStandard.Slider(bestial_DNA_from_mother, 0.0f, 1.0f); } if (bestiality_DNA_inheritance == 0.0f) { listingStandard.Label(" " + "OffspringIsHuman2".Translate() + ": " + "AlwaysBeast".Translate(), -1f, "OffspringIsHuman2_desc".Translate()); bestiality_DNA_inheritance = listingStandard.Slider(bestiality_DNA_inheritance, 0.0f, 1.0f); } else if (bestiality_DNA_inheritance == 1.0f) { listingStandard.Label(" " + "OffspringIsHuman2".Translate() + ": " + "AlwaysHumanlike".Translate(), -1f, "OffspringIsHuman2_desc".Translate()); bestiality_DNA_inheritance = listingStandard.Slider(bestiality_DNA_inheritance, 0.0f, 1.0f); } else { listingStandard.Label(" " + "OffspringIsHuman2".Translate() + ": <--->", -1f, "OffspringIsHuman2_desc".Translate()); bestiality_DNA_inheritance = listingStandard.Slider(bestiality_DNA_inheritance, 0.0f, 1.0f); } } else humanlike_DNA_from_mother = 100; listingStandard.CheckboxLabeled("MechanoidImplanting".Translate(), ref mechanoid_pregnancy_enabled, "MechanoidImplanting_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("ComplexImpregnation".Translate(), ref complex_interspecies, "ComplexImpregnation_desc".Translate()); listingStandard.Gap(10f); GUI.contentColor = Color.cyan; listingStandard.Label("Base pregnancy chances:"); listingStandard.Gap(5f); if (humanlike_pregnancy_enabled) listingStandard.Label(" Humanlike/Humanlike (same race): " + humanlike_impregnation_chance + "%"); else listingStandard.Label(" Humanlike/Humanlike (same race): -DISABLED-"); if (humanlike_pregnancy_enabled && !(humanlike_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies) listingStandard.Label(" Humanlike/Humanlike (different race): " + Math.Round(humanlike_impregnation_chance * interspecies_impregnation_modifier, 1) + "%"); else if (complex_interspecies) listingStandard.Label(" Humanlike/Humanlike (different race): -DEPENDS ON SPECIES-"); else listingStandard.Label(" Humanlike/Humanlike (different race): -DISABLED-"); if (animal_pregnancy_enabled) listingStandard.Label(" Animal/Animal (same race): " + animal_impregnation_chance + "%"); else listingStandard.Label(" Animal/Animal (same race): -DISABLED-"); if (animal_pregnancy_enabled && !(animal_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies) listingStandard.Label(" Animal/Animal (different race): " + Math.Round(animal_impregnation_chance * interspecies_impregnation_modifier, 1) + "%"); else if (complex_interspecies) listingStandard.Label(" Animal/Animal (different race): -DEPENDS ON SPECIES-"); else listingStandard.Label(" Animal/Animal (different race): -DISABLED-"); if (RJWSettings.bestiality_enabled && bestial_pregnancy_enabled && !(animal_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies) listingStandard.Label(" Humanlike/Animal: " + Math.Round(animal_impregnation_chance * interspecies_impregnation_modifier, 1) + "%"); else if (complex_interspecies) listingStandard.Label(" Humanlike/Animal: -DEPENDS ON SPECIES-"); else listingStandard.Label(" Humanlike/Animal: -DISABLED-"); if (RJWSettings.bestiality_enabled && bestial_pregnancy_enabled && !(animal_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies) listingStandard.Label(" Animal/Humanlike: " + Math.Round(humanlike_impregnation_chance * interspecies_impregnation_modifier, 1) + "%"); else if (complex_interspecies) listingStandard.Label(" Animal/Humanlike: -DEPENDS ON SPECIES-"); else listingStandard.Label(" Animal/Humanlike: -DISABLED-"); GUI.contentColor = Color.white; listingStandard.NewColumn(); listingStandard.Gap(4f); listingStandard.Label("PregnantCoeffecientForHuman".Translate() + ": " + humanlike_impregnation_chance + "%", -1f, "PregnantCoeffecientForHuman_desc".Translate()); humanlike_impregnation_chance = (int)listingStandard.Slider(humanlike_impregnation_chance, 0.0f, 100f); listingStandard.Label("PregnantCoeffecientForAnimals".Translate() + ": " + animal_impregnation_chance + "%", -1f, "PregnantCoeffecientForAnimals_desc".Translate()); animal_impregnation_chance = (int)listingStandard.Slider(animal_impregnation_chance, 0.0f, 100f); if (!complex_interspecies) { switch (interspecies_impregnation_modifier) { case 0.0f: GUI.contentColor = Color.grey; listingStandard.Label("InterspeciesImpregnantionModifier".Translate() + ": " + "InterspeciesDisabled".Translate(), -1f, "InterspeciesImpregnantionModifier_desc".Translate()); GUI.contentColor = Color.white; break; case 1.0f: GUI.contentColor = Color.cyan; listingStandard.Label("InterspeciesImpregnantionModifier".Translate() + ": " + "InterspeciesMaximum".Translate(), -1f, "InterspeciesImpregnantionModifier_desc".Translate()); GUI.contentColor = Color.white; break; default: listingStandard.Label("InterspeciesImpregnantionModifier".Translate() + ": " + Math.Round(interspecies_impregnation_modifier * 100, 1) + "%", -1f, "InterspeciesImpregnantionModifier_desc".Translate()); break; } interspecies_impregnation_modifier = listingStandard.Slider(interspecies_impregnation_modifier, 0.0f, 1.0f); } listingStandard.Label("RJW_fertility_endAge_male".Translate() + ": " + (int)(fertility_endage_male * 80) + "In_human_years".Translate(), -1f, "RJW_fertility_endAge_male_desc".Translate()); fertility_endage_male = listingStandard.Slider(fertility_endage_male, 0.1f, 3.0f); listingStandard.Label("RJW_fertility_endAge_female_humanlike".Translate() + ": " + (int)(fertility_endage_female_humanlike * 80) + "In_human_years".Translate(), -1f, "RJW_fertility_endAge_female_humanlike_desc".Translate()); fertility_endage_female_humanlike = listingStandard.Slider(fertility_endage_female_humanlike, 0.1f, 3.0f); listingStandard.Label("RJW_fertility_endAge_female_animal".Translate() + ": " + (int)(fertility_endage_female_animal * 100) + "XofLifeExpectancy".Translate(), -1f, "RJW_fertility_endAge_female_animal_desc".Translate()); fertility_endage_female_animal = listingStandard.Slider(fertility_endage_female_animal, 0.1f, 3.0f); listingStandard.EndScrollView(ref viewRect); listingStandard.End(); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref humanlike_pregnancy_enabled, "humanlike_pregnancy_enabled", true, true); Scribe_Values.Look(ref animal_pregnancy_enabled, "animal_enabled", true, true); Scribe_Values.Look(ref bestial_pregnancy_enabled, "bestial_pregnancy_enabled", true, true); Scribe_Values.Look(ref insect_pregnancy_enabled, "insect_pregnancy_enabled", true, true); Scribe_Values.Look(ref egg_pregnancy_implant_anyone, "egg_pregnancy_implant_anyone", true, true); Scribe_Values.Look(ref egg_pregnancy_fertilize_anyone, "egg_pregnancy_fertilize_anyone", false, true); Scribe_Values.Look(ref mechanoid_pregnancy_enabled, "mechanoid_enabled", true, true); Scribe_Values.Look(ref trait_filtering_enabled, "trait_filtering_enabled", true, true); Scribe_Values.Look(ref use_parent_method, "use_parent_method", true, true); Scribe_Values.Look(ref humanlike_DNA_from_mother, "humanlike_DNA_from_mother", 0.5f, true); Scribe_Values.Look(ref bestial_DNA_from_mother, "bestial_DNA_from_mother", 1.0f, true); Scribe_Values.Look(ref bestiality_DNA_inheritance, "bestiality_DNA_inheritance", 0.5f, true); Scribe_Values.Look(ref humanlike_impregnation_chance, "humanlike_impregnation_chance", 25, true); Scribe_Values.Look(ref animal_impregnation_chance, "animal_impregnation_chance", 25, true); Scribe_Values.Look(ref interspecies_impregnation_modifier, "interspecies_impregnation_chance", 0.2f, true); Scribe_Values.Look(ref complex_interspecies, "complex_interspecies", true, true); Scribe_Values.Look(ref fertility_endage_male, "RJW_fertility_endAge_male", 1.2f, true); Scribe_Values.Look(ref fertility_endage_female_humanlike, "fertility_endage_female_humanlike", 0.58f, true); Scribe_Values.Look(ref fertility_endage_female_animal, "fertility_endage_female_animal", 0.96f, true); } } }
Mewtopian/rjw
Source/Settings/RJWPregnancySettings.cs
C#
mit
13,609
using System; using UnityEngine; using Verse; namespace rjw { public class RJWSettings : ModSettings { public static bool animal_on_animal_enabled = true; public static bool bestiality_enabled; public static bool necrophilia_enabled; public static bool animal_CP_rape; public static bool visitor_CP_rape; private static bool overdrive = false; public static bool rape_enabled = false; public static bool rape_beating; public static bool cum_filth = true; public static bool cum_on_body = true; public static float cum_on_body_amount_adjust = 1.0f; public static bool cum_overlays = false; public static bool sounds_enabled = true; public static bool stds_enabled = true; public static bool std_floor = true; public static bool nymphos; public static bool FemaleFuta; public static bool MaleTrap; public static float male_nymph_chance = 0.0f; public static float futa_nymph_chance = 0.0f; public static float futa_natives_chance = 0.0f; public static float futa_spacers_chance = 0.5f; public static int sex_minimum_age = 13; public static int sex_free_for_all_age = 18; public static float sexneed_decay_rate = 1.0f; public static float nonFutaWomenRaping_MaxVulnerability = 0.8f; public static float rapee_MinVulnerability_human = 1.2f; public static bool RPG_direct_control; public static bool RPG_hero_control; public static bool RPG_hero_control_HC; public static bool RPG_hero_control_Ironman; public static bool submit_button_enabled = true; public static bool show_RJW_designation_box = true; public static bool StackRjwParts = false; public static float maxDistancetowalk = 250; public static bool WildMode = false; public static bool override_RJW_designation_checks = false; public static bool GenderlessAsFuta = false; public static bool DevMode = false; public static bool DebugLogJoinInBed = false; private static Vector2 scrollPosition; private static float height_modifier = 100f; public static void DoWindowContents(Rect inRect) { sexneed_decay_rate = Mathf.Clamp(sexneed_decay_rate, 0.0f, 10000.0f); cum_on_body_amount_adjust = Mathf.Clamp(cum_on_body_amount_adjust, 0.1f, 10f); nonFutaWomenRaping_MaxVulnerability = Mathf.Clamp(nonFutaWomenRaping_MaxVulnerability, 0.0f, 3.0f); rapee_MinVulnerability_human = Mathf.Clamp(rapee_MinVulnerability_human, 0.0f, 3.0f); //30f for top page description and bottom close button Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f); //-16 for slider, height_modifier - additional height for options Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier); Listing_Standard listingStandard = new Listing_Standard(); listingStandard.maxOneColumn = true; listingStandard.ColumnWidth = viewRect.width / 2.05f; listingStandard.BeginScrollView(outRect, ref scrollPosition, ref viewRect); listingStandard.Begin(viewRect); listingStandard.Gap(4f); listingStandard.CheckboxLabeled("animal_on_animal_enabled".Translate(), ref animal_on_animal_enabled, "animal_on_animal_enabled_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("necrophilia_enabled".Translate(), ref necrophilia_enabled, "necrophilia_enabled_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("bestiality_enabled".Translate(), ref bestiality_enabled, "bestiality_enabled_desc".Translate()); listingStandard.Gap(10f); listingStandard.CheckboxLabeled("rape_enabled".Translate(), ref rape_enabled, "rape_enabled_desc".Translate()); if (rape_enabled) { listingStandard.Gap(3f); listingStandard.CheckboxLabeled(" " + "VisitorsCanCP".Translate(), ref visitor_CP_rape, "VisitorsCanCP_desc".Translate()); listingStandard.Gap(3f); if (!bestiality_enabled) { GUI.contentColor = Color.grey; animal_CP_rape = false; } listingStandard.CheckboxLabeled(" " + "AnimalsCanCP".Translate(), ref animal_CP_rape, "AnimalsCanCP_desc".Translate()); if (!bestiality_enabled) GUI.contentColor = Color.white; listingStandard.Gap(3f); listingStandard.CheckboxLabeled(" " + "PrisonersBeating".Translate(), ref rape_beating, "PrisonersBeating_desc".Translate()); } else { visitor_CP_rape = false; animal_CP_rape = false; rape_beating = false; } listingStandard.Gap(10f); listingStandard.CheckboxLabeled("STD_enabled".Translate(), ref stds_enabled, "STD_enabled_desc".Translate()); listingStandard.Gap(5f); if (stds_enabled) listingStandard.CheckboxLabeled(" " + "STD_FromFloors".Translate(), ref std_floor, "STD_FromFloors_desc".Translate()); else std_floor = false; listingStandard.Gap(5f); listingStandard.CheckboxLabeled("cum_filth".Translate(), ref cum_filth, "cum_filth_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("cum_on_body".Translate(), ref cum_on_body, "cum_on_body_desc".Translate()); listingStandard.Gap(5f); if (cum_on_body) { listingStandard.Label("cum_on_body_amount_adjust".Translate() + ": " + Math.Round(cum_on_body_amount_adjust * 100f, 0) + "%", -1f, "cum_on_body_amount_adjust_desc".Translate()); cum_on_body_amount_adjust = listingStandard.Slider(cum_on_body_amount_adjust, 0.1f, 10.0f); listingStandard.CheckboxLabeled("cum_overlays".Translate(), ref cum_overlays, "cum_overlays_desc".Translate()); } else cum_overlays = false; listingStandard.Gap(5f); listingStandard.CheckboxLabeled("sounds_enabled".Translate(), ref sounds_enabled, "sounds_enabled_desc".Translate()); listingStandard.Gap(10f); listingStandard.CheckboxLabeled("RPG_direct_control_name".Translate(), ref RPG_direct_control, "RPG_direct_control_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RPG_hero_control_name".Translate(), ref RPG_hero_control, "RPG_hero_control_desc".Translate()); listingStandard.Gap(5f); if (RPG_hero_control) { listingStandard.CheckboxLabeled("RPG_hero_control_HC_name".Translate(), ref RPG_hero_control_HC, "RPG_hero_control_HC_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RPG_hero_control_Ironman_name".Translate(), ref RPG_hero_control_Ironman, "RPG_hero_control_Ironman_desc".Translate()); listingStandard.Gap(5f); } else { RPG_hero_control_HC = false; RPG_hero_control_Ironman = false; } listingStandard.NewColumn(); listingStandard.Gap(4f); GUI.contentColor = Color.white; if (sexneed_decay_rate < 2.5f) { overdrive = false; listingStandard.Label("sexneed_decay_rate_name".Translate() + ": " + Math.Round(sexneed_decay_rate * 100f, 0) + "%", -1f, "sexneed_decay_rate_desc".Translate()); sexneed_decay_rate = listingStandard.Slider(sexneed_decay_rate, 0.0f, 5.0f); } else if (sexneed_decay_rate <= 5.0f && !overdrive) { GUI.contentColor = Color.yellow; listingStandard.Label("sexneed_decay_rate_name".Translate() + ": " + Math.Round(sexneed_decay_rate * 100f, 0) + "% [Not recommended]", -1f, "sexneed_decay_rate_desc".Translate()); sexneed_decay_rate = listingStandard.Slider(sexneed_decay_rate, 0.0f, 5.0f); if (sexneed_decay_rate == 5.0f) { GUI.contentColor = Color.red; if (listingStandard.ButtonText("OVERDRIVE")) overdrive = true; } GUI.contentColor = Color.white; } else { GUI.contentColor = Color.red; listingStandard.Label("sexneed_decay_rate_name".Translate() + ": " + Math.Round(sexneed_decay_rate * 100f, 0) + "% [WARNING: UNSAFE]", -1f, "sexneed_decay_rate_desc".Translate()); GUI.contentColor = Color.white; sexneed_decay_rate = listingStandard.Slider(sexneed_decay_rate, 0.0f, 10000.0f); } listingStandard.Label("SexMinimumAge".Translate() + ": " + sex_minimum_age, -1f, "SexMinimumAge_desc".Translate()); sex_minimum_age = (int)listingStandard.Slider(sex_minimum_age, 0, 100); listingStandard.Label("SexFreeForAllAge".Translate() + ": " + sex_free_for_all_age, -1f, "SexFreeForAllAge_desc".Translate()); sex_free_for_all_age = (int)listingStandard.Slider(sex_free_for_all_age, 0, 100); if (rape_enabled) { listingStandard.Label("NonFutaWomenRaping_MaxVulnerability".Translate() + ": " + (int)(nonFutaWomenRaping_MaxVulnerability * 100), -1f, "NonFutaWomenRaping_MaxVulnerability_desc".Translate()); nonFutaWomenRaping_MaxVulnerability = listingStandard.Slider(nonFutaWomenRaping_MaxVulnerability, 0.0f, 3.0f); listingStandard.Label("Rapee_MinVulnerability_human".Translate() + ": " + (int)(rapee_MinVulnerability_human * 100), -1f, "Rapee_MinVulnerability_human_desc".Translate()); rapee_MinVulnerability_human = listingStandard.Slider(rapee_MinVulnerability_human, 0.0f, 3.0f); } listingStandard.Gap(20f); listingStandard.CheckboxLabeled("NymphsJoin".Translate(), ref nymphos, "NymphsJoin_desc".Translate()); listingStandard.Gap(5f); // Save compatibility check for 1.9.7 // This can probably be safely removed at a later date, I doubt many players use old saves for long. if (male_nymph_chance > 1.0f || futa_nymph_chance > 1.0f || futa_natives_chance > 1.0f || futa_spacers_chance > 1.0f) { male_nymph_chance = 0.0f; futa_nymph_chance = 0.0f; futa_natives_chance = 0.0f; futa_spacers_chance = 0.0f; } listingStandard.CheckboxLabeled("FemaleFuta".Translate(), ref FemaleFuta, "FemaleFuta_desc".Translate()); listingStandard.CheckboxLabeled("MaleTrap".Translate(), ref MaleTrap, "MaleTrap_desc".Translate()); if (nymphos) { listingStandard.Label("male_nymph_chance".Translate() + ": " + (int)(male_nymph_chance * 100) + "%", -1f, "male_nymph_chance_desc".Translate()); male_nymph_chance = listingStandard.Slider(male_nymph_chance, 0.0f, 1.0f); if (FemaleFuta || MaleTrap) { listingStandard.Label("futa_nymph_chance".Translate() + ": " + (int)(futa_nymph_chance * 100) + "%", -1f, "futa_nymph_chance_desc".Translate()); futa_nymph_chance = listingStandard.Slider(futa_nymph_chance, 0.0f, 1.0f); } } if (FemaleFuta || MaleTrap) { listingStandard.Label("futa_natives_chance".Translate() + ": " + (int)(futa_natives_chance * 100) + "%", -1f, "futa_natives_chance_desc".Translate()); futa_natives_chance = listingStandard.Slider(futa_natives_chance, 0.0f, 1.0f); listingStandard.Label("futa_spacers_chance".Translate() + ": " + (int)(futa_spacers_chance * 100) + "%", -1f, "futa_spacers_chance_desc".Translate()); futa_spacers_chance = listingStandard.Slider(futa_spacers_chance, 0.0f, 1.0f); } listingStandard.EndScrollView(ref viewRect); listingStandard.End(); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref animal_on_animal_enabled, "animal_on_animal_enabled", true, true); Scribe_Values.Look(ref bestiality_enabled, "bestiality_enabled", false, true); Scribe_Values.Look(ref necrophilia_enabled, "necrophilia_enabled", false, true); Scribe_Values.Look(ref rape_enabled, "rape_enabled", false, true); Scribe_Values.Look(ref visitor_CP_rape, "visitor_CP_rape", false, true); Scribe_Values.Look(ref animal_CP_rape, "animal_CP_rape", false, true); Scribe_Values.Look(ref rape_beating, "rape_beating", false, true); Scribe_Values.Look(ref nymphos, "nymphs_join", true, true); Scribe_Values.Look(ref FemaleFuta, "FemaleFuta", true, true); Scribe_Values.Look(ref MaleTrap, "MaleTrap", true, true); Scribe_Values.Look(ref stds_enabled, "STD_enabled", true, true); Scribe_Values.Look(ref std_floor, "STD_FromFloors", true, true); Scribe_Values.Look(ref sounds_enabled, "sounds_enabled", true, true); Scribe_Values.Look(ref cum_filth, "cum_filth", true, true); Scribe_Values.Look(ref cum_on_body, "cum_on_body", true, true); Scribe_Values.Look(ref cum_on_body_amount_adjust, "cum_on_body_amount_adjust", 1.0f, true); Scribe_Values.Look(ref cum_overlays, "cum_overlays", false, true); Scribe_Values.Look(ref sex_minimum_age, "sex_minimum_age", 13, true); Scribe_Values.Look(ref sex_free_for_all_age, "sex_free_for_all", 18, true); Scribe_Values.Look(ref sexneed_decay_rate, "sexneed_decay_rate", 1.0f, true); Scribe_Values.Look(ref nonFutaWomenRaping_MaxVulnerability, "nonFutaWomenRaping_MaxVulnerability", 0.8f, true); Scribe_Values.Look(ref rapee_MinVulnerability_human, "rapee_MinVulnerability_human", 1.2f, true); Scribe_Values.Look(ref male_nymph_chance, "male_nymph_chance", 0.0f, true); Scribe_Values.Look(ref futa_nymph_chance, "futa_nymph_chance", 0.0f, true); Scribe_Values.Look(ref futa_natives_chance, "futa_natives_chance", 0.0f, true); Scribe_Values.Look(ref futa_spacers_chance, "futa_spacers_chance", 0.5f, true); Scribe_Values.Look(ref RPG_direct_control, "RPG_direct_control", false, true); Scribe_Values.Look(ref RPG_hero_control, "RPG_hero_control", false, true); Scribe_Values.Look(ref RPG_hero_control_HC, "RPG_hero_control_HC", false, true); Scribe_Values.Look(ref RPG_hero_control_Ironman, "RPG_hero_control_Ironman", false, true); } } }
Mewtopian/rjw
Source/Settings/RJWSettings.cs
C#
mit
13,156
using UnityEngine; using Verse; using Multiplayer.API; namespace rjw.Settings { public class RJWSettingsController : Mod { public RJWSettingsController(ModContentPack content) : base(content) { GetSettings<RJWSettings>(); } public override string SettingsCategory() { return "RJWSettingsOne".Translate(); } public override void DoSettingsWindowContents(Rect inRect) { if (MP.IsInMultiplayer) return; RJWSettings.DoWindowContents(inRect); } } public class RJWDebugController : Mod { public RJWDebugController(ModContentPack content) : base(content) { GetSettings<RJWDebugSettings>(); } public override string SettingsCategory() { return "RJWDebugSettings".Translate(); } public override void DoSettingsWindowContents(Rect inRect) { if (MP.IsInMultiplayer) return; RJWDebugSettings.DoWindowContents(inRect); } } public class RJWPregnancySettingsController : Mod { public RJWPregnancySettingsController(ModContentPack content) : base(content) { GetSettings<RJWPregnancySettings>(); } public override string SettingsCategory() { return "RJWSettingsTwo".Translate(); } public override void DoSettingsWindowContents(Rect inRect) { if (MP.IsInMultiplayer) return; //GUI.BeginGroup(inRect); //Rect outRect = new Rect(0f, 0f, inRect.width, inRect.height - 30f); //Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + 10f); //Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); RJWPregnancySettings.DoWindowContents(inRect); //Widgets.EndScrollView(); //GUI.EndGroup(); } } public class RJWPreferenceSettingsController : Mod { public RJWPreferenceSettingsController(ModContentPack content) : base(content) { GetSettings<RJWPreferenceSettings>(); } public override string SettingsCategory() { return "RJWSettingsThree".Translate(); } public override void DoSettingsWindowContents(Rect inRect) { if (MP.IsInMultiplayer) return; RJWPreferenceSettings.DoWindowContents(inRect); } } public class RJWHookupSettingsController : Mod { public RJWHookupSettingsController(ModContentPack content) : base(content) { GetSettings<RJWHookupSettings>(); } public override string SettingsCategory() { return "RJWSettingsFour".Translate(); } public override void DoSettingsWindowContents(Rect inRect) { if (MP.IsInMultiplayer) return; RJWHookupSettings.DoWindowContents(inRect); } } }
Mewtopian/rjw
Source/Settings/RJWSettingsController.cs
C#
mit
2,509
using System; using System.Collections.Generic; using UnityEngine; using Verse; namespace rjw { // TODO: Add option for logging pregnancy chance after sex (dev mode only?) // TODO: Add an alernate more complex system for pregnancy calculations, by using bodyparts, genitalia, and size (similar species -> higher chance, different -> lower chance) // TODO: Old settings that are not in use - evalute if they're needed and either convert these to settings, or delete them. /*public bool std_show_roll_to_catch; // Updated public float std_min_severity_to_pitch; // Updated public float std_env_pitch_cleanliness_exaggeration; // Updated public float std_env_pitch_dirtiness_exaggeration; // Updated public float std_outdoor_cleanliness; // Updated public float significant_pain_threshold; // Updated public float extreme_pain_threshold; // Updated public float base_chance_to_hit_prisoner; // Updated public int min_ticks_between_hits; // Updated public int max_ticks_between_hits; // Updated public float max_nymph_fraction; // Updated public float opp_inf_initial_immunity; // Updated public float comfort_prisoner_rape_mtbh_mul; // Updated public float whore_mtbh_mul; // Updated public float nymph_spawn_with_std_mul; // Updated public static bool comfort_prisoners_enabled; // Updated //this one is in config.cs as well! public static bool ComfortColonist; // New public static bool ComfortAnimal; // New public static bool rape_me_sticky_enabled; // Updated public static bool bondage_gear_enabled; // Updated public static bool nymph_joiners_enabled; // Updated public static bool always_accept_whores; // Updated public static bool nymphs_always_JoinInBed; // Updated public static bool zoophis_always_rape; // Updated public static bool rapists_always_rape; // Updated public static bool pawns_always_do_fapping; // Updated public static bool whores_always_findjob; // Updated public bool show_regular_dick_and_vag; // Updated */ public class RJWPreferenceSettings : ModSettings { public static float vaginal = 1.20f; public static float anal = 0.80f; public static float fellatio = 0.80f; public static float cunnilingus = 0.80f; public static float rimming = 0.40f; public static float double_penetration = 0.60f; public static float breastjob = 0.50f; public static float handjob = 0.80f; public static float mutual_masturbation = 0.70f; public static float fingering = 0.50f; public static float footjob = 0.30f; public static float scissoring = 0.50f; public static float fisting = 0.30f; public static float sixtynine = 0.69f; public static float asexual_ratio = 0.02f; public static float pansexual_ratio = 0.03f; public static float heterosexual_ratio = 0.7f; public static float bisexual_ratio = 0.15f; public static float homosexual_ratio = 0.1f; public static bool FapEverywhere = true; public static bool FapInBed = true; public static Clothing sex_wear = Clothing.Nude; public static RapeAlert rape_alert_sound = RapeAlert.Enabled; public static Rjw_sexuality sexuality_distribution = Rjw_sexuality.RimJobWorld; public static AllowedSex Malesex = AllowedSex.All; public static AllowedSex FeMalesex = AllowedSex.All; public enum AllowedSex { All, Homo, Nohomo }; public enum Clothing { Nude, Headgear, Clothed }; public enum RapeAlert { Enabled, Colonists, Humanlikes, Disabled }; public enum Rjw_sexuality { RimJobWorld, RationalRomance, Psychology, SYRIndividuality }; public static void DoWindowContents(Rect inRect) { Listing_Standard listingStandard = new Listing_Standard(); listingStandard.ColumnWidth = inRect.width / 3.15f; listingStandard.Begin(inRect); listingStandard.Gap(4f); listingStandard.Label("SexTypeFrequency".Translate()); listingStandard.Gap(6f); listingStandard.Label(" " + "vaginal".Translate() + ": " + Math.Round(vaginal * 100, 0), -1, "vaginal_desc".Translate()); vaginal = listingStandard.Slider(vaginal, 0.01f, 3.0f); listingStandard.Label(" " + "anal".Translate() + ": " + Math.Round(anal * 100, 0), -1, "anal_desc".Translate()); anal = listingStandard.Slider(anal, 0.01f, 3.0f); listingStandard.Label(" " + "double_penetration".Translate() + ": " + Math.Round(double_penetration * 100, 0), -1, "double_penetration_desc".Translate()); double_penetration = listingStandard.Slider(double_penetration, 0.01f, 3.0f); listingStandard.Label(" " + "fellatio".Translate() + ": " + Math.Round(fellatio * 100, 0), -1, "fellatio_desc".Translate()); fellatio = listingStandard.Slider(fellatio, 0.01f, 3.0f); listingStandard.Label(" " + "cunnilingus".Translate() + ": " + Math.Round(cunnilingus * 100, 0), -1, "cunnilingus_desc".Translate()); cunnilingus = listingStandard.Slider(cunnilingus, 0.01f, 3.0f); listingStandard.Label(" " + "rimming".Translate() + ": " + Math.Round(rimming * 100, 0), -1, "rimming_desc".Translate()); rimming = listingStandard.Slider(rimming, 0.01f, 3.0f); listingStandard.Label(" " + "sixtynine".Translate() + ": " + Math.Round(sixtynine * 100, 0), -1, "sixtynine_desc".Translate()); sixtynine = listingStandard.Slider(sixtynine, 0.01f, 3.0f); listingStandard.CheckboxLabeled("FapEverywhere".Translate(), ref FapEverywhere, "FapEverywhere_desc".Translate()); listingStandard.CheckboxLabeled("FapInBed".Translate(), ref FapInBed, "FapInBed_desc".Translate()); listingStandard.NewColumn(); listingStandard.Gap(4f); if (listingStandard.ButtonText("Reset".Translate())) { vaginal = 1.20f; anal = 0.80f; fellatio = 0.80f; cunnilingus = 0.80f; rimming = 0.40f; double_penetration = 0.60f; breastjob = 0.50f; handjob = 0.80f; mutual_masturbation = 0.70f; fingering = 0.50f; footjob = 0.30f; scissoring = 0.50f; fisting = 0.30f; sixtynine = 0.69f; } listingStandard.Gap(6f); listingStandard.Label(" " + "breastjob".Translate() + ": " + Math.Round(breastjob * 100, 0), -1, "breastjob_desc".Translate()); breastjob = listingStandard.Slider(breastjob, 0.01f, 3.0f); listingStandard.Label(" " + "handjob".Translate() + ": " + Math.Round(handjob * 100, 0), -1, "handjob_desc".Translate()); handjob = listingStandard.Slider(handjob, 0.01f, 3.0f); listingStandard.Label(" " + "fingering".Translate() + ": " + Math.Round(fingering * 100, 0), -1, "fingering_desc".Translate()); fingering = listingStandard.Slider(fingering, 0.01f, 3.0f); listingStandard.Label(" " + "fisting".Translate() + ": " + Math.Round(fisting * 100, 0), -1, "fisting_desc".Translate()); fisting = listingStandard.Slider(fisting, 0.01f, 3.0f); listingStandard.Label(" " + "mutual_masturbation".Translate() + ": " + Math.Round(mutual_masturbation * 100, 0), -1, "mutual_masturbation_desc".Translate()); mutual_masturbation = listingStandard.Slider(mutual_masturbation, 0.01f, 3.0f); listingStandard.Label(" " + "footjob".Translate() + ": " + Math.Round(footjob * 100, 0), -1, "footjob_desc".Translate()); footjob = listingStandard.Slider(footjob, 0.01f, 3.0f); listingStandard.Label(" " + "scissoring".Translate() + ": " + Math.Round(scissoring * 100, 0), -1, "scissoring_desc".Translate()); scissoring = listingStandard.Slider(scissoring, 0.01f, 3.0f); if (listingStandard.ButtonText("Malesex".Translate() + Malesex.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("AllowedSex.All".Translate(), (() => Malesex = AllowedSex.All), MenuOptionPriority.Default), new FloatMenuOption("AllowedSex.Homo".Translate(), (() => Malesex = AllowedSex.Homo), MenuOptionPriority.Default), new FloatMenuOption("AllowedSex.Nohomo".Translate(), (() => Malesex = AllowedSex.Nohomo), MenuOptionPriority.Default) })); } if (listingStandard.ButtonText("FeMalesex".Translate() + FeMalesex.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("AllowedSex.All".Translate(), (() => FeMalesex = AllowedSex.All), MenuOptionPriority.Default), new FloatMenuOption("AllowedSex.Homo".Translate(), (() => FeMalesex = AllowedSex.Homo), MenuOptionPriority.Default), new FloatMenuOption("AllowedSex.Nohomo".Translate(), (() => FeMalesex = AllowedSex.Nohomo), MenuOptionPriority.Default) })); } listingStandard.NewColumn(); listingStandard.Gap(4f); // TODO: Add translation if (listingStandard.ButtonText("SexClothing".Translate() + sex_wear.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("SexClothingNude".Translate(), (() => sex_wear = Clothing.Nude), MenuOptionPriority.Default), new FloatMenuOption("SexClothingHeadwear".Translate(), (() => sex_wear = Clothing.Headgear), MenuOptionPriority.Default), new FloatMenuOption("SexClothingFull".Translate(), (() => sex_wear = Clothing.Clothed), MenuOptionPriority.Default) })); } listingStandard.Gap(4f); if (listingStandard.ButtonText("RapeSoundAlert".Translate() + rape_alert_sound.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("RapeSoundAlertAlways".Translate(), (() => rape_alert_sound = RapeAlert.Enabled), MenuOptionPriority.Default), new FloatMenuOption("RapeSoundAlertHumanlike".Translate(), (() => rape_alert_sound = RapeAlert.Humanlikes), MenuOptionPriority.Default), new FloatMenuOption("RapeSoundAlertColonist".Translate(), (() => rape_alert_sound = RapeAlert.Colonists), MenuOptionPriority.Default), new FloatMenuOption("RapeSoundAlertDisabled".Translate(), (() => rape_alert_sound = RapeAlert.Disabled), MenuOptionPriority.Default) })); } listingStandard.Gap(26f); listingStandard.Label("SexualitySpread1".Translate(), -1, "SexualitySpread2".Translate()); if (listingStandard.ButtonText(sexuality_distribution.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("RimJobWorld", (() => sexuality_distribution = Rjw_sexuality.RimJobWorld), MenuOptionPriority.Default), new FloatMenuOption("RationalRomance", (() => sexuality_distribution = Rjw_sexuality.RationalRomance), MenuOptionPriority.Default), new FloatMenuOption("SYRIndividuality", (() => sexuality_distribution = Rjw_sexuality.SYRIndividuality), MenuOptionPriority.Default), new FloatMenuOption("Psychology", (() => sexuality_distribution = Rjw_sexuality.Psychology), MenuOptionPriority.Default) })); } if (sexuality_distribution == Rjw_sexuality.RimJobWorld) { listingStandard.Label("SexualityAsexual".Translate() + Math.Round((asexual_ratio / GetTotal()) * 100, 1) + "%", -1, "SexualityAsexual_desc".Translate()); asexual_ratio = listingStandard.Slider(asexual_ratio, 0.0f, 1.0f); listingStandard.Label("SexualityPansexual".Translate() + Math.Round((pansexual_ratio / GetTotal()) * 100, 1) + "%", -1, "SexualityPansexual_desc".Translate()); pansexual_ratio = listingStandard.Slider(pansexual_ratio, 0.0f, 1.0f); listingStandard.Label("SexualityHeterosexual".Translate() + Math.Round((heterosexual_ratio / GetTotal()) * 100, 1) + "%", -1, "SexualityHeterosexual_desc".Translate()); heterosexual_ratio = listingStandard.Slider(heterosexual_ratio, 0.0f, 1.0f); listingStandard.Label("SexualityBisexual".Translate() + Math.Round((bisexual_ratio / GetTotal()) * 100, 1) + "%", -1, "SexualityBisexual_desc".Translate()); bisexual_ratio = listingStandard.Slider(bisexual_ratio, 0.0f, 1.0f); listingStandard.Label("SexualityGay".Translate() + Math.Round((homosexual_ratio / GetTotal()) * 100, 1) + "%", -1, "SexualityGay_desc".Translate()); homosexual_ratio = listingStandard.Slider(homosexual_ratio, 0.0f, 1.0f); } else { if (!xxx.RomanceDiversifiedIsActive && sexuality_distribution == Rjw_sexuality.RationalRomance) sexuality_distribution = Rjw_sexuality.RimJobWorld; else if (sexuality_distribution == Rjw_sexuality.RationalRomance) listingStandard.Label("SexualitySpreadRationalRomance".Translate()); if (!xxx.IndividualityIsActive && sexuality_distribution == Rjw_sexuality.SYRIndividuality) sexuality_distribution = Rjw_sexuality.RimJobWorld; else if (sexuality_distribution == Rjw_sexuality.SYRIndividuality) listingStandard.Label("SexualitySpreadIndividuality".Translate()); if (!xxx.PsychologyIsActive && sexuality_distribution == Rjw_sexuality.Psychology) sexuality_distribution = Rjw_sexuality.RimJobWorld; else if (sexuality_distribution == Rjw_sexuality.Psychology) listingStandard.Label("SexualitySpreadPsychology".Translate()); } listingStandard.End(); } public static float GetTotal() { return asexual_ratio + pansexual_ratio + heterosexual_ratio + bisexual_ratio + homosexual_ratio; } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref vaginal, "vaginal_frequency", 1.2f, true); Scribe_Values.Look(ref anal, "anal_frequency", 0.8f, true); Scribe_Values.Look(ref fellatio, "fellatio_frequency", 0.8f, true); Scribe_Values.Look(ref cunnilingus, "cunnilingus_frequency", 0.8f, true); Scribe_Values.Look(ref rimming, "rimming_frequency", 0.4f, true); Scribe_Values.Look(ref double_penetration, "double_penetration_frequency", 0.6f, true); Scribe_Values.Look(ref sixtynine, "sixtynine_frequency", 0.69f, true); Scribe_Values.Look(ref breastjob, "breastjob_frequency", 0.5f, true); Scribe_Values.Look(ref handjob, "handjob_frequency", 0.8f, true); Scribe_Values.Look(ref footjob, "footjob_frequency", 0.3f, true); Scribe_Values.Look(ref fingering, "fingering_frequency", 0.5f, true); Scribe_Values.Look(ref fisting, "fisting_frequency", 0.3f, true); Scribe_Values.Look(ref mutual_masturbation, "mutual_masturbation_frequency", 0.9f, true); Scribe_Values.Look(ref scissoring, "scissoring_frequency", 0.5f, true); Scribe_Values.Look(ref asexual_ratio, "asexual_ratio", 0.02f, true); Scribe_Values.Look(ref pansexual_ratio, "pansexual_ratio", 0.03f, true); Scribe_Values.Look(ref heterosexual_ratio, "heterosexual_ratio", 0.7f, true); Scribe_Values.Look(ref bisexual_ratio, "bisexual_ratio", 0.15f, true); Scribe_Values.Look(ref homosexual_ratio, "homosexual_ratio", 0.1f, true); Scribe_Values.Look(ref FapEverywhere, "FapEverywhere", true, true); Scribe_Values.Look(ref FapInBed, "FapInBed", true, true); Scribe_Values.Look(ref sex_wear, "sex_wear", Clothing.Nude, true); Scribe_Values.Look(ref rape_alert_sound, "rape_alert_sound", RapeAlert.Enabled, true); Scribe_Values.Look(ref sexuality_distribution, "sexuality_distribution", Rjw_sexuality.RimJobWorld, true); Scribe_Values.Look(ref Malesex, "Malesex", AllowedSex.All, true); Scribe_Values.Look(ref FeMalesex, "FeMalesex", AllowedSex.All, true); } } }
Mewtopian/rjw
Source/Settings/RJWSexSettings.cs
C#
mit
15,005
using HugsLib.Settings; using UnityEngine; using Verse; namespace rjw.Properties { // This class allows you to handle specific events on the settings class: // The SettingChanging event is raised before a setting's value is changed. // The PropertyChanged event is raised after a setting's value is changed. // The SettingsLoaded event is raised after the setting values are loaded. // The SettingsSaving event is raised before the setting values are saved. internal sealed partial class Settings { public Settings() { // // To add event handlers for saving and changing settings, uncomment the lines below: // // this.SettingChanging += this.SettingChangingEventHandler; // // this.SettingsSaving += this.SettingsSavingEventHandler; // } private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { // Add code to handle the SettingChangingEvent event here. } private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { // Add code to handle the SettingsSaving event here. } private static readonly Color SelectedOptionColor = new Color(0.5f, 1f, 0.5f, 1f); public static bool CustomDrawer_Tabs(Rect rect, SettingHandle<string> selected, string defaultValues) { int labelWidth = 140; //int offset = -287; int offset = 0; bool change = false; Rect buttonRect = new Rect(rect) { width = labelWidth }; buttonRect.position = new Vector2(buttonRect.position.x + offset, buttonRect.position.y); Color activeColor = GUI.color; bool isSelected = defaultValues == selected.Value; if (isSelected) GUI.color = SelectedOptionColor; bool clicked = Widgets.ButtonText(buttonRect, defaultValues); if (isSelected) GUI.color = activeColor; if (clicked) { selected.Value = selected.Value != defaultValues ? defaultValues : "none"; change = true; } offset += labelWidth; return change; } } }
Mewtopian/rjw
Source/Settings/Settings.cs
C#
mit
2,144
using Verse; namespace rjw { public class config : Def { // TODO: Clean these. // Commented out old configs that are no longer in use (or have been converted into settings). // Feature Toggles //public bool comfort_prisoners_enabled; //public bool colonists_can_be_comfort_prisoners; //public bool cum_enabled; //public bool rape_me_sticky_enabled; //public bool sounds_enabled; //public bool stds_enabled; public bool bondage_gear_enabled; //public bool nymph_joiners_enabled; //public bool whore_beds_enabled; //public bool necro_enabled; //public bool random_rape_enabled; //public bool always_accept_whores; //public bool nymphs_always_JoinInBed; //public bool zoophis_always_rape; //public bool rapists_always_rape; //public bool pawns_always_do_fapping; //public bool pawns_always_rapeCP; //public bool whores_always_findjob; // Display Toggles public bool show_regular_dick_and_vag; // STD config public bool std_show_roll_to_catch; public float std_min_severity_to_pitch; public float std_env_pitch_cleanliness_exaggeration; public float std_env_pitch_dirtiness_exaggeration; public float std_outdoor_cleanliness; // Age Config //public int sex_free_for_all_age; //public int sex_minimum_age; public float minor_pain_threshold; // 0.3 public float significant_pain_threshold; // 0.6 public float extreme_pain_threshold; // 0.95 public float base_chance_to_hit_prisoner; // 50 public int min_ticks_between_hits; // 500 public int max_ticks_between_hits; // 700 public float max_nymph_fraction; public float opp_inf_initial_immunity; public float comfort_prisoner_rape_mtbh_mul; //public float whore_mtbh_mul; public float nymph_spawn_with_std_mul; //public float chance_to_rim; //public float fertility_endAge_male; //public float fertility_endAge_female_humanlike; //public float fertility_endAge_female_animal; } }
Mewtopian/rjw
Source/Settings/config.cs
C#
mit
1,944
using System; using UnityEngine; using Verse; using Verse.AI; using RimWorld; namespace rjw { public class ThinkNode_ChancePerHour_Bestiality : ThinkNode_ChancePerHour { protected override float MtbHours(Pawn pawn) { float base_mtb = xxx.config.comfort_prisoner_rape_mtbh_mul; // Default is 4.0 float desire_factor; { Need_Sex need_sex = pawn.needs.TryGetNeed<Need_Sex>(); if (need_sex != null) { if (need_sex.CurLevel <= need_sex.thresh_frustrated()) desire_factor = 0.40f; else if (need_sex.CurLevel <= need_sex.thresh_horny()) desire_factor = 0.80f; else desire_factor = 1.00f; } else desire_factor = 1.00f; } float personality_factor; { personality_factor = 1.0f; if (xxx.is_nympho(pawn)) personality_factor *= 0.5f; else if (xxx.is_prude(pawn) || pawn.story.traits.HasTrait(TraitDefOf.BodyPurist)) personality_factor *= 2f; if (pawn.story.traits.HasTrait(TraitDefOf.Nudist)) personality_factor *= 0.9f; // Pawns with no zoophile trait should first try to find other outlets. if (!xxx.is_zoophile(pawn)) personality_factor *= 8f; // Less likely to engage in bestiality if the pawn has a lover... unless the lover is an animal (there's mods for that, so need to check). if (!xxx.isSingleOrPartnerNotHere(pawn) && !xxx.is_animal(LovePartnerRelationUtility.ExistingMostLikedLovePartner(pawn, false)) && !xxx.is_lecher(pawn) && !xxx.is_nympho(pawn)) personality_factor *= 2.5f; // Pawns with few or no prior animal encounters are more reluctant to engage in bestiality. if (pawn.records.GetValue(xxx.CountOfSexWithAnimals) < 3) personality_factor *= 3f; else if (pawn.records.GetValue(xxx.CountOfSexWithAnimals) > 10) personality_factor *= 0.8f; } float fun_factor; { if ((pawn.needs.joy != null) && (xxx.is_bloodlust(pawn))) fun_factor = Mathf.Clamp01(0.50f + pawn.needs.joy.CurLevel); else fun_factor = 1.00f; } return base_mtb * desire_factor * personality_factor * fun_factor; } public override ThinkResult TryIssueJobPackage(Pawn pawn, JobIssueParams jobParams) { try { return base.TryIssueJobPackage(pawn, jobParams); } catch (NullReferenceException) { //--Log.Message("[RJW]ThinkNode_ChancePerHour_Bestiality:TryIssueJobPackage - error message" + e.Message); //--Log.Message("[RJW]ThinkNode_ChancePerHour_Bestiality:TryIssueJobPackage - error stacktrace" + e.StackTrace); return ThinkResult.NoJob; ; } } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Bestiality.cs
C#
mit
2,564
using System; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Cooldown for breeding /// something like 4.0*0.2 = 0.8 hours /// </summary> public class ThinkNode_ChancePerHour_Breed : ThinkNode_ChancePerHour { protected override float MtbHours(Pawn pawn) { return xxx.config.comfort_prisoner_rape_mtbh_mul * 0.20f ; } public override ThinkResult TryIssueJobPackage(Pawn pawn, JobIssueParams jobParams) { try { return base.TryIssueJobPackage(pawn, jobParams); } catch (NullReferenceException) { return ThinkResult.NoJob; ; } } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Breed.cs
C#
mit
596
using RimWorld; using Verse; using Verse.AI; using System.Linq; namespace rjw { public class ThinkNode_ChancePerHour_Fappin : ThinkNode_ChancePerHour { public static float get_fappin_mtb_hours(Pawn p) { if (DebugSettings.alwaysDoLovin) return 0.1f; return (xxx.is_nympho(p) ? 0.5f : 1.0f) * rjw_CORE_EXPOSED.LovePartnerRelationUtility.LovinMtbSinglePawnFactor(p); } protected override float MtbHours(Pawn p) { // No fapping for animals... for now, at least. // Maybe enable this for monsters girls and such in future, but that'll need code changes to avoid errors. if (xxx.is_animal(p)) return -1.0f; bool is_horny = xxx.need_some_sex(p) > 1f; if (is_horny) { bool isAlone = !p.Map.mapPawns.AllPawnsSpawned.Any(x => p.CanSee(x) && xxx.is_human(x)); // More likely to fap if alone. float aloneFactor = isAlone ? 0.6f : 1.2f; if (xxx.has_quirk(p, "Exhibitionist")) aloneFactor = isAlone ? 1.0f : 0.6f; // More likely to fap if nude. float clothingFactor = p.apparel.PsychologicallyNude ? 0.8f : 1.0f; float SexNeedFactor = (4 - xxx.need_some_sex(p)) / 2f; return get_fappin_mtb_hours(p) * SexNeedFactor * aloneFactor * clothingFactor; } return -1.0f; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Fappin.cs
C#
mit
1,252
using System; using UnityEngine; using Verse; using Verse.AI; using RimWorld; namespace rjw { /// <summary> /// Necro rape corpse /// </summary> public class ThinkNode_ChancePerHour_Necro : ThinkNode_ChancePerHour { protected override float MtbHours(Pawn pawn) { float base_mtb = xxx.config.comfort_prisoner_rape_mtbh_mul; // Default of 4.0 float desire_factor; { var need_sex = pawn.needs.TryGetNeed<Need_Sex>(); if (need_sex != null) { if (need_sex.CurLevel <= need_sex.thresh_frustrated()) desire_factor = 0.15f; else if (need_sex.CurLevel <= need_sex.thresh_horny()) desire_factor = 0.60f; else if (need_sex.CurLevel <= need_sex.thresh_satisfied()) desire_factor = 1.00f; else // Recently had sex. desire_factor = 2.00f; } else desire_factor = 1.00f; } float personality_factor; { personality_factor = 1.0f; if (xxx.is_nympho(pawn)) personality_factor *= 0.8f; if (xxx.is_prude(pawn) || pawn.story.traits.HasTrait(TraitDefOf.BodyPurist)) personality_factor *= 2f; if (xxx.is_psychopath(pawn)) personality_factor *= 0.5f; // Pawns with no necrophiliac trait should first try to find other outlets. if (!xxx.is_necrophiliac(pawn)) personality_factor *= 8f; else personality_factor *= 0.5f; // Less likely to engage in necrophilia if the pawn has a lover. if (!xxx.isSingleOrPartnerNotHere(pawn)) personality_factor *= 1.25f; // Pawns with no records of prior necrophilia are less likely to engage in it. if (pawn.records.GetValue(xxx.CountOfSexWithCorpse) == 0) personality_factor *= 16f; else if (pawn.records.GetValue(xxx.CountOfSexWithCorpse) > 10) personality_factor *= 0.8f; } float fun_factor; { if ((pawn.needs.joy != null) && (xxx.is_necrophiliac(pawn))) fun_factor = Mathf.Clamp01(0.50f + pawn.needs.joy.CurLevel); else fun_factor = 1.00f; } // I'm normally against gender factors, but necrophilia is far more frequent among males. -Zaltys float gender_factor = (pawn.gender == Gender.Male) ? 1.0f : 3.0f; return base_mtb * desire_factor * personality_factor * fun_factor * gender_factor; } public override ThinkResult TryIssueJobPackage(Pawn pawn, JobIssueParams jobParams) { try { return base.TryIssueJobPackage(pawn, jobParams); } catch (NullReferenceException) { return ThinkResult.NoJob; } } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Necro.cs
C#
mit
2,480
//using System; //using RimWorld; //using UnityEngine; //using Verse; //using Verse.AI; // //namespace rjw //{ // /// <summary> // /// not used? // /// </summary> // public class ThinkNode_ChancePerHour_RandomRape : ThinkNode_ChancePerHour // { // protected override float MtbHours(Pawn pawn) // { // var base_mtb = xxx.config.comfort_prisoner_rape_mtbh_mul; // // float desire_factor; // { // var need_sex = pawn.needs.TryGetNeed<Need_Sex>(); // if (need_sex != null) // { // if (need_sex.CurLevel <= need_sex.thresh_frustrated()) // desire_factor = 0.15f; // else if (need_sex.CurLevel <= need_sex.thresh_horny()) // desire_factor = 0.60f; // else // desire_factor = 1.00f; // } // else // desire_factor = 1.00f; // } // // float personality_factor; // { // personality_factor = 1.0f; // if (pawn.story != null) // { // foreach (var trait in pawn.story.traits.allTraits) // { // if (trait.def == TraitDefOf.Bloodlust) personality_factor *= 0.25f; // else if (trait.def == TraitDefOf.Brawler) personality_factor *= 0.50f; // else if (trait.def == TraitDefOf.Psychopath) personality_factor *= 0.50f; // else if (trait.def == TraitDefOf.Kind) personality_factor *= 30.00f; // } // } // } // // float fun_factor; // { // if ((pawn.needs.joy != null) && (xxx.is_bloodlust(pawn))) // fun_factor = Mathf.Clamp01(0.50f + pawn.needs.joy.CurLevel); // else // fun_factor = 1.00f; // } // // var gender_factor = (pawn.gender == Gender.Male) ? 1.0f : 3.0f; // // return base_mtb * desire_factor * personality_factor * fun_factor * gender_factor; // } // // public override ThinkResult TryIssueJobPackage(Pawn pawn, JobIssueParams jobParams) // { // try // { // return base.TryIssueJobPackage(pawn, jobParams); // } // catch (NullReferenceException) // { // return ThinkResult.NoJob; ; // } // } // } //}
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ChancePerHour_RandomRape.cs
C#
mit
1,946
using System; using RimWorld; using UnityEngine; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Colonists and prisoners try to rape CP /// </summary> public class ThinkNode_ChancePerHour_RapeCP : ThinkNode_ChancePerHour { protected override float MtbHours(Pawn pawn) { var base_mtb = xxx.config.comfort_prisoner_rape_mtbh_mul; //Default 4.0 float desire_factor; { var need_sex = pawn.needs.TryGetNeed<Need_Sex>(); if (need_sex != null) { if (need_sex.CurLevel <= need_sex.thresh_frustrated()) desire_factor = 0.10f; else if (need_sex.CurLevel <= need_sex.thresh_horny()) desire_factor = 0.50f; else desire_factor = 1.00f; } else desire_factor = 1.00f; } float personality_factor; { personality_factor = 1.0f; if (xxx.has_traits(pawn)) { // Most of the checks are done in the xxx.would_rape method. personality_factor = 1.0f; if (!RJWSettings.rape_beating) { if (xxx.is_bloodlust(pawn)) personality_factor *= 0.5f; } if (xxx.is_nympho(pawn)) personality_factor *= 0.5f; else if (xxx.is_prude(pawn) || pawn.story.traits.HasTrait(TraitDefOf.BodyPurist)) personality_factor *= 2f; if (xxx.is_rapist(pawn)) personality_factor *= 0.5f; if (xxx.is_psychopath(pawn)) personality_factor *= 0.75f; else if (xxx.is_kind(pawn)) personality_factor *= 5.0f; float rapeCount = pawn.records.GetValue(xxx.CountOfRapedHumanlikes) + pawn.records.GetValue(xxx.CountOfRapedAnimals) + pawn.records.GetValue(xxx.CountOfRapedInsects) + pawn.records.GetValue(xxx.CountOfRapedOthers); // Pawns with few or no rapes are more reluctant to rape CPs. if (rapeCount < 3.0f) personality_factor *= 1.5f; } } float fun_factor; { if ((pawn.needs.joy != null) && (xxx.is_rapist(pawn) || xxx.is_psychopath(pawn))) fun_factor = Mathf.Clamp01(0.50f + pawn.needs.joy.CurLevel); else fun_factor = 1.00f; } float animal_factor = 1.0f; if (xxx.is_animal(pawn)) { // Much slower for female animals. animal_factor = (Genital_Helper.has_penis(pawn) || Genital_Helper.has_penis_infertile(pawn)) ? 2.5f : 6f; } //if (xxx.is_animal(pawn)) { Log.Message("Chance for " + pawn + " : " + base_mtb * desire_factor * personality_factor * fun_factor * animal_factor); } return base_mtb * desire_factor * personality_factor * fun_factor * animal_factor; } public override ThinkResult TryIssueJobPackage(Pawn pawn, JobIssueParams jobParams) { try { return base.TryIssueJobPackage(pawn, jobParams); } catch (NullReferenceException) { return ThinkResult.NoJob; ; } } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ChancePerHour_RapeCP.cs
C#
mit
2,808
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Called to determine if the non animal is eligible for a Bestiality job /// </summary> public class ThinkNode_ConditionalBestiality : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { //if (p.Faction != null && p.Faction.IsPlayer) // Log.Message("[RJW]ThinkNode_ConditionalBestiality " + xxx.get_pawnname(p) + " is animal: " + xxx.is_animal(p)); // No bestiality for animals, animal-on-animal is handled in Breed job. if (xxx.is_animal(p)) return false; if (DebugSettings.alwaysDoLovin) return true; // Bestiality off if (!RJWSettings.bestiality_enabled) return false; // No free will while designated for rape. if (p.IsDesignatedComfort() && !RJWSettings.WildMode) return false; return true; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalBestiality.cs
C#
mit
842
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Called to determine if the animal is eligible for a breed job /// </summary> public class ThinkNode_ConditionalCanBreed : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { //Log.Message("[RJW]ThinkNode_ConditionalCanBreed " + p); //Rimworld of Magic polymorphed humanlikes also get animal think node //if (p.Faction != null && p.Faction.IsPlayer) // Log.Message("[RJW]ThinkNode_ConditionalCanBreed " + xxx.get_pawnname(p) + " is animal: " + xxx.is_animal(p)); // No Breed jobs for humanlikes, that's handled by bestiality. if (!xxx.is_animal(p)) return false; if (DebugSettings.alwaysDoLovin) return true; // Animal stuff disabled. if (!RJWSettings.bestiality_enabled && !RJWSettings.animal_on_animal_enabled) return false; //return p.IsDesignatedBreedingAnimal() || RJWSettings.WildMode; return p.IsDesignatedBreedingAnimal(); } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalCanBreed.cs
C#
mit
977
using Verse; using Verse.AI; using RimWorld; namespace rjw { public class ThinkNode_ConditionalCanRapeCP : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { //Log.Message("[RJW]ThinkNode_ConditionalCanRapeCP " + pawn); if (DebugSettings.alwaysDoLovin) return true; if (!RJWSettings.rape_enabled) return false; // Hostiles cannot use CP. if (p.HostileTo(Faction.OfPlayer)) return false; // Designated pawns are not allowed to rape other CP. if (p.IsDesignatedComfort()) return false; // Animals cannot rape CP if the setting is disabled. if (!(RJWSettings.bestiality_enabled && RJWSettings.animal_CP_rape) && xxx.is_animal(p) ) return false; // Visitors(humans) cannot rape CP if the setting is disabled. if (!RJWSettings.visitor_CP_rape && p.Faction?.IsPlayer == false && xxx.is_human(p)) return false; // Visitors(animals/caravan) cannot rape CP if the setting is disabled. if (!RJWSettings.visitor_CP_rape && p.Faction?.IsPlayer == false && p.Faction != Faction.OfInsects && xxx.is_animal(p)) return false; // Wild animals, insects cannot rape CP. if ((p.Faction == null || p.Faction == Faction.OfInsects) && xxx.is_animal(p)) return false; return true; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalCanRapeCP.cs
C#
mit
1,278
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Pawn frustrated /// </summary> public class ThinkNode_ConditionalFrustrated : ThinkNode_Conditional { protected override bool Satisfied (Pawn p) { return xxx.need_some_sex(p) > 2f; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalFrustrated.cs
C#
mit
268
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Pawn is horny /// </summary> public class ThinkNode_ConditionalHorny : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { return xxx.need_some_sex(p) > 1f; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalHorny.cs
C#
mit
260
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Called to determine if the pawn can engage in necrophilia. /// </summary> public class ThinkNode_ConditionalNecro : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { //Log.Message("[RJW]ThinkNode_ConditionalNecro " + p); if (DebugSettings.alwaysDoLovin) return true; if (!RJWSettings.necrophilia_enabled) return false; // No necrophilia for animals. At least for now. // This would be easy to enable, if we actually want to add it. if (xxx.is_animal(p)) return false; // No free will while designated for rape. if (p.IsDesignatedComfort() && !RJWSettings.WildMode) return false; return true; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalNecro.cs
C#
mit
739
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Nymph nothing to do, seek sex-> join in bed /// </summary> public class ThinkNode_ConditionalNympho : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { if (xxx.is_nympho(p)) if (p.Faction == null || !p.Faction.IsPlayer) return false; else return true; return false; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalNympho.cs
C#
mit
393
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Rapist, chance to trigger random rape /// </summary> public class ThinkNode_ConditionalRapist : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { if (!RJWSettings.rape_enabled) return false; if (xxx.is_animal(p)) return false; if (DebugSettings.alwaysDoLovin || RJWSettings.WildMode) return true; // No free will while designated for rape. if (p.IsDesignatedComfort()) return false; if (!xxx.is_rapist(p)) return false; if (!xxx.isSingleOrPartnerNotHere(p)) { return false; } else return true; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalRapist.cs
C#
mit
659
using Verse; using Verse.AI; namespace rjw { /// <summary> /// Called to determine if the pawn can engage in sex. /// This should be used as the first conditional for sex-related thinktrees. /// </summary> public class ThinkNode_ConditionalSexChecks : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { //Log.Message("[RJW]ThinkNode_ConditionalSexChecks " + xxx.get_pawnname(p)); //if (p.Faction != null && p.Faction.IsPlayer) // Log.Message("[RJW]ThinkNode_ConditionalSexChecks " + xxx.get_pawnname(p) + " is animal: " + xxx.is_animal(p)); // Downed, Drafted and Awake are checked in core ThinkNode_ConditionalCanDoConstantThinkTreeJobNow. if (p.Map == null) return false; // Override starvation/health when in debug. if (DebugSettings.alwaysDoLovin) return true; // Setting checks. if (xxx.is_human(p) && p.ageTracker.AgeBiologicalYears < RJWSettings.sex_minimum_age) return false; else if (xxx.is_animal(p) && !RJWSettings.bestiality_enabled && !RJWSettings.animal_on_animal_enabled) return false; // No sex while starving or badly hurt. return ((!p.needs?.food?.Starving) ?? true && xxx.is_healthy_enough(p)); } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalSexChecks.cs
C#
mit
1,212
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// No idea what this is, dosnt look to be used anywhere /// </summary> public class ThinkNode_ConditionalTrait : ThinkNode_Conditional { private TraitDef trait; public override ThinkNode DeepCopy(bool resolve = true) { ThinkNode_ConditionalTrait thinkNode_ConditionalTrait = (ThinkNode_ConditionalTrait)base.DeepCopy(resolve); thinkNode_ConditionalTrait.trait = this.trait; return thinkNode_ConditionalTrait; } protected override bool Satisfied(Pawn pawn) { if (trait == null) if (pawn.story != null) { //--Log.Message(xxx.get_pawnname(pawn)+" has trait" + this.trait.defName + ":" + pawn.story.traits.HasTrait(this.trait)); return pawn.story.traits.HasTrait(this.trait); } return false; } } }
Mewtopian/rjw
Source/ThinkTreeNodes/ThinkNode_ConditionalTrait.cs
C#
mit
831
using RimWorld; using Verse; namespace rjw { public class ThoughtWorker_FeelingBroken : ThoughtWorker { protected override ThoughtState CurrentStateInternal(Pawn p) { var brokenstages = p.health.hediffSet.GetFirstHediffOfDef(xxx.feelingBroken); if (brokenstages != null && brokenstages.CurStageIndex != 0) { return ThoughtState.ActiveAtStage(brokenstages.CurStageIndex - 1); } return ThoughtState.Inactive; } } }
Mewtopian/rjw
Source/Thoughts/ThoughtWorker_FeelingBroken.cs
C#
mit
444
using RimWorld; using Verse; namespace rjw { public class ThoughtWorker_NeedSex : ThoughtWorker { protected override ThoughtState CurrentStateInternal(Pawn p) { var sex_need = p.needs.TryGetNeed<Need_Sex>(); var p_age = p.ageTracker.AgeBiologicalYears; if (sex_need != null && (p_age > RJWSettings.sex_minimum_age || (!xxx.is_human(p) && p.ageTracker.CurLifeStage.reproductive))) { var lev = sex_need.CurLevel; if (lev <= sex_need.thresh_frustrated()) return ThoughtState.ActiveAtStage(0); else if (lev <= sex_need.thresh_horny()) return ThoughtState.ActiveAtStage(1); else if (lev >= sex_need.thresh_ahegao()) return ThoughtState.ActiveAtStage(3); else if (lev >= sex_need.thresh_satisfied()) return ThoughtState.ActiveAtStage(2); else return ThoughtState.Inactive; } else return ThoughtState.Inactive; } } }
Mewtopian/rjw
Source/Thoughts/ThoughtWorker_NeedSex.cs
C#
mit
890
using RimWorld; using Verse; namespace rjw { //This thought system of RW is retarded AF. It needs separate thought handler for each hediff. public abstract class ThoughtWorker_SexChange : ThoughtWorker { public virtual HediffDef hediff_served { get; } protected override ThoughtState CurrentStateInternal(Pawn pawn) { //Log.Message(" "+this.GetType() + " is called for " + pawn +" and hediff" + hediff_served); Hediff denial = pawn.health.hediffSet.GetFirstHediffOfDef(hediff_served); //Log.Message("Hediff of the class is null " + (hediff_served == null)); if (denial != null && denial.CurStageIndex!=0) { //Log.Message("Current denial level is " + denial.CurStageIndex ); return ThoughtState.ActiveAtStage(denial.CurStageIndex-1); } return ThoughtState.Inactive; } } public class ThoughtWorker_MtT : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.m2t; } } } public class ThoughtWorker_MtF:ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.m2f; } } } public class ThoughtWorker_MtH : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.m2h; } } } public class ThoughtWorker_FtT : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.f2t; } } } public class ThoughtWorker_FtM : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.f2m; } } } public class ThoughtWorker_FtH : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.f2h; } } } public class ThoughtWorker_HtT : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.h2t; } } } public class ThoughtWorker_HtM : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.h2m; } } } public class ThoughtWorker_HtF : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.h2f; } } } public class ThoughtWorker_TtH : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.t2h; } } } public class ThoughtWorker_TtM : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.t2m; } } } public class ThoughtWorker_TtF : ThoughtWorker_SexChange { public override HediffDef hediff_served { get { return GenderHelper.t2f; } } } }
Mewtopian/rjw
Source/Thoughts/ThoughtWorker_SexChange.cs
C#
mit
2,531
using Verse; using Verse.AI.Group; namespace rjw { public class Trigger_SexSatisfy : TriggerFilter { private const int CheckInterval = 120; private const int TickTimeout = 900; private int currentTick = 0; public float targetValue = 0.3f; public Trigger_SexSatisfy(float t) { this.targetValue = t; currentTick = 0; } public override bool AllowActivation(Lord lord, TriggerSignal signal) { currentTick++; if (signal.type == TriggerSignalType.Tick && Find.TickManager.TicksGame % CheckInterval == 0) { float? avgValue = null; foreach (var pawn in lord.ownedPawns) { /*foreach(Pawn p in lord.Map.mapPawns.PawnsInFaction(Faction.OfPlayer)) { }*/ Need_Sex n = pawn.needs.TryGetNeed<Need_Sex>(); //if (n != null && pawn.gender == Gender.Male && !pawn.Downed) if(xxx.can_rape(pawn) && xxx.is_healthy_enough(pawn) && xxx.IsTargetPawnOkay(pawn) && Find.TickManager.TicksGame > pawn.mindState.canLovinTick) { avgValue = (avgValue == null) ? n.CurLevel : (avgValue + n.CurLevel) / 2f; } } //--Log.Message("[ABF]Trigger_SexSatisfy::ActivateOn Checked value :" + avgValue + "/" + targetValue); return avgValue == null || avgValue >= targetValue; } return currentTick >= TickTimeout; } } }
Mewtopian/rjw
Source/Triggers/Trigger_SexSatisfy.cs
C#
mit
1,295
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to rape a comfort prisoner /// </summary> public class WorkGiver_BestialityF : WorkGiver_RJW_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { if (!RJWSettings.rape_enabled) return false; Pawn target = t as Pawn; if (!RJWSettings.WildMode) { if (xxx.is_kind(pawn)) { JobFailReason.Is("refuses to rape"); return false; } //satisfied pawns //horny non rapists if ((xxx.need_some_sex(pawn) <= 1f) || (xxx.need_some_sex(pawn) <= 2f && !(xxx.is_rapist(pawn) || xxx.is_psychopath(pawn) || xxx.is_nympho(pawn)))) { JobFailReason.Is("not horny enough"); return false; } if (!target.IsDesignatedComfort()) { //JobFailReason.Is("not designated as CP", null); return false; } if (!xxx.is_healthy_enough(target) || !xxx.is_not_dying(target) && (xxx.is_bloodlust(pawn) || xxx.is_psychopath(pawn) || xxx.is_rapist(pawn) || xxx.has_quirk(pawn, "Somnophile"))) { //--Log.Message("[RJW]WorkGiver_RapeCP::HasJobOnThing called0 - target isn't healthy enough or is in a forbidden position."); JobFailReason.Is("target not healthy enough"); return false; } if (pawn.relations.OpinionOf(target) > 50 && !xxx.is_rapist(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_masochist(target)) { JobFailReason.Is("refuses to rape a friend"); return false; } if (!xxx.can_rape(pawn)) { //--Log.Message("[RJW]WorkGiver_RapeCP::HasJobOnThing called1 - pawn don't need sex or is not healthy, or cannot rape"); JobFailReason.Is("cannot rape target (vulnerability too low, or age mismatch)"); return false; } if (!xxx.isSingleOrPartnerNotHere(pawn) && !xxx.is_lecher(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_nympho(pawn)) if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target)) { //--Log.Message("[RJW]WorkGiver_RapeCP::HasJobOnThing called2 - pawn is not single or has partner around"); JobFailReason.Is("cannot rape while in stable relationship"); return false; } } if (!pawn.CanReserve(target, xxx.max_rapists_per_prisoner, 0)) return false; //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { //--Log.Message("[RJW]WorkGiver_RapeCP::JobOnThing(" + xxx.get_pawnname(pawn) + "," + t.ToStringSafe() + ") is called."); return new Job(xxx.comfort_prisoner_rapin, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_BestialityF.cs
C#
mit
2,666
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to breed animal(passive) /// </summary> public class WorkGiver_BestialityForFemale : WorkGiver_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + ":: base checks: pass"); if (!RJWSettings.bestiality_enabled) return false; Pawn target = t as Pawn; if (!WorkGiverChecks(pawn, t, forced)) return false; if (!xxx.can_be_fucked(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("pawn cant be fucked"); return false; } if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { if (!xxx.is_zoophile(pawn) && !xxx.is_frustrated(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("not willing to have sex with animals"); return false; } if (xxx.need_some_sex(pawn) < 2f) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } if (!xxx.is_healthy_enough(target)) { if (RJWSettings.DevMode) JobFailReason.Is("target not healthy enough"); return false; } //Log.Message("[RJW]WorkGiver_BestialityForFemale::" + xxx.would_fuck_animal(pawn, target)); if (xxx.would_fuck_animal(pawn, target) < 0.1f) { return false; } //add some more fancy conditions from JobGiver_Bestiality? } //Log.Message("[RJW]" + this.GetType().ToString() + ":: extended checks: can start sex"); return true; } public override bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { Pawn target = t as Pawn; if (!xxx.is_animal(target)) { return false; } Building_Bed bed = pawn.ownership.OwnedBed; if (bed == null) { if (RJWSettings.DevMode) JobFailReason.Is("pawn has no bed"); return false; } if (!target.CanReach(bed, PathEndMode.OnCell, Danger.Some) || target.Downed) { if (RJWSettings.DevMode) JobFailReason.Is("target cant reach bed"); return false; } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { Building_Bed bed = pawn.ownership.OwnedBed; return new Job(xxx.bestialityForFemale, t, bed, bed.SleepPosOfAssignedPawn(pawn)); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_BestialityForFemale.cs
C#
mit
2,314
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to breed animal(active) /// </summary> public class WorkGiver_BestialityForMale : WorkGiver_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + " base checks: pass"); if (!RJWSettings.bestiality_enabled) return false; Pawn target = t as Pawn; if (!WorkGiverChecks(pawn, t, forced)) return false; if (!xxx.can_be_fucked(target)) { if (RJWSettings.DevMode) JobFailReason.Is("target cant be fucked"); return false; } if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { if (!xxx.is_zoophile(pawn) && !xxx.is_frustrated(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("not willing to have sex with animals"); return false; } if (xxx.need_some_sex(pawn) < 2f) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } if (!xxx.is_healthy_enough(target) || !xxx.is_not_dying(target) && (xxx.is_bloodlust(pawn) || xxx.is_psychopath(pawn) || xxx.has_quirk(pawn, "Somnophile"))) { if (RJWSettings.DevMode) JobFailReason.Is("target not healthy enough"); return false; } //Log.Message("[RJW]WorkGiver_BestialityForMale::" + xxx.would_fuck_animal(pawn, target)); if (xxx.would_fuck_animal(pawn, target) < 0.1f) { return false; } //add some more fancy conditions from JobGiver_Bestiality? } //Log.Message("[RJW]" + this.GetType().ToString() + ":: extended checks: can start sex"); return true; } public override bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { Pawn target = t as Pawn; if (!xxx.is_animal(target)) { return false; } if (!xxx.can_fuck(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("cant fuck"); return false; } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.bestiality, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_BestialityForMale.cs
C#
mit
2,118
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to rape a comfort prisoner /// </summary> public class WorkGiver_BestialityM : WorkGiver_RJW_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { if (!RJWSettings.rape_enabled) return false; Pawn target = t as Pawn; if (!RJWSettings.WildMode) { if (xxx.is_kind(pawn)) { JobFailReason.Is("refuses to rape"); return false; } //satisfied pawns //horny non rapists if ((xxx.need_some_sex(pawn) <= 1f) || (xxx.need_some_sex(pawn) <= 2f && !(xxx.is_rapist(pawn) || xxx.is_psychopath(pawn) || xxx.is_nympho(pawn)))) { JobFailReason.Is("not horny enough"); return false; } if (!target.IsDesignatedComfort()) { //JobFailReason.Is("not designated as CP", null); return false; } if (!xxx.is_healthy_enough(target) || !xxx.is_not_dying(target) && (xxx.is_bloodlust(pawn) || xxx.is_psychopath(pawn) || xxx.is_rapist(pawn) || xxx.has_quirk(pawn, "Somnophile"))) { //--Log.Message("[RJW]WorkGiver_RapeCP::HasJobOnThing called0 - target isn't healthy enough or is in a forbidden position."); JobFailReason.Is("target not healthy enough"); return false; } if (pawn.relations.OpinionOf(target) > 50 && !xxx.is_rapist(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_masochist(target)) { JobFailReason.Is("refuses to rape a friend"); return false; } if (!xxx.can_rape(pawn)) { //--Log.Message("[RJW]WorkGiver_RapeCP::HasJobOnThing called1 - pawn don't need sex or is not healthy, or cannot rape"); JobFailReason.Is("cannot rape target (vulnerability too low, or age mismatch)"); return false; } if (!xxx.isSingleOrPartnerNotHere(pawn) && !xxx.is_lecher(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_nympho(pawn)) if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target)) { //--Log.Message("[RJW]WorkGiver_RapeCP::HasJobOnThing called2 - pawn is not single or has partner around"); JobFailReason.Is("cannot rape while in stable relationship"); return false; } } if (!pawn.CanReserve(target, xxx.max_rapists_per_prisoner, 0)) return false; //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { //--Log.Message("[RJW]WorkGiver_RapeCP::JobOnThing(" + xxx.get_pawnname(pawn) + "," + t.ToStringSafe() + ") is called."); return new Job(xxx.comfort_prisoner_rapin, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_BestialityM.cs
C#
mit
2,666
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to cleanup/collect sex fluids /// </summary> //TODO: add sex fluid collection/cleaning public class WorkGiver_CleanSexStuff : WorkGiver_Sexchecks { public override ThingRequest PotentialWorkThingRequest => ThingRequest.ForGroup(ThingRequestGroup.filth); public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { return false; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return null; } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_CleanSexStuff.cs
C#
mit
561
using RimWorld; using Verse; using Verse.AI; using System.Linq; namespace rjw { /// <summary> /// Assigns a pawn to fap /// </summary> public class WorkGiver_Fap : WorkGiver_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + " base checks: pass"); Pawn target = t as Pawn; if (target != pawn) { return false; } if (!pawn.CanReserve(target, xxx.max_rapists_per_prisoner, 0)) return false; if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { if (!xxx.is_nympho(pawn)) if ((xxx.need_some_sex(pawn) < 2f)) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } //TODO: more exhibitionsts checks? bool canbeseen = false; foreach (Pawn bystander in pawn.Map.mapPawns.AllPawnsSpawned.Where(x => xxx.is_human(x) && x != pawn)) { // dont see through walls, dont see whole map, only 15 cells around if (pawn.CanSee(bystander) && pawn.Position.DistanceToSquared(bystander.Position) < 15) { //if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, bystander)) canbeseen = true; } } if (!xxx.has_quirk(pawn, "Exhibitionist") && canbeseen) { if (RJWSettings.DevMode) JobFailReason.Is("can be seen"); return false; } if (xxx.has_quirk(pawn, "Exhibitionist") && !canbeseen) { if (RJWSettings.DevMode) JobFailReason.Is("can not be seen"); return false; } } //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.quickfap, t.Position); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_Fap.cs
C#
mit
1,822
using RimWorld; using Verse; using Verse.AI; using System.Linq; namespace rjw { /// <summary> /// Assigns a pawn to fap in bed /// </summary> public class WorkGiver_Fap_bed : WorkGiver_Sexchecks { public override ThingRequest PotentialWorkThingRequest => ThingRequest.ForGroup(ThingRequestGroup.BuildingArtificial); public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + " base checks: pass"); Building_Bed target = t as Building_Bed; if (target == null) { if (RJWSettings.DevMode) JobFailReason.Is("not a bed"); return false; } if (!target.AssignedPawns.Contains(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("not pawn bed"); return false; } /* if (!target.AssignedPawns.Contains(pawn)) if (!pawn.CanReserve(target, target.SleepingSlotsCount, 0) && (!target.AnyUnownedSleepingSlot)) { if (RJWSettings.DevMode) JobFailReason.Is("no space in bed"); return false; } */ if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { if (!xxx.is_nympho(pawn)) if ((xxx.need_some_sex(pawn) < 2f)) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } if (target.CurOccupants.Count() != 0) { if (target.CurOccupants.Count() == 1 && !target.CurOccupants.Contains(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("bed not empty"); return false; } if (target.CurOccupants.Count() > 1) { if (RJWSettings.DevMode) JobFailReason.Is("bed not empty"); return false; } } //TODO: more exhibitionsts checks? bool canbeseen = false; foreach (Pawn bystander in pawn.Map.mapPawns.AllPawnsSpawned.Where(x => xxx.is_human(x) && x != pawn)) { // dont see through walls, dont see whole map, only 15 cells around if (target.CanSee(bystander) && target.Position.DistanceToSquared(bystander.Position) < 15) { //if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, bystander)) canbeseen = true; } } if (!xxx.has_quirk(pawn, "Exhibitionist") && canbeseen) { if (RJWSettings.DevMode) JobFailReason.Is("can be seen"); return false; } if (xxx.has_quirk(pawn, "Exhibitionist") && !canbeseen) { if (RJWSettings.DevMode) JobFailReason.Is("can not be seen"); return false; } } //experimental change textures of bed to whore bed //Log.Message("[RJW] bed " + t.GetType().ToString() + " path " + t.Graphic.data.texPath); //t.Graphic.data.texPath = "Things/Building/Furniture/Bed/DoubleBedWhore"; //t.Graphic.path = "Things/Building/Furniture/Bed/DoubleBedWhore"; //t.DefaultGraphic.data.texPath = "Things/Building/Furniture/Bed/DoubleBedWhore"; //t.DefaultGraphic.path = "Things/Building/Furniture/Bed/DoubleBedWhore"; //Log.Message("[RJW] bed " + t.GetType().ToString() + " texPath " + t.Graphic.data.texPath); //Log.Message("[RJW] bed " + t.GetType().ToString() + " drawSize " + t.Graphic.data.drawSize); //t.Draw(); //t.ExposeData(); //Scribe_Values.Look(ref t.Graphic.data.texPath, t.Graphic.data.texPath, "Things/Building/Furniture/Bed/DoubleBedWhore", true); //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.fappin, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_Fap_Bed.cs
C#
mit
3,545
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to rape /// </summary> public class WorkGiver_Rape : WorkGiver_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + " base checks: pass"); if (!RJWSettings.rape_enabled) return false; Pawn target = t as Pawn; if (target == pawn) { //JobFailReason.Is("no self rape", null); return false; } if (!WorkGiverChecks(pawn, t, forced)) return false; if (!xxx.is_human(target)) { return false; } if (!pawn.CanReserve(target, xxx.max_rapists_per_prisoner, 0)) return false; if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { if (xxx.is_kind(pawn) || xxx.is_masochist(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("refuses to rape"); return false; } if (pawn.relations.OpinionOf(target) > 50 && !xxx.is_rapist(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_masochist(target)) { if (RJWSettings.DevMode) JobFailReason.Is("refuses to rape a friend"); return false; } if (!xxx.can_rape(pawn) || !xxx.can_get_raped(target)) { if (RJWSettings.DevMode) JobFailReason.Is("cannot rape target (vulnerability too low)"); return false; } //fail for: //satisfied pawns //horny non rapists if ((xxx.need_some_sex(pawn) <= 1f) || (xxx.need_some_sex(pawn) <= 2f && !(xxx.is_rapist(pawn) || xxx.is_psychopath(pawn) || xxx.is_nympho(pawn)))) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } if (!xxx.is_healthy_enough(target) || !xxx.is_not_dying(target) && (xxx.is_bloodlust(pawn) || xxx.is_psychopath(pawn) || xxx.is_rapist(pawn) || xxx.has_quirk(pawn, "Somnophile"))) { if (RJWSettings.DevMode) JobFailReason.Is("target not healthy enough"); return false; } if (!xxx.is_lecher(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_nympho(pawn)) if (!xxx.isSingleOrPartnerNotHere(pawn)) if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target)) { if (RJWSettings.DevMode) JobFailReason.Is("cannot rape while partner around"); return false; } //Log.Message("[RJW]WorkGiver_RapeCP::" + xxx.would_fuck(pawn, target)); if (xxx.would_fuck(pawn, target) < 0.1f) { return false; } } //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { Pawn target = t as Pawn; if (pawn.HostileTo(target) || target.IsDesignatedComfort()) { return false; } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.random_rape, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_Rape.cs
C#
mit
2,960
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to rape a comfort prisoner /// </summary> public class WorkGiver_RapeCP : WorkGiver_Rape { public override bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { Pawn target = t as Pawn; if (!target.IsDesignatedComfort()) { if (RJWSettings.DevMode) JobFailReason.Is("not designated as comfort", null); return false; } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.comfort_prisoner_rapin, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_RapeCP.cs
C#
mit
609
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to rape enemy /// </summary> public class WorkGiver_RapeEnemy : WorkGiver_Rape { public override bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { Pawn target = t as Pawn; if (!pawn.HostileTo(target)) { if (RJWSettings.DevMode) JobFailReason.Is("not hostile", null); return false; } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.RapeEnemy, t); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_RapeEnemy.cs
C#
mit
566
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to have sex with /// </summary> public class WorkGiver_Sex : WorkGiver_Sexchecks { public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + " base checks: pass"); Pawn target = t as Pawn; if (target == pawn) { //JobFailReason.Is("no self sex", null); return false; } if (!WorkGiverChecks(pawn, t, forced)) return false; if (!xxx.is_human(target)) { return false; } if (!pawn.CanReserve(target, xxx.max_rapists_per_prisoner, 0)) return false; if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { //check initiator //fail for: //satisfied non nymph pawns if (xxx.need_some_sex(pawn) <= 1f && !xxx.is_nympho(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } if (!xxx.IsTargetPawnOkay(target)) { if (RJWSettings.DevMode) JobFailReason.Is("target not healthy enough"); return false; } if (!xxx.is_lecher(pawn) && !xxx.is_psychopath(pawn) && !xxx.is_nympho(pawn)) if (!xxx.isSingleOrPartnerNotHere(pawn)) if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target)) { if (RJWSettings.DevMode) JobFailReason.Is("cannot have sex while partner around"); return false; } float relations = 0; float attraction = 0; if (!xxx.is_animal(target)) { relations = pawn.relations.OpinionOf(target); if (relations < RJWHookupSettings.MinimumRelationshipToHookup) { if (!(relations > 0 && xxx.is_nympho(pawn))) { if (RJWSettings.DevMode) JobFailReason.Is($"i dont like them:({relations})"); return false; } } attraction = pawn.relations.SecondaryRomanceChanceFactor(target); if (attraction < RJWHookupSettings.MinimumAttractivenessToHookup) { if (!(attraction > 0 && xxx.is_nympho(pawn))) { if (RJWSettings.DevMode) JobFailReason.Is($"i dont find them attractive:({attraction})"); return false; } } } //Log.Message("[RJW]WorkGiver_Sex::" + xxx.would_fuck(pawn, target)); if (xxx.would_fuck(pawn, target) < 0.1f) { return false; } if (!xxx.is_animal(target)) { //check partner if (xxx.need_some_sex(target) <= 1f && !xxx.is_nympho(target)) { if (RJWSettings.DevMode) JobFailReason.Is("partner not horny enough"); return false; } if (!xxx.is_lecher(target) && !xxx.is_psychopath(target) && !xxx.is_nympho(target)) if (!xxx.isSingleOrPartnerNotHere(target)) if (!LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target)) { if (RJWSettings.DevMode) JobFailReason.Is("partner cannot have sex while their partner around"); return false; } relations = target.relations.OpinionOf(pawn); if (relations <= RJWHookupSettings.MinimumRelationshipToHookup) { if (!(relations > 0 && xxx.is_nympho(target))) { if (RJWSettings.DevMode) JobFailReason.Is($"dont like me:({relations})"); return false; } } attraction = target.relations.SecondaryRomanceChanceFactor(pawn); if (attraction <= RJWHookupSettings.MinimumAttractivenessToHookup) { if (!(attraction > 0 && xxx.is_nympho(target))) { if (RJWSettings.DevMode) JobFailReason.Is($"doesnt find me attractive:({attraction})"); return false; } } } //Log.Message("[RJW]WorkGiver_Sex::" + xxx.would_fuck(target, pawn)); if (xxx.would_fuck(target, pawn) < 0.1f) { return false; } } //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { Pawn target = t as Pawn; if (pawn.HostileTo(target) || target.IsDesignatedComfort()) { return false; } return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { //TODO:: fix bed stealing during join other pawn //Building_Bed bed = pawn.ownership.OwnedBed; //if (bed == null) // bed = (t as Pawn).ownership.OwnedBed; Building_Bed bed = (t as Pawn).CurrentBed(); if (bed == null) return null; //if (pawn.CurrentBed() != (t as Pawn).CurrentBed()) // return null; return new Job(xxx.casual_sex, pawn, t as Pawn, bed); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_Sex.cs
C#
mit
4,674
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Allow pawn to have sex /// dunno if this should be used to allow manual sex start or limit it behind sort of "hero" designator for RP purposes, so player can only control 1 pawn directly? /// </summary> public class WorkGiver_Sexchecks : WorkGiver_Scanner { public override int LocalRegionsToScanFirst => 4; public override PathEndMode PathEndMode => PathEndMode.OnCell; public override ThingRequest PotentialWorkThingRequest => ThingRequest.ForGroup(ThingRequestGroup.Pawn); public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false) { if (!forced) //if (!(forced || RJWSettings.WildMode)) { //Log.Message("[RJW]WorkGiver_RJW_Sexchecks::not player interaction, exit:" + forced); return false; } if (!(RJWSettings.RPG_direct_control || (RJWSettings.RPG_hero_control && pawn.IsDesignatedHero() && pawn.IsHeroOwner()))) { //Log.Message("[RJW]WorkGiver_RJW_Sexchecks::direct_control disabled or not hero, exit"); return false; } Pawn target = t as Pawn; if (t is Corpse) { Corpse corpse = t as Corpse; target = corpse.InnerPawn; //Log.Message("[RJW]WorkGiver_RJW_Sexchecks::Pawn(" + xxx.get_pawnname(pawn) + "), Target corpse(" + xxx.get_pawnname(target) + ")"); } else { //Log.Message("[RJW]WorkGiver_RJW_Sexchecks::Pawn(" + xxx.get_pawnname(pawn) + "), Target pawn(" + xxx.get_pawnname(target) + ")"); } //Log.Message("1"); if (t == null || t.Map == null) { return false; } //Log.Message("2"); if (!(xxx.can_fuck(pawn) || xxx.can_be_fucked(pawn))) { //Log.Message("[RJW]WorkGiver_RJW_Sexchecks::JobOnThing(" + xxx.get_pawnname(pawn) + ") is cannot fuck or be fucked."); return false; } //Log.Message("3"); if (t is Pawn) if (!(xxx.can_fuck(target) || xxx.can_be_fucked(target))) { //Log.Message("[RJW]WorkGiver_RJW_Sexchecks::JobOnThing(" + xxx.get_pawnname(target) + ") is cannot fuck or be fucked."); return false; } //Log.Message("4"); //investigate AoA, someday //move this? //if (xxx.is_animal(pawn) && xxx.is_animal(target) && !RJWSettings.animal_on_animal_enabled) //{ // return false; //} if (!xxx.is_human(pawn) && !(xxx.RoMIsActive && pawn.health.hediffSet.HasHediff(HediffDef.Named("TM_ShapeshiftHD")))) { return false; } //Log.Message("5"); if (!pawn.CanReach(t, PathEndMode, Danger.Some)) { if (RJWSettings.DevMode) JobFailReason.Is( pawn.CanReach(t, PathEndMode, Danger.Deadly) ? "unable to reach target safely" : "target unreachable"); return false; } //Log.Message("6"); if (t.IsForbidden(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("target is outside of allowed area"); return false; } //Log.Message("7"); if (!pawn.IsDesignatedHero()) { if (!RJWSettings.WildMode) { if (pawn.IsDesignatedComfort() || pawn.IsDesignatedBreeding()) { if (RJWSettings.DevMode) JobFailReason.Is("designated pawns cannot initiate sex"); return false; } if (!xxx.is_healthy_enough(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("not healthy enough for sex"); return false; } if (xxx.is_asexual(pawn)) { if (RJWSettings.DevMode) JobFailReason.Is("refuses to have sex"); return false; } } } else { if (!pawn.IsHeroOwner()) { //Log.Message("[RJW]WorkGiver_Sexchecks::player interaction for not owned hero, exit"); return false; } } if (!MoreChecks(pawn, t, forced)) return false; return true; } public virtual bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { return false; } public virtual bool WorkGiverChecks(Pawn pawn, Thing t, bool forced = false) { return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return null; } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_Sexchecks.cs
C#
mit
3,994
using RimWorld; using Verse; using Verse.AI; namespace rjw { /// <summary> /// Assigns a pawn to rape a corpse /// </summary> public class WorkGiver_ViolateCorpse : WorkGiver_Sexchecks { public override ThingRequest PotentialWorkThingRequest => ThingRequest.ForGroup(ThingRequestGroup.Corpse); public override bool MoreChecks(Pawn pawn, Thing t, bool forced = false) { //Log.Message("[RJW]" + this.GetType().ToString() + " base checks: pass"); if (!RJWSettings.necrophilia_enabled) return false; //Pawn target = (t as Corpse).InnerPawn; if (!pawn.CanReserve(t, xxx.max_rapists_per_prisoner, 0)) return false; if (!pawn.IsDesignatedHero()) if (!RJWSettings.WildMode) { if (xxx.is_necrophiliac(pawn) && xxx.need_some_sex(pawn) < 2f) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } if (!xxx.is_necrophiliac(pawn)) if ((t as Corpse).CurRotDrawMode != RotDrawMode.Fresh) { if (RJWSettings.DevMode) JobFailReason.Is("refuse to rape rotten"); return false; } else if (xxx.need_some_sex(pawn) < 3f) { if (RJWSettings.DevMode) JobFailReason.Is("not horny enough"); return false; } //Log.Message("[RJW]WorkGiver_ViolateCorpse::" + xxx.would_fuck(pawn, t as Corpse)); if (xxx.would_fuck(pawn, t as Corpse) > 0.1f) { return false; } } //Log.Message("[RJW]" + this.GetType().ToString() + " extended checks: can start sex"); return true; } public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { return new Job(xxx.violate_corpse, t as Corpse); } } }
Mewtopian/rjw
Source/WorkGivers/WorkGiver_ViolateCorpse.cs
C#
mit
1,680
2.7.2 fixed error when trying to breed/rapecp and there no designators set 2.7.1 fixed beastilality error/disabled virginity 2.7.0 added designators storage, which should increase designator lookup by ~100 times, needs new game or manual designators resetting prevent demons, slimes and mechanoids from getting stds reduced maximum slider value of maxDistancetowalk to 5000, added check if it is less than 100 to use DistanceToSquared instead of pather, which should have less perfomance impact, but who knows is its even noticeable changed whoring and breeder helpers back to non static as it seems somehow contribute to lag disabled additional checks if pawn horny, etc in random rape, so if pawn gets that mental, it will actually do something fix for rape radius check error removed 60 cells radius for rape enemy disabled workgivers if direct control/hero off fix for ability to set more than 1 hero in mp update to widgets code, up to 6000% more fps renamed records yet another fix for virginity 2.6.4 changed IncreasedFertility/DecreasedFertility to apply to body, so it wont be removed by operation added patch for animal mating - instead of male gender - checks for penis disabled hooking for animals fixed 0 attraction/relations checks for hooking fix for virginity check fix for ovi not removing fertility, now both ovi remove it fix for breast growth/decrease defs AddBreastReduction by Mewtopian 2.6.3 added check to see if partner willing to fuck(since its consensual act) removed same bed requirement for consensual sex fixed direct control consensual sex condition check fixed direct control rape condition check fixed SocialCardUtilityPatch debugdata and extended/filtered with colonist/noncolonist/animals would_fuck check Merge branch 'debugData' into 'Dev', patch to SocialCardUtility to add some debug information for dev mode 2.6.2 fix for MultiAnus recipes 2.6.1 split cluster fuck of widget toggles into separate scripts fixed CP widget disabled widget box for non player/colony pawns added 50% chance futa "insect" to try fertilize eggs rather than always implanting 2.6.0 'AddBreastGrowthRecipes' by Mewtopian added trait requirement to CP/Bestiality description added toggle to disable hookups during work hours added adjustable target distance limiter for ai sex, based on pathing(pawns speed/terrain) cost, so pawns wont rush through whole map to fuck something, but will stay/check within (250 cost) ~20 cells, whoring and fapping capped at 100 cells added relationship and attraction filter for hookups(20, 50%), (0, 0% for nymphs) added debug override for cp/breed designators for cheaters added auto disable when animal-animal, bestiality disabled readded SexReassignment recipedef for other mods that are not updated fixed? error when trying to check relations of offmap partner fixed std's not (ever) working/applying, clean your rooms fixed animal designator error fixed warning for whoring RandomElement() spam changed necro, casual sex reservations from 1 to 6 changed aloneinbed checks to inbed to allow casual group sex(can only be initiated by player) some other changes you dont care about 2.5.1 fix error in Better Infestations xml patch, so it shouldnt dump error when mod not installed 2.5.0 overhauled egg pregnancies, old eggs and recipes were removed changed egging system from single race/patch/hardcode dependent to dynamic new system, rather than using predefined eggs for every race, generates generic egg that inherits properties of implanter and after being fertilized switches to fertilizer properties any pawn with female ovi can implant egg with characteristics of implanter race any pawn with male ovi can fertilize egg changing characteristics to ones of fertilizer race added settings to select implantation/fertilization mode - allow anyone/limit to same species added multiparent hive egg, so hivers can fertilize each other eggs regardless of above settings patch for better infestations to rape and egg victims changed insect birth to egg birth set demon parts tradeability to only sellable, so they shouldnt spawn at traders fix for ability to set multiple heros if 1st dies and get resurrected added hero ironman mode - one hero per save merged all repeating bondage stuff in abstract BondageBase added <isBad>false</isBad> tag to most hediffs so they dont get removed/healed by mech serums and who knows what moved contraceptive/aphrodisiac/humpshroom to separate /def/drugs changed humpshroom to foodtype, so it can be filtered from food pawn can eat added negative offset to humpshroom, so its less likely to be eaten added humpshroom to ingredients(no effect on food) changed rape enemy logic - animal will rape anyone they can, humans seek best victim(new: but will ignore targets that is already being raped) android compatibility: -no quirks for droids, always asexual orientation -no fert/infert quirk for androids -no fertility for (an)droids -no thoughts on sexchange for droids -sexuality reroll for androids when they go from genderless/asexual thing to depraved humanlike sexmachine -ability for androids to breed non android species with archotech genitals, outcome is non android 2.4.0 added new rjw parts class with multi part support, maybe in future sizes and some other stuff, needs new game or manually updating pawn healthtab rjw hediffs changed all surgery recipes, added recipes for multi part addition, only natural(red) parts can be added, parts cant be added if there is artifical part already added parts stacking toggle to debug settings added "penis", "pegdick", "tentacle" to has_multipenis check for double penetration sex fixed ability to add/remove parts to slimes, which should not be added blocks_anus condition to chastity belt, so pawn wont have sex at all, probably changed description CP rape -> comfort rape, so now fbi knocking you door chance is reduced by 0.01% improved virginity detection, now also checks for children relations added archotech_breasts to genital helper, maybe to be used in future added check of partner for vanilla lovin fix sex with partner ignoring would_fuck conditions disabled submit button for droids enabled drafting of droids in hero HC added toggles to disable fapping added sex filter for males and females - all/homo/nohomo 2.3.2 added thought GotRapedUnconscious fix vanilla animal pregnancy-> bestiality patch 2.3.1 fixed mark for breeding designator added disablers for servicing and milk designators when pawn is no longer colonist 2.3.0 added patch for nymphs to ignore "CheatedOnMe"(disabled by default) fixed necro patch ObservedRottingCorpse -> ObservedLayingRottingCorpse, which probably was not updated from B18? change to some bondage descriptions added hooking settings for: -visitors vs visitors -prisoner vs prisoner -reverse nymph homewreck(nymphs say no to sex, even if it bites them later) fixed bug that allowed setting multiple heroes re-enabled cum overlays, disabled add semen button in mp fixed overlays memory fill, overlays no longer has dif sizes, i think i've probably reduced cum amount disabled slimes cumming on themselves archo FertilityEnhancer, increases egg pregnancy gestation rate by 50% archo FertilityEnhancer, increases pregnancy gestation rate by 25% when archo FertilityEnhancer on, pawn age is ignored and fertility set to 100 reduced fertility bonus from increased fertility 50->25 reduced fertility bonus from archo fertility enchancer 60->25 added mp sync for bio - resexualization added mp sync for bio - archotech mode switch added "normal"(not ench and not blocked fertility) mode for archotech parts added sexuality change button for hero disabled slime parts change in mp fixed comfort and breeding designators stuck in "on" after releasing prisoner fixed? using xml race_filter, was applying breasts to males made installing flat chests to males not change them to traps 2.2.0 patch for pregnancy, less debug log spam futa / install part, exposed core operations cleaning fixed gizmo crash with hero HC reverted artifical parts from addedparts back to implants added hideBodyPartNames to remove part recipes added side scroll for basic and pregnancy settings randomtyping: Add mod settings to control hookups 2.1.2 randomtyping: Fix a crash in JoinInBed with offmap/dead lovers on nymphos. Add a mod option, disabled by default, to turn on spammy logging to help track down these issues. 2.1.1 fix for mating added option for bestiality to birth only humans or animals 2.1.0 added HaveSex workgiver to start sex with pawns in same bed fix for pregnancy checked/hacked state hardcore hero mode - disable controls for non hero pawns disable controls for non owned heros fix for implants to be counted toward transhumanist thoughts randomtyping: Pawns who don't have partners might hook up with other pawns who don't have partners. At least partners who are around right now... Nymphos no longer cheat on partners or homewreck. Pawns will consider AllPawns, not just FreeColonists, so that they can bang guests too. Haven't tested with prisoners but come on it's only like 98% likely to have a bug. Significantly increased the distance pawns will travel to find a hookup Added vanilla Got Some Lovin' thought to partners after casual sex Bug fix for xxx.HasNonPolyPartner() when neither RomanceDiversified or Psychology are active; it should have returned true when the pawn had any partner instead of false. vulnerability change to 3.5% per melee level instead of 5%. Don't add Got Some Lovin to whores while whoring. Add some limited casual sex mechanics and better hookups with partners! Give humpshroom addicts going through withdrawl a tiny amount of satisfaction so they aren't completely disabled. Make humpshroom grow in a reasonable amount of time, reduced price 2.0.9.2 fix for hero widget 2.0.9.1 disabled part removing patch, figure out someday how to add support to weird races, enjoy bleeding/frostbite mechanoids meanwhile 2.0.9 changed rand unity to verse slapped SyncMethod over everything rand added predictable seed, maybe figure out how it works someday rewrote widgets code(FML) desynced hero controls disabled hero controls for non owned hero disabled all workgivers for non owned hero disabled submit for non owned hero disabled all widgets when hero is imprisoned/enslaved disabled whoring in multiplayer, maybe fix it someday or not disabled mod settings in multiplayer disabled fix for stuck designators when prisoner join colony, refix someday later, maybe, clicking red designator should be enough to fix it disabled auto self cleaning(semen) for hero fix for insect pregnancy generating jelly at current map instead of mother's fix for recipe patcher, patch now works only for humanlikes and animals fix for gave virginity thought fix for error caused by factionless nymphs fix for miscarrying mechanoid pregnancies, no easy wayout added TookVirginity thought, maybe implement it some day, this year, maybe added parts remover for non humanlikes or animals, no more mechanoids frostbite? added patch for animal mating, remove vanilla pregnancy and apply rjw, maybe moved GetRapedAsComfortPrisoner record increase from any rape to rape cp only changed widget ForComfort description, added hero descriptions changed description of GetRapedAsComfortPrisoner record 2.0.8 fix for error when other mods remove Transhumanist trait fix for cum on body not being applied for futas disabled jobgivers for drafted pawns, so pawns should not try sexing while drafted renamed CumGenerator to CumFilthGenerator added girl cum/filth, maybe someday will have some use changed cum filth to spawn for penis wielders and girlcum for vagina, double mess for futas, yay!? slimes no longer generate cum filth cum on body no longer applied on receiving slimes, goes into their food need support for modsync version checking, probably broken, remove later? support for modmanager version checking 2.0.7 added ability to change slime parts at will(50% food need) for slime colonists/prisoners fixes for CnP/BnC changing gender of hero will result positive mood rather than random reduced FeelingBroken mood buff 40->20 2.0.6a fix for error when removing parts reduced SlimeGlob market value 500->1 2.0.6 multiplayer api, probably does nothing reorganized sources structure, moved overlays, pregnancy, bondage etc to mudules/ disabled semen overlays added operations support for all races, probably needs exclusion filters for mechanoids and stuff hidded restraints/cocoon operation if those hediffs not present removed needless/double operations from animals and humans fixed parts operation recipes changed sterilization -> sterilize rjw bodyparts can no longer be amputated 2.0.5b added toggle to select sexuality distribution: -RimJobWorld(default, configurable), -RationalRomance, -Psychology, -SYRIndividuality made slime organs not operable fix for egg pregnancies error changed egg birth faction inheritance: -hivers = no changes -human implanter+human fertilizer = implanter faction -human implanter+x = null(tamable) faction -animal implanter+ player fertilizer = null(tamable) faction -animal implanter+ non player fertilizer = implanter faction fixed VigorousQuirk description 2.0.5a fixes for sex settings descriptions disabled nymph think tree for non player colonists simplified? egg fertilization code changed pregnancy so if father is slime, baby will be slime disabled asexual orientation for nymphs(Rational romance can still roll asexual and stuff) renamed trait nymphomaniac => hypersexuality so it covers both genders 2.0.5 fix error for pawns not getting comps (MAI, RPP bots) fix for error when pawn tries to love downed animal fixed? non reversed interaction from passive bestiality fix error by egg considered fertilized when it isnt added kijin to cowgirl type pawn breast generation(excluding udders) changed animal pather so animal doesnt wait for pawn to reach bed changed nutrition increase from sex now requires oral sex and penis RimWorld of Magic: -succubus/warlock gain 10% mana from oral/vag/anal/dbl sex -succubus/warlock gain 25% rest, partner looses 25% rest -succubus immune to broken body debuff support for dubsbadhygiene -semen can be removed by washing - 1 at a time -all semen can be removing by using shower, bath, hottub -with dubsbadhygiene clean self workgiver disabled -oral sex increases DBH thirst need Zweifel merge (with my edits) -added slider to adjust semen on body amount (doesn't affect filth on ground) -increased base amount of semen per act, slowed down drying speed ~ 3 days -increased minimum size of overlays, so also smaller amounts should be visible now -fixed semen not being shown when pawn is sleeping -private parts semen is now also shown when pawn is positioned sideways 2.0.4 fixed abortion fix for cum error when having sex at age 0 changed pregnancy so slimes can only birth slimes changed(untested) egg pregnancy to birth implanter/queen faction for humanlikes, insect hive for insect hivers, non faction for other animals(spiders?) changed custom race genital support from pawn.kindDef.defName to pawn.kindDef.race.defName added filter/support for egging races(can implant eggs and fert them without ovis) support for nihal as egging test race added selffertilized property to eggs, implanted eggs will be fertilized by implanter 2.0.3 disabled non designated targets for breeders disabled rape beating for non human(animal) rapists changed male->futa operations jobstrings from Attaching to Adding added filters for featureless breast, no penis/vag/breast/anus excluded mechanoids for getting quirks some bondage compatibility stuff changed egging impregnation, so if insect can implant at least one egg it'll do so moved some settings from basic settings menu to debug, should not tear mod settings anymore... for now changed pregnancy detection, pregnancies now need check to determine what kind of pregnancy it is changed abortions so they cant be done until player do pregnancy check added operation to hack mechanoid, so it wont try to kill everyone once birthed changes to menu descriptions and new pregnancy description 2.0.2 added checks for infertile penis(aka tentacles and pegdick), so maybe slimes will rape and breed and stuff... or everything will be broken and rip the mod renamed cum options and descriptions, added option for cum overlays added item commonality of 0 to hololocks and keys, so maybe zombies wont drop them changed chains modifiers from -75% to 35% max removed relations: dom/sub/breeder changed insect restraints to cocoon, cocoon will tend and feed pawn mech pregnancy birth now destroys everything inside torso, failed to add blood ... oh well, we are family friendly game after all changed birthed ai from assault colony to defend ship, so it wont leave until everything is dead reduced births needed for incubator quirk to 100 2.0.1 bearlyAliveLL support for lost forest Zweifel bukkake addon ekss: Changes to bondage gear -allows hediff targeted to body parts -allows restriction of selected body part groups from melee actions, in combination with 0 manipulation restricts from using weapons too -changed harmony patch for on_remove function to allow bondage gear without hololock -changes to existing bondage items, their hediffs will be shown on relevant body parts -added one new gear for prisoners -PostLoadInit function to check and fix all bondage related hediffs to make everything save compatible (may be thrown out if too ugly, but all existing bondage gear will be needing re equipment) 2.0.0 after rape, victim that is in bed and cant move, should be put back to bed added parts override, so existing parts can be added to any race without messing with mod sources (will see how this ends) changed incubator/breeder descriptions replaced that mess of code for bestial dna inheritance with same as humanlikes (hopefully nothing broken) kids should always get father surname(if exist) changed litter size calculations, added parents fertility and breeder modifiers(this means that pawns now can actually birth twins and triplets when correctly "trained") breeder quirk now increases pregnancy speed by 125% (was 200%) gaining breeder quirk now also gives impregnation fetish gaining incubator quirk now also gives impregnation fetish hero can now mark them selves for cp, breeding, whoring fixed/changed requirement for zoophile trait gain to also account loving with animals(was only raping) increased glitter meds requirement for mech pregnancy abortion 1.9.9h fix self-impregnating mechanoids xD added recipe to "determine" mechanoid pregnancy added recipe to abort mechanoid pregnancy(uses glitter meds, i was told its sufficiently rare... idk maybe remove it later?) 1.9.9g added new mechanoid pregnancy instead of old microprocessor ones added insect birth on pawn death added mechanoid birth on pawn death maybe? added hive ai to born hostile insects added ai to birthed mechanoids, which will try to kill everyone... i mean give hugs... yes... added initialize() for pregnancy if started through "add hediff" options added days to birth info for pregnancy debug fix for loving 1.9.9f added designator icons, when pawn refuses to breed/comfort/service wip mechanoid pregnancy increased aphordisiac price 11->500 lotr compatibility? -set hololock techlevel to space -set whore beds techlevel to Medieval -set nymph techlevel to Tribal -set aphrodisiac techlevel to Medieval some other minor fixes 1.9.9e change to lovin patch which should allow other pregnancy mods(vanilla, cnp) to start pregnancy if rjw pregnancy disabled added lots of debug info for pregnancy_helper fixed pregnancy checks fix? vanilla pregnancy should now disappear if pawn lost vagina(used to be genitals) fixed error in designated breeder searching moved bestiality target searching to BreederHelper moved finding prisoners from xxx to CPRape jobgiver moved most whoring related stuff from xxx to whore_helper cosmetic changes to target finders, for readability disabled age modifiers for sex ability and sex drive, so your custom races dont need to wait few hundred years to get sex added "always show tag" for UID, Sterilization, peg arm operations made get_sex_drive() function to catch errors if pawn has no sex drive stat fixed? pawns having double vaginas or penises reduced parts sexability by around 2, so now it actually matters and sex wont always end with ahegao added missing? armbinder textures for male body 1.9.9d reverted age lock changed bond modifier for bestiality from flat +0.25 to +25% increase rape temp danger to Some, so rapes should happen even in uncomfortable temps reorder whore client filter, which should be a bit faster, probably fixed ability to set multiple hero, if other hero offmap fix error during sexuality reroll added translation strings for pregnancy and sex options/setting added options to turn on futa/trap fix males now cant be generated as futa and will be traps, was causing errors humpshrooms: -added pink glow -added +2 beauty modifier -increased price x2 -increased nutrition x2 fix/workaround for WTH mechanoids simplified surgeries, now only need to add modded races to SurgeryFlesh def added photoshop sources for designators updated glow effect on breeding icon, to be like other icons 1.9.9c fixed egg formula 1.9.9b removed fertility for pawns with ovis fixed aftersex satisfy error for fapping fixed error of calculation current insect eggs in belly fixed error when whores try to solicit non humans fixed error checking orientationless pawns(cleaning bots, etc) fixed Hediff_Submitting applying to torso instead of whole body during egg birth fixed mech pregnancy not impregnanting added chance to teleport in eggs during mech pregnancy overhauled insect eggs: changed egg pregnancy duration to bornTick=450,000*adult insect basesize*(1+1/3), in human language that means pregnancies will be shorter, mostly added abortTick = time to fertilize egg, if abortTick > bornTick - can always fertilize added eggsize 1 = 100%, if 0 eggsize - pawn can hold unlimited eggs eggs were reweighted according to hatchling size, in human language that means less eggs than random number it used to be, bigger movement debuffs and big eggs wont even fit in pawns without propper training and/or some operations detailed familiy planning calculations can be seen at rjw\Defs\HediffDefs\eggs.xlsx 1.9.9a added wip feeding-healing cocoon to replace restrains for insects, somehow its broken, fix it someday later, maybe fixed necro errors disabled nutrition transfer for necro moved "broken body" stuff from CP to all rape nerfed Archotech parts sexability to slightly above average support for insects from Alpha Animals 1.9.9 [FIX] reversed conditions for breed designators [FIX] sex initiated by female vs insect, werent egging female [CORE] split ovi's form penis infertile category, now has own [FEATURE] added ovi install operation [FEATURE] non insects with ovi's will implant Megascarab eggs, cant fertilize eggs [FEATURE] eggs implanted by colonist has additional 25 * PsychicSensitivity chance to spawn neutral insect [FEATURE] neutral eggs implanted by colonist has 50 * PsychicSensitivity chance to spawn tamed insect [FEATURE] added "hero" mode, player can directly command pawn 1.9.8b [FIX] designators should refresh/fix them selves if pawn cant be designated(loss of genitals, prisoner join colony, etc) [FIX] mechanoid "pregnancy" parent defs [COMPATIBILITY] suggested support for egg pregnancy for Docile Hive, havent tested that one 1.9.8a [FIX] fixed missing interaction icon for bestiality 1.9.8 [FEATURE] removed workgiver rape comfort prisoners [CORE] removed designators: ComfortPrisoner, RJW_ForBreeding [CORE] moved many bestiality checks to xxx.would_fuck_animal [CORE] moved FindFapLocation from job quick fap driver to giver [CORE] merged postbirth effects from human/beast pregnancies in base pregnancy [FIX] bugs in postbirth() [FIX] reversed dna inheritance [FIX] possible error with debug/vanilla birthing from bonded animal [FIX] rape enemy job checks, mechanoids can rape again [FIX] mechanoid sex rulepack error [FIX] typo fix "resentful" as "recentful" [FIX] comfortprisonerrape, should now call breeding job if comfort target is animal [FIX] drafting pawn should interrupt w/e sex they are doing [FIX] errors with bestiality birthing train [FIX] errors with bestiality/human thoughts [FIX] for other mods(psychology etc) fail to initialize pawns and crash game [FIX] forced reroll sexuality, hopefully fixes kinsley scale with psychology [BALANCE] Renamed free sex to age of consent. [FEATURE] moved animal breeder designator in place of whoring [FEATURE] made animal breeding icon/ designator [FEATURE] added direct control mode for most sex actions(pawn may refuse to do things), non violent pawns cant rape 1.9.7c Zaltys: [CORE] Renamed NymphJoininBed to JoininBed. [FIX] Fixed futa settings. [FEATURE] Expanded JoininBed job so that normal pawns can join their lover/spouse/fiancee in bed (but joining a random bed is still limited to nymphs). Ed86: fixed pawns fapping during fight or being drafted fixed noheart icon error in logs 1.9.7b fix for futa chances 1.9.7a Zaltys: [FIX] Corrected the trait checking for Vigorous quirk. [FIX] Compatibility fix for androids when using an old save (unable to test this in practice, leave feedback if it still doesn't work). [FIX] Fixed a major compatibility bug when using Psychology with RJW. [FIX] Sapiosexual quirk fix for players who aren't using Consolidated Traits mod. [COMPATIBILITY] Pawn sexuality is synced with other mods during character generation if the player is using Psychology or Individuality. (Instead of the old method of syncing it when the game starts.) 1.9.7 Settings and fixes Skömer: [FEATURE] Archotech parts (penis, vagina, breasts, anus). DegenerateMuffalo: [COMPATIBILITY] Compatibility with "Babies and Children" mod, hopefully with "CnP" as well. Fixes CnP bug with arrested kids Zaltys: [CORE] Moved Datastore to PawnData, since that's the only place it is used. [CORE] New method in PregnancyHelper for checking whether impregnation is possible. [CORE] Replaced Mod_Settings with RJWSettings. [FIX] Fixed Breed job. [FIX] Whores no longer offer services to prisoners from other factions. [FIX] Added a check to whoring to make sure that the client can reach the bed. (Thanks for DegenerateMuffalo for pointing out these problems.) [FIX] Added same check for bestiality-in-bed, which should fix the error if the animal is zone-restricted. [FIX] ChancePerHour_RapeCP incorrectly counted animal rape twice. (Credit to DegenerateMuffalo again.) [FIX] Polyamory fix for JobGiver_NymphJoininBed. Also added some randomness, so that the nymph doesn't repeatedly target the same lover (in case of multiple lovers). [FIX] Fixed NymphJoininBed not triggering if the nymph is already in the same bed with the target (which is often the case with spouses). [FEATURE] New less cluttered settings windows, with sliders where applicable. [FEATURE] Pawn sexuality. Imported from Rational Romance, Psychology, or Individuality if those are in use. Otherwise rolled randomly by RJW. Can be viewed from the RJW infocard (Bio-tab). [FEATURE] New settings for enabling STDs, rape, cum, and RJW-specific sounds. Also included settings for clothing preferences during sex, rape alert sounds, fertility age, and sexuality spread (if not using RR/Psychology/Individuality). [FEATURE] Added a re-roller for pawn sexuality, accessible from the info card. If the sexuality is inherited from another mod, this only re-rolls the quirks. Only available during pawn generation, unless you're playing in developer mode. [FEATURE] Added new optional setting to enable complex calculation of interspecies impregnation. Species of similar body type and size have high chance of impregnation, while vastly different species are close to zero. [FEATURE] Added fertility toggle for archotech penis/vagina, accessible from the infocard (through bio-tab). [FEATURE] New random quirk: Vigorous. Lowers tiredness from sex and reduces minimum time between lovin', not available to pawns with Sickly trait. Animals can also have this quirk. Ed86: added armbinders and chastity belts wearable textures, moved textures to apropriate folders *no idea how to add gags and not conflict with hairs hats and stuff, and i have little interest in wasting half day on that, so they stay invisible added quality to bdsm gear changed crafting recipes and prices(~/2) of bdsm gear, can now use steel, sliver, gold, plasteel for metal parts and hightech textiles/human/plain leather for crafting bdsm gear now has colors based on what its made of increase armbinder flamability 0.3->0.5 [bug?] game generates gear ignoring recipe, so bdsm gear most likely need own custom stuff category filters and harmony patching, not sure if its worth effort Designators changes: -masochists can be designated for comforting -zoophiles can be designated for breeding -or wildmode fixed ignoring age and other conditions for sex under certain settings fixed submitting pawn, "submitting" hediff ends and pawn can run away breaking sex, so when pawn is "submitting", hediff will be reaplied each time new pawns rapes it added missing Archotech vagina for male->futa operation fixed above commits checks, that disabled mechanoid sex fixed that mess of pregnancy above fix for broken settings and auto disable animal rape cp if bestiality disabled 1.9.6b Zaltys: [CORE] Renamed the bestiality setting for clarity. [FIX] Re-enabled animal-on-animal. [FIX] Animals can now actually rape comfort prisoners, if that setting is enabled. The range is limited to what that they can see, animals don't seek out targets like the humanlikes do. (My bad, I did all of the job testing with the console, and forgot to add it to the think trees.) [COMPATIBILITY] Fixed the Enslaved check for Simple Slavery. Ed86: [CORE] Renamed the bestiality setting for clarity. fixed broken jobdriver 1.9.6a fix for pregnancy 1.9.6 Zaltys: [CORE] Added manifest for Mod Manager. [CORE] Added more support for the sexuality tracker. [CORE] Moved some things to new SexUtility class, xxx was getting too cluttered. [CORE] Added a new method for scaling alien age to human age. This makes it easier to fix races that have broken lifespans in their racedefs. [FIX] Pawn sexuality icon was overlapping the icon from Individuality mod during pawn generation. Moved it a bit. Please leave feedback if it still overlaps with mod-added stuff. [FIX] Enabled whore price checking during pawn generation. [FIX] Female masturbation wasn't generating fluids. [FIX] Clarified some of the setting tooltip texts. [FIX] Added text fixes to fellatio, for species that have a beak.. [BALANCE] Permanent disfiguring injuries (such as scars) lower the whore price. [BALANCE] Rapist trait gain now occurs slightly slower on average. [FEATURE] Pawns now have a chance of cleaning up after themselves when they've done masturbating. Affected by traits: higher probability for Industrious/Hard Worker, lower for Lazy/Slothful/Depressive. Pawns who are incapable of Cleaning never do it. Also added the same cleaning check for whoring (some whores will clean after the customer, some expect others to do it.) [FEATURE] Added a few pawn-specific quirks such as foot fetish, increased fertility, teratophilia (attraction to monsters/disfigured), and endytophilia (clothed sex). Quirks have minor effects, and cover fetishes and paraphilias that don't have large enough impact on the gameplay to be implemented as actual traits. You can check if your pawns have any quirks by using the new icon in the Bio-tab, the effects are listed in the tooltip. Some quirks are also available to animals. [FEATURE] Added glow to the icon, which shows up if the pawn has quirks. For convenience, so you can tell at a glance when rerolling and checking enemies. (Current icons are placeholders, but work well enough for now.) [FEATURE] Added a new job that allows pawns to find a secluded spot for a quick fap if frustrated. (...or not so secluded if they have the Exhibitionist quirk). The job is available to everyone, including visitors and even idle enemies. This should allow most pawns to keep frustration in check while away from home, etc. [COMPATIBILITY] Rimworld of Magic - shapeshifted/polymorphed pawns should now be able to have sex soon after transformation. [COMPATIBILITY] Added conditionals to the trait patches, they should now work with mods that alter traits. [COMPATIBILITY] Lord of the Rims: The Third Age - genitalia are working now, but the mod removes other defs that RJW needs and may not be fully compatible. Note: Requires new save. Sorry about that. The good news is that the groundwork is largely done, so this shouldn't happen again anytime soon. Ed86: disabled ability to set designators for comfortprisoner raping and bestiality for colonists and animals comfort raping and bestiality designators can be turned on for prisoners and slaves from simple slavery nymphs will consider sexing with their partner(if they have one) before going on everyone else added options to spawn futa nymphs, natives, spacers added option to spawn genderless pawns as futas changed descriptions to dna inheritance changed all that pos code from patch pregnancy, to use either rjw pregnancies or vanilla shit code added animal-animal pregnancies(handled through rjw bestiality) added filter, so you shouldnt get notifications about non player faction pregnancies added Restraints(no one has suppiled decent name) hediff, insects will restrain non same faction pawn after egging them, easily removed with any medicine changed incubator to quirk, incubator naw affect only egg pregnancy added breeder quirk - same as incubator but for non eggs, needs only 10 births for humans or 20 for animals v1.9.5b fix for hemipenis and croc operations Zaltys: [CORE] More sprite positioning work. sexTick can be called with enablerotation: false to disable the default 'face each other' position. [CORE] Figured out a simple way to hide pawn clothing during sex, without any chance of it being lost. Added parameters to the sexTick method to determine if the pawn/partner should be drawn nude, though at the moment everything defaults to nude. If a job breaks, may result in the pawn getting stuck nude for a short while, until the game refreshes clothing. [BALANCE] Added age modifier for whore prices. [FEATURE] Added a new info card for RJW-related stats. Accessible from the new icon in the Bio tab. Very bare-bones at the moment, the only thing it shows for now is the price range for whoring. Will be expanded in later updates. v1.9.5a fix for pregnancy error mod menu rearangement fix? for hololock crafting with CE "ComplexFurniture" research requirement for for whore beds v1.9.5 Fix for mechanoid 'rape' and implanting. [FIX] Corpse violation was overloading to the wrong method in some cases, causing errors. Fixed. [FIX] Nymphomaniac trait was factored multiple times for sex need. Removed the duplicate, adjusted sex drive increase from the trait itself to compensate. [FIX] Other modifications to the sex need calculations. Age was factored in twice. [CORE] Added basic positioning code to JobDriver_GettinRaped. Pawns should now usually have sex face-to-face or from behind, instead of in completely random position. [BALANCE] Made necrophilia much rarer for pawns without the trait. [BALANCE] Made zoophilia rarer for pawns without the trait, and made non-zoos pickier about the targets (unless frustrated). [BALANCE] Adjusted the whore prices. Males were getting paid far less, made it more even. Added more trait adjustments. As before, Greedy/Beautiful pawns still get the best prices, and the bedroom quality (and privacy) affects the price a lot. [BALANCE] Soliciting for customers now slightly increases Social XP. [BALANCE] Higher Social skill slightly improves the chance of successful solicitation. [BALANCE] Sexually frustrated customers are more likely to accept. [FEATURE] Converted the old whore beds into regular furniture (since whores can use any bed nowadays), for more furniture variety. The old luxury whore bed is now a slightly less expensive version of a royal bed, and the whore sleeping spot is now an improved version that's between a sleeping spot and the normal low-tier bed in effectiveness: quick and cheap to build. Better than sleeping on floor and useful in early game, but you probably want to upgrade to regular bed as soon as possible. Descriptions and names may need further work. [FEATURE] Added 69 as a new sex type. Cannot result in pregnancy, obviously. Frequency modifiable in settings, as usual. v1.9.4c insect eggs kill off other pregnancies pawns cant get pregnancies while having eggs fix for non futa female rapin vulrability check added 1h cooldown heddif to enemy rapist, so job wont dump errors and freeze pawn/game added a bunch of animal and insect checks, so rape enemy shouldnt trigger if those options disabled made/separated enemyrapeByhumanlikes, like other classes v1.9.4b fix for rape enemy, so it wont rape while enemies around v1.9.4a fix for rape enemy not raping v1.9.4 Zaltys: [FIX] Extended the list of jobs that can be interrupted by whores, this should make whores considerably more active. [FIX] Animals with non-standard life-stages were not considered valid targets for various jobs. Fixed by adding a check for lifestage reproductiveness. [FIX] Engaging in lovin' with partners that have minimal sex ability (such as corpses) could result in the pawn getting no satisfaction at all, causing them to be permanently stuck at frustrated. Fixed by adding a minimum. (Humpshroom addiction can still result in zero satisfaction.) [BALANCE] Made pawns less likely to engage in necrophilia when sated. [BALANCE] Added vulnerability modifiers to a few core traits (Wimp, Tough, Masochist,..) [FEATURE] Added crocodilian penis for some animal species. (Alligator, crocodile, quinkana, sarcosuchus, etc) [CORE] Consolidated common sex checks into a single thinknode (ThinkNode_ConditionalSexChecks), which makes it easier to include/update important checks for various jobs. [CORE] Removed dummy privates, wrote a new comp for automatically adding genitalia when the pawn is spawned. Far faster than the old method of doing it. Should be compatible with old saves, though some weirdness may occur. [CORE] Added a basic but functional sexuality tracker (similar to Kinsey scale) to the above comp. Currently hidden from players and not actually used in calculations, just included as a proof of concept. [FIX] Added some null checks. [FIX] Removed a bad check from CP rape, should now work at intended frequency. [FIX] Some thinktree fixes for pawns that don't need to eat. [BALANCE] Made pawns less likely to engage in zoophilia if they have a partner. Unless the partner is an animal (there's mods for that). [BALANCE] Made pawns slightly less likely to engage in necrophilia if they have a partner. Ed86: raping broken prisoner reduces its resistance to recruit attempts fixed fertility wrong end age curve fixed pregnancies for new parts comp added futa and parents support for vanila/debug preg v1.9.3 Zaltys: [FIX] Rewrote the code for sexual talk topics. [FIX] Whorin' wasn't triggering properly. [FIX] Other miscellaneous fixes to the whorin' checks. They should now properly give freebies to colonists that they like. [FIX] Fixed forced handjob text. [FIX] Removed unnecessary can_be_fucked check from whores. With the new sex system, there's always something that a whore can do, such as handjobs or oral. [FIX] Restored RandomRape job. Only used by pawns with Rapist trait. Trigger frequency might need tuning. [FIX] Alien races were using human lifespan when determining sex frequency. Scaled it to their actual lifespan. [FIX] Enabled determine pregnancy for futas and aliens with non-standard life stages. [FIX] Patched in animal recipes. Sterlization and such should now work for most mod-added animals. [FIX] Animal-on-animal should no longer target animals outside of allowed zones. [CORE] Cleaned up some of the old unused configs and old redundant code. Still much left to do. [BALANCE] Adjusted bestiality chances. Pawns with no prior experience in bestiality are less likely to engage in it for the first time. And pawns who lack the Zoophile trait will attempt to find other outlets first. [BALANCE] Same for necrophilia: pawns are far less likely to engage in necrophilia for the first time. [BALANCE] Males are less likely to rim or fist during straight sex. [BALANCE] Adjusted trait effects on CP rape. Bloodlust trait now only affects frequency if rape beating is enabled. Removed the gender factor which made females rape less, now it depends on traits. [BALANCE] Pawns are more likely to fap if they're alone. [FEATURE] Added new settings that allow visitors and animals to rape comfort prisoners if enabled. [FEATURE] Added a sex drive stat (in Social category), which affects how quickly the sex need decays. Among other things, this means that old pawns no longer get as easily frustrated by lack of sex. Some traits affect sex drive: Nymphomaniac raises it, Ascetic and Prude (from Psychology) lower it. [FEATURE] If a pawn is trying to rape a relative, it's now mentioned in the alert. Ed86: fixes for nymph generation added ability to set chance to spawn male nymphs moved fertility and pregnancy filter to xml, like with sexneeds clean up "whore" backstories set Incubator commonality to 0.001 so it wont throw errors add vagina operations for males -> futa fixes for rape CP, breeder helper v1.9.2 Zaltys: Fixed a bug in baby generation which allowed animals to get a hediff meant for human babies. Also clarified the hediff name, since 'child not working' could be mistaken as an error. Improved logging for forced handjobs. Fixed necrophilia error from trying to violate corpses that don't rot (mechanoids, weird mod-added creatures such as summons, etc). Disallowed female zoos from taking wild animals to bed, because letting them inside the base can be problematic (and most can't get past doors anyway). Fixed incorrect colonist-on-animal thoughts. Whores now try to refrain from random fappin' (so they can spend more time servicing visitors/colonists), unless they're sexually frustrated. Added a pregnancy filter for races that cannot get pregnant (undead, etc). ' Colonists with Kind trait are less likely to rape. Added trait inheritance for [SYR] Individuality and Westerado traits. Added fail reasons to targeted Comfort Prisoner rape (on right-click); it has so many checks that it was often unclear why it wouldn't work.Added udders for animals (where appropriate, such as cows and muffalos), and a 'featureless chest' type for non-mammalian humanoids. Removed breasts from various non-mammalian animals, mostly reptiles and avians. Checked most of the common mods, but probably missed some animals. If you spot any species that have mammaries when they shouldn't, report them in the thread so they can be fixed. v1.9.1 Zaltys: Rewrote the processSex functionality, which fixes several old bugs (no more oral-only) and allows for much wider variety of sex. Merged animals into the same function. Some of the messages might have the initiator and receiver mixed up, please leave feedback if you notice any oddness. Centralized the ticks-to-next-lovin' increase and satisfy into afterSex, to ensure that those aren't skipped. Changed Comfort Prisoner Rape from Wardening to BasicWorker. Because it being in Wardening meant that pawns incapable of Social could never do it. Added support for Alien Humanoid Framework 2.0 traits. Xenophobes are less attracted to alien species, and xenophiles less attracted to their own species. Made zoophiles less attracted to humanlikes, and reluctant to pay for humanoid whores. Added basic age scaling for non-human races with long lifespans, when determining attraction. Enabled cum splatter from solo acts. Lowered cleaning time for cum to balance the increased output. Added new thoughts for BestialityForFemale job, for the rare cases where the female lacks the zoophile trait. Non-zoos almost never do that job, but it can happen if they have no other outlets. Previously this counted as 'raped by animal' and massive mood loss, even though initiated by the colonist. Set the min-ticks-to-next-lovin' counter lower for insects on generation. Whores lacked a tick check and could instantly jump from one job to another. Forced them to recover a bit between jobs, but not as long as regular pawns. Also changed the sex type balance for whoring: handjobs and fellatio are more common in whoring than in other job types. Lesbian sex lacked variety. Added fingering and scissoring to the available sex types. Added mutual masturbation and fisting. Added settings for sex type frequency, so you can lower the frequency of ones you don't want to see. Lowering the vanilla sex (vaginal and anal) is not recommended, makes things go weird. Added interspecies animal-on-animal breeding. Setting disabled by default. Added setting for necrophilia, disabled by default. Disabled the 'observed corpse' debuff for necros. Text fixes for logging. Added text variation to make some types clearer. Ed86: removed get_sex_ability from animals check, since they dont have it(always 100%) fixed error when trying to sexualize dead pawn changed demonic and slime parts description, so they tell that they are useless for humans, for now added missing craft hydraulic penis recipe to machining bench crafting hydraulics now requires Prosthetics research, Bionics - Bionics moved bionic crafting to fabrication bench fixed game spawning male nymphs broken nymphs, spawn with broken body reduced nymph spawn age 20->18 reduced festive nymph shooting increased festive nymph melee added chance to spawn festive nymph with rapist trait v1.9.0c Zaltys: Patched in nearly hundred sexual conversation topics. Currently set as rare, so pawns don't talk about sex all the day. Small fix that should stop babies from inheriting conflicting trait combos. Disabled the 'allowed me to get raped' thoughts for animal-on-female if the target is a zoophile. Didn't seem right that they'd hate the bystanders, despite getting a mood bonus from it. Fixed a stupid mistake in the trait inheritance checking. Didn't break anything, but it certainly didn't work either. Fixed the whoring target selection and spam. Ed86: switched Genital_Helper to public class crawls under christmas tree with bottle of vodka and salad, waiting for presents v1.9.0b Zaltys: Reset the ticks at sexualization, so generated pawns (esp. animals) don't always start lovin' as their first action. Couple of fixes to memories/thoughts, those could generate rare errors on female-on-animal. Also required for any animal-on-animal that might get added later. Added a simpler way of checking if an another mod is loaded. Works regardless of load order. Renamed abstract bases to avoid overwriting vanilla ones, to fix some mod conflicts if RJW is not loaded last. (Loading it last is still advisable, but not everyone pays attention to that..) v1.9.0a preg fix v1.9.0 Zaltys: Fixed the motes for bestiality. Which also fixes the 'wild animals don't always consent'-functionality. Added functions for checking prude and lecher traits (from other mods). Added patches for some conflicting traits (no more prude or asexual nymphos, etc). Added couple of low-impact thoughts for whoring attempts. Used the thoughts to make sure that a whore doesn't constantly bother same visitors or colonists. Enabled hook up attempts for prisoners, since they already have thoughttree for that. Most likely to try to target other prisoners or warden, whoever is around. Refactored JobGiver_Bestiality: removed redundant code and improved speed. Also improved target picking further, and made it so that drunk or high colonists may make unwise choices when picking targets. Added hemipenis (for snakes and various reptiles). Might add multi-penetration support for those at some later date. Ed86: fix traps considered females after surgery fix error preventing animal rape pawns fix error when trying to sexualize dead pawns added support for generic rim insects, mechanoids, androids added Masturbation, DoublePenetration, Boobjob, Handjob, Footjob types of sex added thoughts for incubator (empty/full/eggs), should implement them someday moved process_breeding to xxx merged necro aftersex with aftersex merged aftersex with process sex/bestiality, so now outcome of sex is what you see on log/social tab impregnation happens after vaginal/doublepenetration sex renamed JobDriver_Bestiality to JobDriver_BestialityForMale added check for futa animals when breeding breeding by animal increases broken body value breeding and bestiality for female with bounded animal is counted as non rape zoophile trait gain check now includes rapes of/by animals and insects countffsexwith... now includes rapes description changes for records Egg pregnancy: added contractions for eggs birthing(dirty hack using submit hediff) eggs now stay inside for full duration, if not fertilized -> dead eggs born abortion period now functions as fertilization period i think ive changed message when eggs born, should be less annoying some code cleaning not sure if any of below works nymphos and psychopaths(maybe other pawns in future) can now(probably) violate fresh corpses psychopaths should gain positive thought for violating corpse think nodes: enabled frustrated condition, used by nymphs added descriptions for think nodes think trees: exchanged priorities for prisoner whoring/rapecp moved breed from zoophile tree to animal when nymph is frustrated, it may violate corpse or random rape v1.8.9a fix for pregnancy if cnp not installed re-enabled patch for vanila preg, just in case added pregnancy detection based on body type/gestation time -> thin - 25%, female - 35%, others 50% v1.8.9 some WIP stuff added sex/rape records with humanlikes fix for sex records, so all sex should be accounted(fapping not included), and correctly distribute traits fix for error when trying to sexualize hon humans fixed error for birthing when father no longer exist fixed existing insect egg check always returning 0 disabled cnp option and pregnancy support added cleanup for vanilla pregnancy borrowed some code from cnp: should give cnp birth thoughts if cnp installed, drop babies next to mother bed, drown room in birth fluids added reduce pawn Rest need during sex: double speed for passive pawns, triple for active pawn disable increase loving ticks on job fail added need sex check for jobs, so pawns should seek satisfaction when in need some pathing checks for jobs try to normalize human fertility, 100% at 18(was 23), not sure about mod races, but fuck them with their stupid ages, maybe add toggle in next version? asexual check for sex_need so it doesn't decrease for pawns not interested in sex v1.8.8 Zaltys: Removed the tick increase from failed job, since that stops nymphs from seeking other activities. Changed the age scaling, to account for modded races with non-human lifespans. Rewrote fertility to work for modded races/animals of any lifespan. No fapping while in cryosleep. Adjusted distance checks. Added motes. Colonists were unable to open doors, fixed. Animals were unable to pass doors, fixed. Extra check to make sure that everyone is sexualized. Added traits from Consolidated Traits mod Added alert for failed attempt at bestiality. Wild animals may flee or attack when bothered Fix to enable some pawns to have sex again. Wild animals may flee from zoo + bug fix for zone restrictions Merged tame and bonded animals into one check, added distance and size checks to partner selection Added check to ensure that nymph can move to target Added check to make breeding fail if target is unreachable Minor balancing, drunk colonists now less picky when trying to get laid Ed86: rjw pregnancies: children are now sexualized at birth there is 25% per futa parent to birth futa child cross-breeding: there is a 10% chance child will inherit mother genitals there is a 10% chance child will inherit father genitals anuses are now always added, even if pawn is genderless, everyone has to poop right? disabled "mechanoid" genitals, so those roombas shouldnt spawn with hydraulic dicks n stuff added humanoid check for hydraulic and bionic parts fixed aphrodisiac effect from smokeleaf to humpshroom added egg removal recipes for ROMA_Spiders changed whore serving colonist chance 75%->50% and added check for colonist sex need, should reduce them harrasing 1 colonist and tend to those in need breaking pawns removes negative "raped" effects/relations pawn becoming zoophile removes negative zoo effects added LOS check for "allowed me to get raped", so no more seeing through walls disabled stripping during rape, probably needs fixing for weather and some races renamed fappin' to masturbatin' v1.8.7_ed86 Zaltys: added racoon penis added some Psychology support some fixes Ed86: fixed reversed records of insect/animal sex added records for birthing humans/animals/insects added incubator trait - doubles preg speed, awarded after 1000 egg births set limit impantable to eggs - 100/200 for incubator birthing insect spawns insect 1-3 jelly, in incubator *2 v1.8.6_ed86 added OrganicAgeless for race/genital patch added queen/implanter property to eggs, if its player faction +25% chance to birth tamed insects filter for Psychology traits fixed breeding detection for some(all?) animals log/social interaction for core loving fix for syphilis kidney fix for loving fix for humpshroom addiction error fix for menu translation error v1.8.5_ed86 added menu options for rjw pregnancies renamed sexhelper->genderhelper moved pregnancy related stuff to separate folder moved pregnancy related stuff to PregnancyHelper moved fertility options to mod menu separated pregnancy in 2 classes human/bestial added father debug string to rjw pregnancies some other fixes for pregnancies added single name handler, so now all naming handled through single function, which should prevent this mess scripts from crashing with red errors support for Rim of Madness - Arachnophobia made insect pregnancy more configurable, you can edit egg count and hatch time in Hediffs_EnemyImplants def, or add your own stuff for other custom insects increased eggs implants to 10-30 depending on insect, increased eggs moving penalty based on insect size up to -3% per egg added messages for insect birthing changed chance of generating tamable insect: -if father is in insect faction -5% -if not insect faction 10% -if player faction 25% removed outdated korean removed trait limit for birthed pawns renamed bodypart chest -> breasts renamed "normal" parts to average bondage sprites by Bucky(to be impemented later) added Aphrodisiac made from humpshrooms(seems to cause error when ends) fixed for animals with bionic parts fixed for sex need calculation fixes for zoophiliacs initiating sex fixed std error caused by generating broken pawns during world generation v1.8.4_ed86 CombatExtended patch - no longer undress rape victim and crash with red error rprobable fix for scenarios randomly adding bondage hediffs at game start without actual bondage gear fix for CP animal raping fixed badly broken function so now it works broken pawns now gain masochist trait and loose rapist if they had one enamed parts cat->feline, dogs->canine, horses->equine removed debuffs for broken body, other than Consciousness Pregnancy stuff: overhaul of impregnate function to handle all pregnancies bestial pregnancy birth adds Tameness fixes for insect egg pregnancy added ability to set female insects as breeders so they can implant eggs insects sexualized at birth insects has 10% to have null faction instead of fathers "Insect", so now you can grow own hive and not get eaten, probably added 1% penalty to Moving per egg increased eggs implanted 1-2 -> 5-10 Aftersex pawn now gains: - rapist trait if it had 10+ sex and 10% is rape and its not a masochist - zoophile trait if it had 10+ sex and 50+% with animals - necrophile trait if it had 10+ sex and 50+% with dead HumpShroom overhaul: - HumpShroom now behave like shrooms, grow in dark for 40 days, can be grown in Hydroponics (not sure it game spawns them in caves) - fertility sensetivity reduced 100%->25% - Yield reduced 3->2 - addictiveness raised 1%->5% - fixed addiction giving ambrosia effect - addiction adds nympho trait - addiction no longer raises sexneed by 50 - addiction reduces sexneed tick by 50% - Induced libido increases sexneed tick by 300% - addiction w/o Induced libido adds no satisfaction or joy v1.8.3_ed86 fertility fix for custom races with weir life stages(its now not 0) fixed translation warnings for vb project fixed? generic genitals applied to droids changed faction of babies born by prisoners to null, seems previous fix was for normal pregnancy birthing and this one for rjw? Designations retex by SlicedBread v1.8.2_ed86 added operation to determine pregnancy by Ziehn fixed some obsolete translation warnings for 1.0, many more to fix fixed error when trying to remove bondage gear pawns can now equip bondage on downed/prostrating pawns instead of prisoners only pawns can now unequip bondage from other pawns(if there is a key) fixed? getting pregnant when chance is set to 0(maybe it wasnt broken but testing with 1/100 chance is...) added Torso tag for genitals/breasts/anuses, so they should be protected by armor now, probably reduced chance to hit genitals 2%->.5% reduced chance to hit anus 1%->.1% reduced parts frostbite vulrability 1%->.1% rework ChjDroid - Androids parts assigment: -droids have no parts -androids have parts based on backstories --social droids get hydraulics --sex and idol droids get bionics --substitute droids get normal parts like other humanlikes --other get nothing added more modded races support for genitals by Cypress added filters to block fertility and sex need if pawn has no genitals added sex needs filter xml, to filter out races that should have no sex needs (ChjDroidColonist,ChjBattleDroidColonist,TM_Undead), you can add your own races there changed fertility, sex need calculation based on life stages: -humanlikes(5 life stages) - start rising at Teen stage -animals(3 life stages) - start rising at Juvenile stage -modded stuff(1 life stage) - start at 0 -modded stuff(x life stages) - start rising at 13 yo *ideally modded stuff should be implemented through xml filter with set teen and adult ages, but i have no idea how or want to go through dozens modded races adding support v1.8.1_ed86 possible fix for possible error with pawn posture? fixed social interactions broken with "many fixed bugs" of rimworld 1.0 fixed? babies born belong to mother faction or none if mother is a prisoner, no more kids/mother killing, unless you really want to removed all(broken) translations, so far 1.0 only support english and korean added peg arms, now all your subjects can be quad pegged... for science! added options to change fertility drops to _config.xml, should be moved to mod menu once unstable version menu is fixed v1.8.0_ed86_1.0 nothing new or old or whatever v1.8.0_ed86_B19 fixed prisoner surgeries fixed animal/combat rape fixed necro rape fixed missing surgery recipes for stuff added in prev version v1.7.0_ed86_B19_testing9 limited "allowed_me_to_get_raped" social debuff range to 15 instead whole map, its also doesnt apply if "bystander" is downed and cannot help added cat/dog/horse/dragon -> tight/loose/gape/gape vaginas added "generic" body parts for unsupported pawns/animals?/ rather than using normal human ones added micro vaginas,anuses added flat breasts added gaping vaginas,anuses added slime globs for, maybe, in future, changing slime pawns genitals fixed bionic futa creation other fixes to bionic penis changed/fixed vulrability calculation -> downed/lying down/sleeping/resting or pawns with armbinder no longer contribute melee stat to vulrability reduction, this allows pawns with high stats to be raped, so close your doors at night fixed? failed futa operations, instead of adding penis and loosing vagina, pawn keeps vagina rearanged pawn parts/recipes in mod structure fixed bug related to hitting "Chest"/ "chest" operations added support/mechgenitals for Lancer mechanoid[B19] removed def "InsectGenitals" since it is not used added HediffDefs for yokes, hand/leg bondage, open/ring gags, might actually add those items later, if someone finds sprites reduced eating with gag to 0 v1.7.0_ed86_B19_testing8 change to part removing recipies hide surgeries with missing body parts reworked fertility, should slightly increase max female fertility age ↲ fertility now decreases in adult life stage instead of pawn life, this should help with races like Asari(though they are still broken and wont be fertile until they are teens, which is 300 yo) probably fixed few possible errors v1.7.0_Atrer_B19_testing7 reversed oral logic add Korean translation fixes from exoxe updated genital assignment patterns animals no longer hurt zoophiles while breeding them v1.7.0_Atrer_B19_testing6 remove vestigial sex SkillDefs v1.7.0_Atrer_B19_testing5 raped by animal changed to breeding differentiated a masochist getting bred from a zoophile getting bred, one doesn't mind it, the other likes it added oral sex (rimming, cunnilingus, fellatio) reworked breeding system female animals will prefer to approach males for breeding v1.7.0_ed86_B19_testing4 fixed breeding designation stuck when pawn no longer prisoner fixed social tab added social descriptions for vaginal added social descriptions for sex/rape v1.7.0_ed86_B19_testing3 various fixes for B19/ port to B19 fixes for items/genitals descriptions fixes for nymph stories fix for genital distribution fixed sex need stat for pawns with long lives removed Prosthophile traits from nymps, probably removed in b19? updated korean translation? moved/removed/disabled english translation v1.7.0_ed86_B19_testing2 various fixes for B19/ port to B19 fixes for items/genitals descriptions fixes for nymph stories fix for genital distribution fixed sex need stat for pawns with long lives removed Prosthophile traits from nymps, probably removed in b19? updated korean translation? moved/removed/disabled english translation v1.7.0_ed86 fixes for genital parts assignment changed descriptions of few items, ex: breast now use cup size rather than small-huge added debuffs to Moving and Manipulation for breasts added debuffs to Moving for penises monstergirls stuff: added slime parts, provide best experience, not implantable, all slimes are futas, slime tentacles(penis) are infertile added demon parts, slightly worse than bionics, not implantable, demons/impmother has 25% to get tentacle penis for female or 2nd penis for male. baphomet has 50% to have horse penis instead of demon reversed cowgirls breast size generation -> huge(40%)-> big(40%)-> normal(10%)-> small(10%) v1.6.9_ed86 nymphs only service colonists, not prisoner scum! disabled fapping in medical beds(ew! dude!) added few checks to prevent zoophiles doing their stuff if bestiality disabled changed target selection for sex, disabled distance and fuckability checks (this resulted mostly only single pawn/animal get raped, now its random as long as pawn meets minimal fuckability of 10%(have genitals etc)) rape/prisoner rape: zoophiles will look for animals to rape normal pawns will try to rape prisoners 1st, then colonists removed animal prisoner rape, you cant imprison animals, right? bestiality sex target selection: zoophiles will look for animals in this priority: -bond animal, -colony animal, -wild animals v1.6.8_ed86 added cat penises to feline animals, Orassans, Neko(is there such race?) added dog penises to canine animals added dragon penises for "dragon" races, not sure if there any added horse penises to horses, dryads, centaurs added hydraulics(10% for bionics) for droid and android races disabled breasts for insects, should probably disable for all animals until there is belivable replacement v1.6.7_ed86 added hydraulic penis mechanoids(or atleast what rjw considers mechanoids) now use mainly hydraulics no bionics for savages: limited spawn of hydraulics and bionics to factions with techlevel: Spacer, Ultra, Transcendent added Ovipositors for insects(only affects new insects) removed peg dick from pawn generation, still can be crafted reduced peg dick sexability(c'mon its a log... unless you're a vegan and despice meat sticks xD) added peg dick to getsex definition as male(that probably wont change anything but who knows) added new has_penis_infertile function, so characters with peg dick(maybe there will be something more later like dildos strapons or something) can rape achieving extremly broken body now arwards pawn with masochism trait(doesnt work for some reason, fix later, maybe) added skill requirements for crafting genitals n stuff added skill requirements for attaching genitals n stuff removed lots of spaces in xml's and cs's v1.6.6_rwg fixed reported bugs -masochist thoughts are not inversed -animal pregnancy does not throw errors -prevented whorebeds from showing up anywhere. Their defs are still in, hopefully to provide back compatibility -added contraceptive pills they look like CnP ones but are pink (CnP contraceptive doesn't work for RJW ) -numerous fixes and tweaks to CnP-RJW introperation, bumps still remains but things are tolerable v1.6.5_ed86 added toggle for usage of RimWorldChildren pregnancy for human-human(i think that pregnancy doesnt work) reduced rape debuffs time from 40 days to 10 added filter traits for raping GotRaped - removed by Masochist trait GotRapedByAnimal - removed by Masochist,Zoophile trait MasochistGotRaped - needs Masochist trait MasochistGotRapedByAnimal - needs Masochist,Zoophile trait HateMyRapist - removed by Masochist trait KindaLikeMyRapist - needs Masochist trait AllowedMeToGetRaped - removed by Masochist trait v1.6.4_rwg -Babies can inherit traits from parents. The file Defs/NonInheritedTraits.xml can be edited to filter out particular trait from inheritance. -Reworked how RJW designations (Comfort, Whore, Breed) work. (Fixed comfort designation disappearing when multiple maps are active) -Whoring is now determined by designation not by bed. Whorebeds not buildable anymore. -Whoring designation works on prisoners. -Added unhappy thoughts on whoring (diminishes with experience). Some backstories (defined in Defs/SpecialBackstories.xml) count as a lot of experience. Prisoners get different more severe mood hit. -Now there is special gizmo, that encompasses all the designations, clicking on its subelements alters the settings for all selected pawns. -Added animal designation used to select beasts that are allowed to use breeding designated pawns. -Added mod setting toggles for enabling zoophilia and for enabling weird cross-species pregnancies. -Added max search radius for a whore (equals 100 tiles) they won't try clients further away from them. -Numerous balance tweaks to defs. -Broken body counts as masochist when sex is in question. -Added aphrodisiac plant. Based off ambosia, reduces the sex satisfaction, addictive but addiction does not do much. -Low sex meter reduces the timer between loving interactions. v1.6.3a_rwg -fixed bug in designator drawing now it is possible to play with mod -Added adoption (Claim Child operation). If you see any child laying around, you don't need to trouble yourself with warden persuation. You can designate child for this operation and it will be included in your faction right away. This is doen as surgery operation and requires medicine (but doesn't fail). I cannot get it work otherwise, chadcode just shits some unintelligible errors happening a dozen calls away from the mod code. Consider the med requirement an adoption census. v1.6.3_rwg Anonimous release -Fixed broken body hediff to give the mood offsets as it should. (btw, if someone didn't understand that, it probably be broken mind, but the meaning was lost in translation by original author) -Reworked pregnancy. It is now even more compatible with Children and Pregnacy mod. If the latter is acitve, its pregnancy system is used if possible. Otherwise, rjw simpler pregnancy is used. -RJW pregnancy works for any pair of humanlike pawns. There are settings determining the race of the resulting child. -RJW pregnancy defines the child at the moment of conception. Loading saves should not reroll the newborn. -Added menu toggle to deactivate human-animal pregnancy (why would anyone need that? It's boring.) -Added animal equivalent of designate for comfort. Animals beat prisoners less often. -Animals born from human mothers receive random training in varied skills up to half of their max training. -Animal babies use different relation than normal children, if the animal dies its human parent doesn't get as significant debuff as with human child. -Fixed (probably?) fathers disappearing from child relations due to garbage collection . At least inheritance information is now preserved for sure. Does not apply to CnP, but it wasn't probably affected much anyway (due to both parents typically staying in the game for longer than ordinary raider). v1.6.2_rwg Anonimous release -Added "submit" combat ability. Makes colonist lay down and stop resistance. Colonist is incapacitated for 1-2 hours. If you rescue them, the effect disappears right away. (Being little sissies they are, they won't dismount themselves off strong arms of their savior unless you make them to.) Make sure that nearby enemies are only metaphorically after your meat. Check mod settings in options if you don't see the button. -Bionic genitals are recognized by prothofiles -Added transgender surgery, pawns won't be happy about such changes. Added futa. -Allowed prisoners to use comfort designations -Added message about unhealthy whores -Vulnerability calculations now include manipulation -Futa now can impregnate -DNA inheritance options now have meaningful descriptions and are actually used in game -Beatings are not continued beyond the severe threshold. Threshold is higher. Bloodlusty pawns still beat victims. -Pawns caught in a swarm of rapist animals will not starve to death anymore. -Pawns won't rape their friends (as designation) --includes Hoge's branch additions: -whoring is not cheating (There's still chance, thankfully) -broken body system extension (currently broken, duh) -hostages can now get raped during rescue quests -raping enemy now comes after all enemies are neutralized full list: -Add Compatibility to Children, School and Learning Mod(maybe not complete. -Add IUD temporary sterilizer. Install IUD to vagina to prevent pregnant. (experimental. -Add Female zoophilia. (sex with animals like whore. -Add require insect jelly to remove insect eggs need. -Add require holokey to remove mech implants. Change -less chance whoring with hate person. -Remove insect eggs when victim dead. -Don't feel "cheated on me" when partner work on whore. Improve -Whore pay from all caravan member. Allow whoring with Traveler, Visitor. -Search fuck target improve. Now try to search free victim. -Don't stay to rape colony so longer. -ViolateCorpse will check victim beauty(breast size,cuteness,etc... -Feel broke will increase gradually. (around 30 days everyday raping to max level -Fertility now depend on their life-stage and life-expectancy. (now all races can pregnant if not too old. Fixed -Fix null-reference on DoBirth(). -Fix whore count was not increased. -Fix whore bed is not affect end-table and dresser. -Fix anus vagina bug. v1.6.1a - Disabled dummy sex skill (it was experimental and was accidentally included in the 1.6.1-experimental). If you are updating from version 1.6.1-experimental, you'll experience missing reference errors about sex skill. It's safe to ignore them. Make a new save and reload it, and you'll see no more error. v1.6.1-exp - Reintegrated with Architect Sense mod by Fluffy. The whore beds are now regrouped into one category. - Fixed null reference exception on CP rape function. - Fixed whore reservation bug. It's now safe to assign more than one whore. - Fixed rape notification bug. - Minor 'mod settings' layout fix. - Added Russian translation by asdiky. - Added possibility to add more skill slot to the character tab. (there are no new skills yet) v1.6.0 Known bugs (new): - Exception: Whore unable to reserve target. To avoid this, don't assign more than one whore. - Sometimes on a rare occasion, there gonna be exceptions about pawns unable to reserve things. Changes: - Compatibility patch for Rimworld B18. - Removed integration with Children & Pregnancy mod. - Removed integration with Architect Sense mod. - Removed integration with Romance Diversified mod. - Updated Korean translation by NEPH. - Fixed visitors & traders raping CPs bug. - Fixed nymphs backstory layout bug. - Changed random rape mechanics. It's now triggered by mental breakdown only. (Will make an option for it) - Added random rape mental breakdown. (This feature is experimental and may not work as intended) - Added a notification when somebody is attempting a rape. - Added a notification when somebody is getting raped. - Changed some descriptions. v1.5.4j changes: - Insects will now inject their eggs while raping your incapacitated colonists. (by hogehoge1942) - Mechanoids will now inject microcomputers while raping your incapacitated colonists. The microcomputer teleports random cum into victim's vagina and makes her pregnant by random pawn. (by hogehoge1942) - Added surgeries to remove insect eggs and microcomputers by hogehoge1942. - Fixed sex need moods affecting under-aged pawns bug. - Under-aged sex need is now frozen. (Will make it hidden for under-aged pawns in the future) - Fixed reappearing masochist social thoughts bug. - Disabled intrusive whore failed hookup notifications. - Enabled mechanoids private parts. They will now have artificial genitals/breasts/anuses. - Fixed sex need decay rate reverting to default value. - Fixed mod settings bug. - Increased max rapists per comfort prisoner to 6. (Will make an option for it in the future) v1.5.4i changes: - Disabled log messages. - Added comfort colonist and comfort animal buttons. (NOTE: comfort animal button is still experimental and might not work as intended) - Tweaked comfort prisoner rape mechanism. - Overhauled bestiality rape mechanism: - Zoophiliacs will now prefer tamed colony animals. (Preference: Tamed > petness > wildness) - They will now prefer animals of their opposite sex. (Will make it based on Romance Diversified's sexual orientation in the future) - The search distance is now narrowed to 50 squares. Your zoophiles will go deer hunting at the corner of the map no more. - Added random twist. Zoophiliacs will sometimes go deer hunting even though the colony has tamed animals. - Zoophiliacs won't be picky about their victim's size. Make sure you have enough tamed animals to decrease the chance of them banging a rhino and end up dying in the process. - Added an option to sterilize vanilla animals. (modded animals coming soon) - Edited some descriptions in the mod settings. v1.5.4h changes: - Fixed nymph joining bed and no effect bug. - Temporary fix for anal rape thought memory. - Tweaked overpriced whores' service price. Normal whores are now cost around 20-40 silvers. - Updated Korean translation. (by NEPH) - Fixed "Allowed me to get raped" social debuff on masochists. v1.5.4g changes: - Added new texture for comfort prisoner button by NEPH. - Fixed inability to designate a prisoner as comfort prisoner that's caused by low vulnerability. - Fixed comfort prisoner button bug. It will only appear on prisoners only now. - Added Japanese translation by hogehoge1942. - Merged ABF with RJW. - Added new raping system from ABF by hogehoge1942. Raiders will now rape incapacitated/knocked down/unsconcious pawns who are enemies to them. - Fixed pawns prefer fappin' than do lovin'. v1.5.4f changes: - Standing fappin' bug fix. - New whore bed textures by NEPH. - Reworked vulnerability factors. Vulnerability is now affected by melee skill, sight, moving, and consciousness. v1.5.4e changes: - Added sex need decay option. You can change it anytime. - Overhauled mod settings: - Edited titles & descriptions. - Added plus & minus buttons. - Added validators. - Optimized live in-game changes. v1.5.4d changes: - Removed toggle whore bed button that's applied to all beds as it causes errors. - Added ArchitectSense's DLL by fluffy. - Added new 'Whore Beds' category in furniture tab by Sidfu. - Added research tree for whore beds by Sidfu. - Added new mod preview by NEPH. - Added new private parts textures by NEPH. - Added Korean translation by NEPH. - Fixed xpath bug. v1.5.4b changes: - Added Wild Mode. - Mod directory optimization. - Some value optimization. - Minor bugfixes. - Temporary fix for in-game notification bug. - Fixed reappearing double pregnancy bug. v1.5.3 changes: - Fixed a critical bug that pregnancy coefficients didn't work - Tweaked many values - Added a compatibility patch for the mod Misc.MAI so that MAI will spawn with private hediffs without reloading the save. The patch is in the file BodyPatches.xml. - You may add your own private hediffs' patch to your modded race. The MAI patch is an example. - Added some in-game notifications when you try to manually make your pawns rape CP. - Added some in-game messages about anal sex - Fixed bugs regarding whore system and zoophile behaviors. v1.5.2 changes: - Fixed things/pawns being killed vanishes - Fixed some animals spawned not having genitals/anus/breasts hediffs if you don't reload the save - Code optimization - some minor bugfix v1.5.1 changes: - fixed the performance issue, - allow you to install penis to women to make futas(so that you should no longer complain why women can't rape), - allow you to toggle whether non-futa women can rape(but still need traits like rapists or nymphos), - other bugfixes v1.5 changes: - Tons of bugfix(ex. losing apparel when raping, normal loving has the "stole some lovin" buff, etc.) - Tons of balance adjustments to make things reasonable and realistic - Added chinese simplified translations by nizhuan-jjr - Added options to change pregnancy coefficient for human or animals - Added sterilization surgery for preventing pregnancy without removing genitals - Added broken body system(CP being raped a lot will have a broken body hediff, which makes their sex need drop fast, but will give them mood buff while in the state) - Added a lite version of children growing system(if you use Children&Pregnancy, this system will be taken over.) - Fuckers generally need to have a penis to rape. However, CP raping and random raping can allow the fucker to be non-futa woemn with vulnerability not larger than a value you can set in the setting. - For the CP raping, non-futa women need to have traits like rapist or nymphomaniac. - Randomly generated women won't have necrophiliac and zoophile traits. - You can add penis to women to make futas through surgeries. - Pawns who have love partners won't fuck CP - Completed the whore system(Pawns who are assigned whore beds will be the whores, they'll try to hookup with those in need of sex. - If visitors are from other factions, they will pay a price to the whore after sex. The price is determined based on many details of the whore.) - Completed behaviors for necrophiliac - Some code optimization - Added rotting to the private parts by SuperHotSausage - Tweaked body-parts' weights by SuperHotSausage - Optimized the xpath method by SuperHotSausage - Greatly enhance compatibility with the Birds and the Bees, RomanceDiversified, Children&Pregnancy, and many other mods(Please put RJW after those mods for better game experience) v1.4 changes: - Refactored source files - Added chinese translations by Alanetsai - Adjusted selection criteria to prefer fresh corpses - Fixed apparel bug with animal attackers v1.3 changes: - Added breast and anus body parts, along with hydraulic/bionic alternatives - Added necrophilia - Added random rapes - Exposed more constants in configuration file v1.2 changes: - Updated to A17 - Enabled comfort prisoner designation on all colony pawns, prisoners, and faction animals - Enabled pregnancy for raped pawns via RimWorldChildren - Updated mod options v1.1 changes: - Added bondage gear - Implemented special apparel type which applies a HeDiff when it's equipped - Implemented locked apparel system which makes certain apparel unremovable except with a special "holokey" item - Implemented new ThingComp which attaches a unique hex ID & engraved name to items - Implemented more ThingComps which allow items to be used on prisoners (or in the case of apparel the item is equipped on the prisoner) - Finally with all the infrastructure done, added the actual bondage gear - Armbinder which prevents manipulation and any sort of verb casting - Gag which prevents talking and reduces eating - Chastity belt which prevents sex, masturbation, and operations on the genitals - Added surgery recipes to remove gear without the key at the cost of permanent damage to the bound pawn - Added recipes to produce the gear (and an intermediate product, the hololock) - Started using the Harmony library to patch methods - No longer need to override the Lovin' JobDef thanks to patches in JobDriver_Lovin.MakeNewToils and JobDriver.Cleanup. This should - increase compatibility with other mods and hopefully will work smoothly and not blow up in my face. - Patched a bunch of methods to enable bondage gear - Created a custom build of Harmony because the regular one wasn't able to find libmono.so on my Linux system - Pawns (except w/ Bloodlust or Psychopath) are less likely to hit a prisoner they're raping if the prisoner is already in significant pain - Nymphs won't join-in-bed colonists who are in significant pain - STD balance changes - Infections won't pass between pawns unless the severity is at least 21% - Accelerated course of warts by 50% and syphilis by ~20% - Reworked env pitch chances: base chance is lower and room cleanliness now has a much greater impact - Herpes is 33% more likely to appear on newly generated pawns - Pawns cannot be infected if they have any lingering immunity - Syphilis starts at 20% severity (but it isn't more dangerous since the other stats have been adjusted to compensate) - Syphilis can be cured if its severity is pushed below 1% even without immunity - STD defs are loaded from XML instead of hardcoded - Added some config options related to STDs - Sex need won't decline on pawns under age 15 - Renamed "age_of_consent" to "sex_free_for_all_age" and reduced value from 20 to 19 - Prisoners under the FFA age cannot be designated for rape v1.0 changes: - Reduced the chance of food poisoning from rimming from 5% to 0.75% - Added age_of_consent, max_nymph_fraction, and opp_inf_initial_immunity to XML config - Pawns whose genitals have been removed or destroyed can now still be raped - The "Raped" debuff now stacks - Fixed incompatibilities with Prepare Carefully - Mod no longer prevents the PC menu from opening - Reworked bootstrap code so the privates will be re-added after PC removed them (this won't happen in the PC menu, though, only once the pawns appear on the map) - Fixed a crash that occurred when PC tried to generate tooltips for bionic privates - Fixed derp-tier programming that boosted severity instead of immunity on opportunistic infections - Sex satisfaction now depends on the average of the two pawn's abilities instead of their product - Flesh coverage stats for the torso are now correctly set when the genitals part is inserted - Fixed warts and syphilis not being curable and rebalanced them a bit - Sex need now decreases faster when it's high and slower when it's low - Nymphs now won't fuck pawns outside their allowed area - Fixed "allowed me to get raped" thought appearing on masochists - Nymph join event baseChance reduced from 1.0 to 0.67 and minRefireDays increased from 2 to 6
Mewtopian/rjw
changelog.txt
Text
mit
84,569
========================================= ||| RimJobWorld Community Project ||| ========================================= Special thanks to Void Main Original Author UnlimitedHugs HugsLib mod library for Rimworld pardeike Harmony library Fluffy Architecture Sense mod DLL Loverslab Housing this mod Skystreet Saved A16 version from nexus oblivion nethrez1m HugsLib / RimWorldChildren fixes prkr_jmsn A17 compatibility, Genital injection, sounds, filth Goddifist Ideas shark510 Textures, testing Soronarr Surgery recipes, monstergirls semigimp General coding AngleWyrm Textures Alanetsai Chinese traditional translations nizhuan-jjr Chinese simplified translations, general coding, bugsfix, whore system, broken body system, balancing, testing, textures, previews, etc. g0ring Coding idea, bugfix StarlightG Coding idea, bugfix SuperHotSausage Coding, stuff Sidfu Coding, XML modding NEPH Graphics & textures, testing, Korean translation hogehoge1942 Coding, Japanese translation Ed86 Coding TheSleeplessSorclock Coding asdiky Russian translation exoxe Korean translation Atrer Coding Zaltys Coding SlicedBread Textures And anyone we might have missed. add your self
Mewtopian/rjw
credits.txt
Text
mit
1,280
-The transgender thoughts sometimes disappear if you perform a chain of sex operations on the same pawn. Probably some oversight in algorithm that gives thoughts on transition (some underthought chaining of effects). Fix somewhere in the future. -There's some weird null exception thrown during futa dick addition. It happens sometimes and everything works anyway. -Whores with untended diseases (flu, herpes, warts) will try hookup and may succeed but the job will get cancelled shortly afterwards resulting in message spam. Currently added different message to notify players of problem. -Gential helper is shit. It does not account for later added animal dicks. has_<x> methods are fucking runtime regex searches Semen overlays cause "memory leak"probably due to endlessly drawing overlay on pawn
Mewtopian/rjw
known_bugs.txt
Text
mit
805
CORE: fix naked pawn drawing when job driver is interrupted for any reason and pawn doesnt get redressed/changes back to dressed art split processsex(again) in 2 functions: 1st - at beginning of jobgiver to determine sex type 2nd - after sex, determine outcome change whore beds to normal furniture? change broken body to broken mind, or add new one, make it variable based on traits? add/change passive whoring colonist search(like cp) -> colonist know who is whore, and try to use them? may get refused by whore? add nymph lord ai, so nymphs can behave as visitors add sex addiction to demonic parts? add cuminflation system and dripping cum add insects dragging pawns to hives gene inheritance for insect ovis add succubus/(incubus?) (rimworld of magic): -drains other pawn needs(food, sleep?) and refills own(cant eat normal food? -replenish mana through sex? -give huge op mood boost(bliss) to victims(1 day?), and then dubuff? -succubi never reach ahegao satisfaction, thus always can have more? workgivers(aka manual control): -workgiver for sex with humpshrooms, increasing their growth by 1 day, causing addiction, temp? humpshroom-penis futa? -workgiver for normal sex -workgiver(auto, cleaning) to collect cum add recipe to make food from cum? add female cum? add some sort of right clicking sub menu: -change parts stats(w/o operation): tentacles, slime, bionic parts -make sex type selectable -designate breeding pair(through relations?) rework genital system, so it only have vag,penis,breast,anus (with comp?) storing name, severity(size?) of part probably also rework surgeries to support those add variable parts growth (until teen? adult?), degradation/stretching rework sex satisfaction system(based on parts size/difference? traits/quirks etc) integrate milkable colonists with sizes support and operations? to change milk type(w gitterworld med?) BDSM: -make ropes and other generic gear, that is "locked" but not with hololock unique keys - normal keys made of steel, etc -piercing? -blindfolds? -vibrators? Multiplayer: -figure out predictable seeds instead of syncmethod's maybe: add support for other pregnancy mods custom races support, with overrides(fertility, age, etc) in xml more sex related incidents? backstoies: cowgirl, etc never? -make interactive COC like sex/stories older stuff TO DO: Add new body part groups for the bondage gear (specifically a genitals group for the CB and a jaw or mouth group for the gag, the mouth group that's already in the game won't work I'm pretty sure) Once that (^^^) is done make it so that the groups are automatically blocked by the gear, like a more robust version of the blocks_genitals flag Add more thoughts after sex about e.g. partner's dick size and sex skill Look into how beds are reserved during fappin and especially nymph join-in-bed. I think right now the bed just isn't reserved. Nymph visitors - Don't join, just stay on the map a while to fuck your colonists, eat your food, and do your drugs - Should be able to deconstruct walls or mine through mountains to get at drugs, just to troll players Add chance for sex/fap with a peg dick to produce splinters TO DO EVENTUALLY (AKA NEVER): Improve detection of genital harvest vs amputation - (Maybe) Make it so that downgrading a pawn is considered harvesting OTHER RANDOM/HALF-BAKED IDEAS: Add some random dialogues for rapes, lovins, etc. Strap prisoners to their beds Sex addiction - Reduces satisfaction from sex - Should only affect nymphomaniacs? Traits?: Low Self Esteem (just another pessimist trait) Dom/Sub Mindbroken (raped so much that they are at a permanent max happiness, but are worth nothing more than just hauling and cleaning) Branded, this pawn is branded a cow/animal fucker/prostitute/rapist, whatever his/her extra curricular is comes with a negative opinions so they are pretty much never liked?
Mewtopian/rjw
todo.txt
Text
mit
3,889
{ "always-semicolon": true, "color-case": "upper", "block-indent": " ", "color-shorthand": true, "element-case": "lower", "eof-newline": true, "leading-zero": true, "quotes": "single", "sort-order-fallback": "abc", "space-before-colon": "", "space-after-colon": " ", "space-before-combinator": "", "space-after-combinator": "", "space-between-declarations": "\n", "space-before-opening-brace": " ", "space-after-opening-brace": "\n", "space-after-selector-delimiter": " ", "space-before-selector-delimiter": "", "space-before-closing-brace": "\n", "strip-spaces": true, "tab-size": true, "unitless-zero": true, "vendor-prefix-align": true, "sort-order": [ [ "position", "z-index", "top", "right", "bottom", "left" ], [ "display", "visibility", "float", "clear", "overflow", "overflow-x", "overflow-y", "-ms-overflow-x", "-ms-overflow-y", "-webkit-overflow-scrolling", "clip", "zoom", "-webkit-align-content", "-ms-flex-line-pack", "align-content", "-webkit-box-align", "-moz-box-align", "-webkit-align-items", "align-items", "-ms-flex-align", "-webkit-align-self", "-ms-flex-item-align", "-ms-grid-row-align", "align-self", "-webkit-box-flex", "-webkit-flex", "-moz-box-flex", "-ms-flex", "flex", "-webkit-flex-flow", "-ms-flex-flow", "flex-flow", "-webkit-flex-basis", "-ms-flex-preferred-size", "flex-basis", "-webkit-box-orient", "-webkit-box-direction", "-webkit-flex-direction", "-moz-box-orient", "-moz-box-direction", "-ms-flex-direction", "flex-direction", "-webkit-flex-grow", "-ms-flex-positive", "flex-grow", "-webkit-flex-shrink", "-ms-flex-negative", "flex-shrink", "-webkit-flex-wrap", "-ms-flex-wrap", "flex-wrap", "-webkit-box-pack", "-moz-box-pack", "-ms-flex-pack", "-webkit-justify-content", "justify-content", "-webkit-box-ordinal-group", "-webkit-order", "-moz-box-ordinal-group", "-ms-flex-order", "order" ], [ "-webkit-box-sizing", "-moz-box-sizing", "box-sizing", "width", "min-width", "max-width", "height", "min-height", "max-height", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left" ], [ "table-layout", "empty-cells", "caption-side", "border-spacing", "border-collapse", "list-style", "list-style-position", "list-style-type", "list-style-image" ], [ "content", "quotes", "counter-reset", "counter-increment", "resize", "cursor", "-webkit-user-select", "-moz-user-select", "-ms-user-select", "user-select", "nav-index", "nav-up", "nav-right", "nav-down", "nav-left", "-webkit-transition", "-moz-transition", "-ms-transition", "-o-transition", "transition", "-webkit-transition-delay", "-moz-transition-delay", "-ms-transition-delay", "-o-transition-delay", "transition-delay", "-webkit-transition-timing-function", "-moz-transition-timing-function", "-ms-transition-timing-function", "-o-transition-timing-function", "transition-timing-function", "-webkit-transition-duration", "-moz-transition-duration", "-ms-transition-duration", "-o-transition-duration", "transition-duration", "-webkit-transition-property", "-moz-transition-property", "-ms-transition-property", "-o-transition-property", "transition-property", "-webkit-transform", "-moz-transform", "-ms-transform", "-o-transform", "transform", "-webkit-transform-origin", "-moz-transform-origin", "-ms-transform-origin", "-o-transform-origin", "transform-origin", "-webkit-animation", "-moz-animation", "-ms-animation", "-o-animation", "animation", "-webkit-animation-name", "-moz-animation-name", "-ms-animation-name", "-o-animation-name", "animation-name", "-webkit-animation-duration", "-moz-animation-duration", "-ms-animation-duration", "-o-animation-duration", "animation-duration", "-webkit-animation-play-state", "-moz-animation-play-state", "-ms-animation-play-state", "-o-animation-play-state", "animation-play-state", "-webkit-animation-timing-function", "-moz-animation-timing-function", "-ms-animation-timing-function", "-o-animation-timing-function", "animation-timing-function", "-webkit-animation-delay", "-moz-animation-delay", "-ms-animation-delay", "-o-animation-delay", "animation-delay", "-webkit-animation-iteration-count", "-moz-animation-iteration-count", "-ms-animation-iteration-count", "-o-animation-iteration-count", "animation-iteration-count", "-webkit-animation-direction", "-moz-animation-direction", "-ms-animation-direction", "-o-animation-direction", "animation-direction", "text-align", "-webkit-text-align-last", "-moz-text-align-last", "-ms-text-align-last", "text-align-last", "vertical-align", "white-space", "text-decoration", "text-emphasis", "text-emphasis-color", "text-emphasis-style", "text-emphasis-position", "text-indent", "-ms-text-justify", "text-justify", "text-transform", "letter-spacing", "word-spacing", "-ms-writing-mode", "text-outline", "text-transform", "text-wrap", "text-overflow", "-ms-text-overflow", "text-overflow-ellipsis", "text-overflow-mode", "-ms-word-wrap", "word-wrap", "word-break", "-ms-word-break", "-moz-tab-size", "-o-tab-size", "tab-size", "-webkit-hyphens", "-moz-hyphens", "hyphens", "pointer-events" ], [ "opacity", "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity", "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha", "-ms-interpolation-mode", "color", "border", "border-collapse", "border-width", "border-style", "border-color", "border-top", "border-top-width", "border-top-style", "border-top-color", "border-right", "border-right-width", "border-right-style", "border-right-color", "border-bottom", "border-bottom-width", "border-bottom-style", "border-bottom-color", "border-left", "border-left-width", "border-left-style", "border-left-color", "-webkit-border-radius", "-moz-border-radius", "border-radius", "-webkit-border-top-left-radius", "-moz-border-radius-topleft", "border-top-left-radius", "-webkit-border-top-right-radius", "-moz-border-radius-topright", "border-top-right-radius", "-webkit-border-bottom-right-radius", "-moz-border-radius-bottomright", "border-bottom-right-radius", "-webkit-border-bottom-left-radius", "-moz-border-radius-bottomleft", "border-bottom-left-radius", "-webkit-border-image", "-moz-border-image", "-o-border-image", "border-image", "-webkit-border-image-source", "-moz-border-image-source", "-o-border-image-source", "border-image-source", "-webkit-border-image-slice", "-moz-border-image-slice", "-o-border-image-slice", "border-image-slice", "-webkit-border-image-width", "-moz-border-image-width", "-o-border-image-width", "border-image-width", "-webkit-border-image-outset", "-moz-border-image-outset", "-o-border-image-outset", "border-image-outset", "-webkit-border-image-repeat", "-moz-border-image-repeat", "-o-border-image-repeat", "border-image-repeat", "outline", "outline-width", "outline-style", "outline-color", "outline-offset", "background", "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader", "background-color", "background-image", "background-repeat", "background-attachment", "background-position", "background-position-x", "-ms-background-position-x", "background-position-y", "-ms-background-position-y", "-webkit-background-clip", "-moz-background-clip", "background-clip", "background-origin", "-webkit-background-size", "-moz-background-size", "-o-background-size", "background-size", "box-decoration-break", "-webkit-box-shadow", "-moz-box-shadow", "box-shadow", "filter:progid:DXImageTransform.Microsoft.gradient", "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient", "text-shadow" ], [ "font", "font-family", "font-size", "font-weight", "font-style", "font-variant", "font-size-adjust", "font-stretch", "font-effect", "font-emphasize", "font-emphasize-position", "font-emphasize-style", "font-smooth", "line-height" ] ] }
kink/kat
.csscomb.json
JSON
unknown
11,147
/dist /ts-out /node_modules /package-lock.json /static/bundle.js *.backup
kink/kat
.gitignore
Git
unknown
78