code
stringlengths
0
56.1M
repo_name
stringlengths
3
57
path
stringlengths
2
176
language
stringclasses
672 values
license
stringclasses
8 values
size
int64
0
56.8M
using Multiplayer.API; using RimWorld; using rjw.Modules.Shared.Logs; using UnityEngine; using Verse; namespace rjw.Modules.Nymphs.Incidents { public class IncidentWorker_NymphRaidHard : IncidentWorker_BaseNymphRaid { private static ILog _log = LogManager.GetLogger<IncidentWorker_NymphRaidHard, NymphLogProvider>(); protected override float ThreatPointMultiplier => 1.5f; [SyncMethod] protected override bool CanFireNowSub(IncidentParms parms) { //The event is disabled, don't fire ! if (RJWSettings.NymphRaidHard == false) { _log.Debug("The incident can't fire as it is disabled in RJW settings"); return false; } return base.CanFireNowSub(parms); } protected override int GetNymphCount(IncidentParms parms, Map map) { int count; //Calculating nymphs manyness if (RJWSettings.NymphRaidRP) { count = base.GetNymphCount(parms, map); } else { count = map.mapPawns.AllPawnsSpawnedCount; //Cap the max count = Mathf.Min(count, 1000); //Cap the min count = Mathf.Max(count, 1); } return count; } } }
jojo1541/rjw
1.3/Source/Modules/Nymphs/Incidents/IncidentWorker_NymphRaidHard.cs
C#
mit
1,100
using Multiplayer.API; using RimWorld; using rjw.Modules.Nymphs.Implementation; using rjw.Modules.Shared.Extensions; using rjw.Modules.Shared.Logs; using System.Collections.Generic; using Verse; namespace rjw.Modules.Nymphs.Incidents { public class IncidentWorker_NymphVisitor : IncidentWorker { private static ILog _log = LogManager.GetLogger<IncidentWorker_NymphVisitor, NymphLogProvider>(); protected static readonly INymphService _nymphService; static IncidentWorker_NymphVisitor() { _nymphService = NymphService.Instance; } [SyncMethod] protected override bool CanFireNowSub(IncidentParms parms) { //The event is disabled, don't fire ! if (RJWSettings.NymphWild == false) { _log.Debug("The incident can't fire as it is disabled in RJW settings"); return false; } //No multiplayer support ... I guess if (MP.IsInMultiplayer) { _log.Debug("Could not fire because multiplayer api is on"); return false; } //No map if (parms.target is Map == false) { _log.Debug("Could not fire because the incident target is not a map"); return false; } return base.CanFireNowSub(parms); } [SyncMethod] protected override bool TryExecuteWorker(IncidentParms parms) { _log.Debug($"Generating incident"); //Walk from the edge parms.raidArrivalMode = PawnsArrivalModeDefOf.EdgeWalkIn; if (parms.raidArrivalMode.Worker.TryResolveRaidSpawnCenter(parms) == false) { _log.Debug($"Incident failed to fire, no spawn points available"); return false; } Pawn nymph = GenerateNymph(parms.target as Map); _log.Debug($"Generated nymph {nymph.GetName()}"); parms.raidArrivalMode.Worker.Arrive(new List<Pawn>() { nymph }, parms); SetManhunter(nymph); Find.LetterStack.ReceiveLetter( "RJW_nymph_incident_wander_title".Translate(), "RJW_nymph_incident_wander_description".Translate(), LetterDefOf.ThreatSmall, nymph); return true; } protected Pawn GenerateNymph(Map map) { Pawn nymph = _nymphService.GenerateNymph(map); nymph.ChangeKind(PawnKindDefOf.WildMan); return nymph; } protected void SetManhunter(Pawn nymph) { _nymphService.SetManhunter(nymph); } } }
jojo1541/rjw
1.3/Source/Modules/Nymphs/Incidents/IncidentWorker_NymphVisitor.cs
C#
mit
2,229
using System; using System.Linq; using Verse; using Verse.AI; using Verse.AI.Group; using RimWorld; namespace rjw { // Token: 0x020006B5 RID: 1717 public class JobGiver_NymphSapper : ThinkNode_JobGiver { // Token: 0x06002E54 RID: 11860 RVA: 0x001041A7 File Offset: 0x001023A7 public override ThinkNode DeepCopy(bool resolve = true) { JobGiver_NymphSapper jobGiver_NymphSapper = (JobGiver_NymphSapper)base.DeepCopy(resolve); jobGiver_NymphSapper.canMineMineables = this.canMineMineables; jobGiver_NymphSapper.canMineNonMineables = this.canMineNonMineables; return jobGiver_NymphSapper; } // Token: 0x06002E55 RID: 11861 RVA: 0x001041D0 File Offset: 0x001023D0 protected override Job TryGiveJob(Pawn pawn) { if (!RJWSettings.NymphSappers) return null; if (!xxx.is_nympho(pawn)) return null; IntVec3 intVec; { IAttackTarget attackTarget; if (!(from x in pawn.Map.mapPawns.FreeColonistsAndPrisonersSpawned where !x.ThreatDisabled(pawn) && pawn.CanReach(x, PathEndMode.OnCell, Danger.Deadly, false, false, TraverseMode.PassAllDestroyableThings) select x).TryRandomElement(out attackTarget)) { return null; } intVec = attackTarget.Thing.Position; } using (PawnPath pawnPath = pawn.Map.pathFinder.FindPath(pawn.Position, intVec, TraverseParms.For(pawn, Danger.Deadly, TraverseMode.PassDoors, false), PathEndMode.OnCell)) { IntVec3 cellBeforeBlocker; Thing thing = pawnPath.FirstBlockingBuilding(out cellBeforeBlocker, pawn); if (thing != null) { Job job = DigUtility.PassBlockerJob(pawn, thing, cellBeforeBlocker, this.canMineMineables, this.canMineNonMineables); if (job != null) { return job; } } } return JobMaker.MakeJob(JobDefOf.Goto, intVec, 500, true); } // Token: 0x04001A64 RID: 6756 private bool canMineMineables = false; // Token: 0x04001A65 RID: 6757 private bool canMineNonMineables = false; // Token: 0x04001A66 RID: 6758 private const float ReachDestDist = 10f; // Token: 0x04001A67 RID: 6759 private const int CheckOverrideInterval = 500; } }
jojo1541/rjw
1.3/Source/Modules/Nymphs/JobGivers/JobGiver_NymphSapper.cs
C#
mit
2,124
using rjw.Modules.Shared.Logs; namespace rjw.Modules.Nymphs { public class NymphLogProvider : ILogProvider { public bool IsActive => RJWSettings.DebugNymph; } }
jojo1541/rjw
1.3/Source/Modules/Nymphs/NymphLogProvider.cs
C#
mit
170
using System.Collections.Generic; using RimWorld; using Verse; using Multiplayer.API; using System.Linq; using System.Linq.Expressions; namespace rjw { public struct nymph_story { public Backstory child; public Backstory adult; public List<Trait> traits; } public struct nymph_passion_chances { public float major; public float minor; public nymph_passion_chances(float maj, float min) { major = maj; minor = min; } } public static class nymph_backstories { public struct child { public static Backstory vatgrown_sex_slave; }; public struct adult { public static Backstory feisty; public static Backstory curious; public static Backstory tender; public static Backstory chatty; public static Backstory broken; public static Backstory homekeeper; }; public static void init() { { Backstory bs = new Backstory(); bs.identifier = ""; // identifier will be set by ResolveReferences MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_vatgrown_sex_slave"); if (MTdef != null) { bs.SetTitle(MTdef.label, MTdef.label); bs.SetTitleShort(MTdef.stringA, MTdef.stringA); bs.baseDesc = MTdef.description; } else { bs.SetTitle("Vat-Grown Sex Slave", "Vat-Grown Sex Slave"); bs.SetTitleShort("SexSlave", "SexSlave"); bs.baseDesc = "SexSlave Nymph"; } // bs.skillGains = new Dictionary<string, int> (); bs.skillGainsResolved.Add(SkillDefOf.Social, 8); // bs.skillGainsResolved = new Dictionary<SkillDef, int> (); // populated by ResolveReferences bs.workDisables = WorkTags.Intellectual; bs.requiredWorkTags = WorkTags.None; bs.slot = BackstorySlot.Childhood; bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); //bs.bodyTypeFemale = BodyType.Female; //bs.bodyTypeMale = BodyType.Thin; bs.forcedTraits = new List<TraitEntry>(); bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); bs.disallowedTraits = new List<TraitEntry>(); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); bs.shuffleable = true; bs.ResolveReferences(); BackstoryDatabase.AddBackstory(bs); child.vatgrown_sex_slave = bs; //--ModLog.Message("nymph_backstories::init() succeed0"); } { Backstory bs = new Backstory(); bs.identifier = ""; MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_feisty"); if (MTdef != null) { bs.SetTitle(MTdef.label, MTdef.label); bs.SetTitleShort(MTdef.stringA, MTdef.stringA); bs.baseDesc = MTdef.description; } else { bs.SetTitle("Feisty Nymph", "Feisty Nymph"); bs.SetTitleShort("Nymph", "Nymph"); bs.baseDesc = "Feisty Nymph"; } bs.skillGainsResolved.Add(SkillDefOf.Social, -3); bs.skillGainsResolved.Add(SkillDefOf.Shooting, 2); bs.skillGainsResolved.Add(SkillDefOf.Melee, 9); bs.workDisables = (WorkTags.Cleaning | WorkTags.Animals | WorkTags.Caring | WorkTags.Artistic | WorkTags.ManualSkilled); bs.requiredWorkTags = WorkTags.None; bs.slot = BackstorySlot.Adulthood; bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); bs.forcedTraits = new List<TraitEntry>(); bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); bs.disallowedTraits = new List<TraitEntry>(); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); bs.shuffleable = true; bs.ResolveReferences(); BackstoryDatabase.AddBackstory(bs); adult.feisty = bs; //--ModLog.Message("nymph_backstories::init() succeed1"); } { Backstory bs = new Backstory(); bs.identifier = ""; MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_curious"); if (MTdef != null) { bs.SetTitle(MTdef.label, MTdef.label); bs.SetTitleShort(MTdef.stringA, MTdef.stringA); bs.baseDesc = MTdef.description; } else { bs.SetTitle("Curious Nymph", "Curious Nymph"); bs.SetTitleShort("Nymph", "Nymph"); bs.baseDesc = "Curious Nymph"; } bs.skillGainsResolved.Add(SkillDefOf.Construction, 2); bs.skillGainsResolved.Add(SkillDefOf.Crafting, 6); bs.workDisables = (WorkTags.Animals | WorkTags.Artistic | WorkTags.Caring | WorkTags.Cooking | WorkTags.Mining | WorkTags.PlantWork | WorkTags.Violent | WorkTags.ManualDumb); bs.requiredWorkTags = WorkTags.None; bs.slot = BackstorySlot.Adulthood; bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); bs.forcedTraits = new List<TraitEntry>(); bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); bs.disallowedTraits = new List<TraitEntry>(); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); bs.shuffleable = true; bs.ResolveReferences(); BackstoryDatabase.AddBackstory(bs); adult.curious = bs; //--ModLog.Message("nymph_backstories::init() succeed2"); } { Backstory bs = new Backstory(); bs.identifier = ""; MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_tender"); if (MTdef != null) { bs.SetTitle(MTdef.label, MTdef.label); bs.SetTitleShort(MTdef.stringA, MTdef.stringA); bs.baseDesc = MTdef.description; } else { bs.SetTitle("Tender Nymph", "Tender Nymph"); bs.SetTitleShort("Nymph", "Nymph"); bs.baseDesc = "Tender Nymph"; } bs.skillGainsResolved.Add(SkillDefOf.Medicine, 4); bs.workDisables = (WorkTags.Animals | WorkTags.Artistic | WorkTags.Hauling | WorkTags.Violent | WorkTags.ManualSkilled); bs.requiredWorkTags = WorkTags.None; bs.slot = BackstorySlot.Adulthood; bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); bs.forcedTraits = new List<TraitEntry>(); bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); bs.disallowedTraits = new List<TraitEntry>(); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); bs.shuffleable = true; bs.ResolveReferences(); BackstoryDatabase.AddBackstory(bs); adult.tender = bs; //--ModLog.Message("nymph_backstories::init() succeed3"); } { Backstory bs = new Backstory(); bs.identifier = ""; MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_chatty"); if (MTdef != null) { bs.SetTitle(MTdef.label, MTdef.label); bs.SetTitleShort(MTdef.stringA, MTdef.stringA); bs.baseDesc = MTdef.description; } else { bs.SetTitle("Chatty Nymph", "Chatty Nymph"); bs.SetTitleShort("Nymph", "Nymph"); bs.baseDesc = "Chatty Nymph"; } bs.skillGainsResolved.Add(SkillDefOf.Social, 6); bs.workDisables = (WorkTags.Animals | WorkTags.Caring | WorkTags.Artistic | WorkTags.Violent | WorkTags.ManualDumb | WorkTags.ManualSkilled); bs.requiredWorkTags = WorkTags.None; bs.slot = BackstorySlot.Adulthood; bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); bs.forcedTraits = new List<TraitEntry>(); bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); bs.disallowedTraits = new List<TraitEntry>(); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); bs.shuffleable = true; bs.ResolveReferences(); BackstoryDatabase.AddBackstory(bs); adult.chatty = bs; //--ModLog.Message("nymph_backstories::init() succeed4"); } { Backstory bs = new Backstory(); bs.identifier = ""; MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_broken"); if (MTdef != null) { bs.SetTitle(MTdef.label, MTdef.label); bs.SetTitleShort(MTdef.stringA, MTdef.stringA); bs.baseDesc = MTdef.description; } else { bs.SetTitle("Broken Nymph", "Broken Nymph"); bs.SetTitleShort("Nymph", "Nymph"); bs.baseDesc = "Broken Nymph"; } bs.skillGainsResolved.Add(SkillDefOf.Social, -5); bs.skillGainsResolved.Add(SkillDefOf.Artistic, 8); bs.workDisables = (WorkTags.Cleaning | WorkTags.Animals | WorkTags.Caring | WorkTags.Violent | WorkTags.ManualSkilled); bs.requiredWorkTags = WorkTags.None; bs.slot = BackstorySlot.Adulthood; bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); bs.forcedTraits = new List<TraitEntry>(); bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); bs.disallowedTraits = new List<TraitEntry>(); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); bs.shuffleable = true; bs.ResolveReferences(); BackstoryDatabase.AddBackstory(bs); adult.broken = bs; //--ModLog.Message("nymph_backstories::init() succeed5"); } //{ // Backstory bs = new Backstory(); // bs.identifier = ""; // MiscTranslationDef MTdef = DefDatabase<MiscTranslationDef>.GetNamedSilentFail("rjw_homekeeper"); // if (MTdef != null) // { // bs.SetTitle(MTdef.label, MTdef.label); // bs.SetTitleShort(MTdef.stringA, MTdef.stringA); // bs.baseDesc = MTdef.description; // } // else // { // bs.SetTitle("Home keeper Nymph", "Home keeper Nymph"); // bs.SetTitleShort("Nymph", "Nymph"); // bs.baseDesc = "Home keeper Nymph"; // } // bs.skillGainsResolved.Add(SkillDefOf.Cooking, 8); // bs.workDisables = (WorkTags.Animals | WorkTags.Caring | WorkTags.Violent | WorkTags.Artistic | WorkTags.Crafting | WorkTags.PlantWork | WorkTags.Mining); // bs.requiredWorkTags = (WorkTags.Cleaning | WorkTags.Cooking); // bs.slot = BackstorySlot.Adulthood; // bs.spawnCategories = new List<string>() { "rjw_nymphsCategory", "Slave" }; // Not necessary (I Think) // Unprivater.SetProtectedValue("bodyTypeGlobal", bs, "Thin"); // Unprivater.SetProtectedValue("bodyTypeFemale", bs, "Thin"); // Unprivater.SetProtectedValue("bodyTypeMale", bs, "Thin"); // Unprivater.SetProtectedValue("bodyTypeGlobalResolved", bs, BodyTypeDefOf.Thin); // Unprivater.SetProtectedValue("bodyTypeFemaleResolved", bs, BodyTypeDefOf.Thin); // Unprivater.SetProtectedValue("bodyTypeMaleResolved", bs, BodyTypeDefOf.Thin); // bs.forcedTraits = new List<TraitEntry>(); // bs.forcedTraits.Add(new TraitEntry(xxx.nymphomaniac, 0)); // bs.disallowedTraits = new List<TraitEntry>(); // bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesMen, 0)); // bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.DislikesWomen, 0)); // bs.disallowedTraits.Add(new TraitEntry(TraitDefOf.TooSmart, 0)); // bs.shuffleable = true; // bs.ResolveReferences(); // BackstoryDatabase.AddBackstory(bs); // adult.homekeeper = bs; // //--ModLog.Message("nymph_backstories::init() succeed6"); //} } public static nymph_passion_chances get_passion_chances(Backstory child_bs, Backstory adult_bs, SkillDef skill_def) { var maj = 0.0f; var min = 0.0f; if (adult_bs == adult.feisty) { if (skill_def == SkillDefOf.Melee) { maj = 0.50f; min = 1.00f; } else if (skill_def == SkillDefOf.Shooting) { maj = 0.25f; min = 0.75f; } else if (skill_def == SkillDefOf.Social) { maj = 0.10f; min = 0.67f; } } else if (adult_bs == adult.curious) { if (skill_def == SkillDefOf.Construction) { maj = 0.15f; min = 0.40f; } else if (skill_def == SkillDefOf.Crafting) { maj = 0.50f; min = 1.00f; } else if (skill_def == SkillDefOf.Social) { maj = 0.20f; min = 1.00f; } } else if (adult_bs == adult.tender) { if (skill_def == SkillDefOf.Medicine) { maj = 0.20f; min = 0.60f; } else if (skill_def == SkillDefOf.Social) { maj = 0.50f; min = 1.00f; } } else if (adult_bs == adult.chatty) { if (skill_def == SkillDefOf.Social) { maj = 1.00f; min = 1.00f; } } else if (adult_bs == adult.broken) { if (skill_def == SkillDefOf.Artistic) { maj = 0.50f; min = 1.00f; } else if (skill_def == SkillDefOf.Social) { maj = 0.00f; min = 0.33f; } } else if (adult_bs == adult.homekeeper) { if (skill_def == SkillDefOf.Cooking) { maj = 0.50f; min = 1.00f; } else if (skill_def == SkillDefOf.Social) { maj = 0.00f; min = 0.33f; } } return new nymph_passion_chances(maj, min); } // Randomly chooses backstories and traits for a nymph [SyncMethod] public static nymph_story generate() { var tr = new nymph_story(); tr.child = child.vatgrown_sex_slave; tr.traits = new List<Trait>(); tr.traits.Add(new Trait(xxx.nymphomaniac, 0, true)); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); var beauty = 0; var rv2 = Rand.Value; var story = (BackstoryDatabase.allBackstories.Where(x => x.Value.spawnCategories.Contains("rjw_nymphsCategory") && x.Value.slot == BackstorySlot.Adulthood)).ToList().RandomElement().Value; if (story == adult.feisty) { tr.adult = adult.feisty; beauty = Rand.RangeInclusive(0, 2); if (rv2 < 0.33) tr.traits.Add(new Trait(TraitDefOf.Brawler)); else if (rv2 < 0.67) tr.traits.Add(new Trait(TraitDefOf.Bloodlust)); else tr.traits.Add(new Trait(xxx.rapist)); } else if (story == adult.curious) { tr.adult = adult.curious; beauty = Rand.RangeInclusive(0, 2); if (rv2 < 0.33) tr.traits.Add(new Trait(TraitDefOf.Transhumanist)); } else if (story == adult.tender) { tr.adult = adult.tender; beauty = Rand.RangeInclusive(1, 2); if (rv2 < 0.50) tr.traits.Add(new Trait(TraitDefOf.Kind)); } else if (story == adult.chatty) { tr.adult = adult.chatty; beauty = 2; if (rv2 < 0.33) tr.traits.Add(new Trait(TraitDefOf.Greedy)); } else if (story == adult.broken) { tr.adult = adult.broken; beauty = Rand.RangeInclusive(0, 2); if (rv2 < 0.33) tr.traits.Add(new Trait(TraitDefOf.DrugDesire, 1)); else if (rv2 < 0.67) tr.traits.Add(new Trait(TraitDefOf.DrugDesire, 2)); } //else //{ // tr.adult = adult.homekeeper; // beauty = Rand.RangeInclusive(1, 2); // if (rv2 < 0.33) // tr.traits.Add(new Trait(TraitDefOf.Kind)); //} if (beauty > 0) tr.traits.Add(new Trait(TraitDefOf.Beauty, beauty, false)); return tr; } } }
jojo1541/rjw
1.3/Source/Modules/Nymphs/Pawns/Nymph_Backstories.cs
C#
mit
17,922
using System.Collections.Generic; using RimWorld; using UnityEngine; using Verse; using System; using Multiplayer.API; using System.Linq; namespace rjw { public static class Nymph_Generator { /// <summary> /// Returns true if the given pawnGenerationRequest is for a nymph pawnKind. /// </summary> public static bool IsNymph(PawnGenerationRequest pawnGenerationRequest) { return pawnGenerationRequest.KindDef != null && pawnGenerationRequest.KindDef.defName.Contains("Nymph"); } private static bool is_trait_conflicting_or_duplicate(Pawn pawn, Trait t) { foreach (var existing in pawn.story.traits.allTraits) if ((existing.def == t.def) || (t.def.ConflictsWith(existing))) return true; return false; } public static bool IsNymphBodyType(Pawn pawn) { return pawn.story.bodyType == BodyTypeDefOf.Female || pawn.story.bodyType == BodyTypeDefOf.Thin; } [SyncMethod] public static Gender RandomNymphGender() { //with males 100% its still 99%, coz im to lazy to fix it //float rnd = Rand.Value; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); float chance = RJWSettings.male_nymph_chance; Gender Pawngender = Rand.Chance(chance) ? Gender.Male: Gender.Female; //ModLog.Message(" setnymphsex: " + (rnd < chance) + " rnd:" + rnd + " chance:" + chance); //ModLog.Message(" setnymphsex: " + Pawngender); return Pawngender; } /// <summary> /// Replaces a pawn's backstory and traits to turn it into a nymph /// </summary> [SyncMethod] public static void set_story(Pawn pawn) { var gen_sto = nymph_backstories.generate(); pawn.story.childhood = gen_sto.child; pawn.story.adulthood = gen_sto.adult; // add broken body to broken nymph if (pawn.story.adulthood == nymph_backstories.adult.broken) { pawn.health.AddHediff(xxx.feelingBroken); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); (pawn.health.hediffSet.GetFirstHediffOfDef(xxx.feelingBroken)).Severity = Rand.Range(0.4f, 1.0f); } //The mod More Trait Slots will adjust the max number of traits pawn can get, and therefore, //I need to collect pawns' traits and assign other_traits back to the pawn after adding the nymph_story traits. Stack<Trait> other_traits = new Stack<Trait>(); int numberOfTotalTraits = 0; if (!pawn.story.traits.allTraits.NullOrEmpty()) { foreach (Trait t in pawn.story.traits.allTraits) { other_traits.Push(t); ++numberOfTotalTraits; } } pawn.story.traits.allTraits.Clear(); var trait_count = 0; foreach (var t in gen_sto.traits) { pawn.story.traits.GainTrait(t); ++trait_count; } while (trait_count < numberOfTotalTraits) { Trait t = other_traits.Pop(); if (!is_trait_conflicting_or_duplicate(pawn, t)) pawn.story.traits.GainTrait(t); ++trait_count; } } [SyncMethod] private static int sum_previous_gains(SkillDef def, Pawn_StoryTracker sto, Pawn_AgeTracker age) { int total_gain = 0; int gain; // Gains from backstories if (sto.childhood.skillGainsResolved.TryGetValue(def, out gain)) total_gain += gain; if (sto.adulthood.skillGainsResolved.TryGetValue(def, out gain)) total_gain += gain; // Gains from traits foreach (var trait in sto.traits.allTraits) if (trait.CurrentData.skillGains.TryGetValue(def, out gain)) total_gain += gain; // Gains from age //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); var rgain = Rand.Value * (float)total_gain * 0.35f; var age_factor = Mathf.Clamp01((age.AgeBiologicalYearsFloat - 17.0f) / 10.0f); // Assume nymphs are 17~27 total_gain += (int)(age_factor * rgain); return Mathf.Clamp(total_gain, 0, 20); } /// <summary> /// Set a nymph's initial skills & passions from backstory, traits, and age /// </summary> [SyncMethod] public static void set_skills(Pawn pawn) { foreach (var skill_def in DefDatabase<SkillDef>.AllDefsListForReading) { var rec = pawn.skills.GetSkill(skill_def); if (!rec.TotallyDisabled) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); rec.Level = sum_previous_gains(skill_def, pawn.story, pawn.ageTracker); rec.xpSinceLastLevel = rec.XpRequiredForLevelUp * Rand.Range(0.10f, 0.90f); var pas_cha = nymph_backstories.get_passion_chances(pawn.story.childhood, pawn.story.adulthood, skill_def); var rv = Rand.Value; if (rv < pas_cha.major) rec.passion = Passion.Major; else if (rv < pas_cha.minor) rec.passion = Passion.Minor; else rec.passion = Passion.None; } else rec.passion = Passion.None; } } [SyncMethod] public static PawnKindDef GetFixedNymphPawnKindDef() { var def = DefDatabase<PawnKindDef>.AllDefs.Where(x => x.defName.Contains("Nymph")).RandomElement(); //var def = PawnKindDef.Named("Nymph"); // This is 18 in the xml but something is overwriting it to 5. //def.minGenerationAge = 18; return def; } [SyncMethod] public static Pawn GenerateNymph(Faction faction = null) { // Most of the special properties of nymphs are in harmony patches to PawnGenerator. PawnGenerationRequest request = new PawnGenerationRequest( kind: GetFixedNymphPawnKindDef(), faction: faction, forceGenerateNewPawn: true, canGeneratePawnRelations: true, colonistRelationChanceFactor: 0.0f, inhabitant: true, relationWithExtraPawnChanceFactor: 0 ); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); Pawn pawn = PawnGenerator.GeneratePawn(request); //Log.Message(""+ pawn.Faction); //IntVec3 spawn_loc = CellFinder.RandomClosewalkCellNear(around_loc, map, 6);//RandomSpawnCellForPawnNear could be an alternative //GenSpawn.Spawn(pawn, spawn_loc, map); return pawn; } } }
jojo1541/rjw
1.3/Source/Modules/Nymphs/Pawns/Nymph_Generator.cs
C#
mit
5,898
using System; using RimWorld; using Verse; namespace rjw { public class BackstoryDef : Def { public BackstoryDef() { this.slot = BackstorySlot.Childhood; } public static BackstoryDef Named(string defName) { return DefDatabase<BackstoryDef>.GetNamed(defName, true); } public override void ResolveReferences() { base.ResolveReferences(); if (BackstoryDatabase.allBackstories.ContainsKey(this.defName)) { ModLog.Error("BackstoryDatabase already contains: " + this.defName); return; } { //Log.Warning("BackstoryDatabase does not contains: " + this.defName); } if (!this.title.NullOrEmpty()) { Backstory backstory = new Backstory(); backstory.SetTitle(this.title, this.titleFemale); backstory.SetTitleShort(this.titleShort, this.titleFemaleShort); backstory.baseDesc = this.baseDescription; backstory.slot = this.slot; backstory.spawnCategories.Add(this.categoryName); backstory.ResolveReferences(); backstory.PostLoad(); backstory.identifier = this.defName; BackstoryDatabase.allBackstories.Add(backstory.identifier, backstory); //Log.Warning("BackstoryDatabase added: " + backstory.identifier); //Log.Warning("BackstoryDatabase added: " + backstory.spawnCategories.ToCommaList()); } } public string baseDescription; public string title; public string titleShort; public string titleFemale; public string titleFemaleShort; public string categoryName; public BackstorySlot slot; } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/BackstoryDef.cs
C#
mit
1,519
using System.Collections.Generic; using Verse; using Multiplayer.API; using RimWorld; namespace rjw { //MicroComputer internal class Hediff_MicroComputer : Hediff_MechImplants { protected int nextEventTick = GenDate.TicksPerDay; public override void ExposeData() { base.ExposeData(); Scribe_Values.Look<int>(ref this.nextEventTick, "nextEventTick", GenDate.TicksPerDay, false); } [SyncMethod] public override void PostMake() { base.PostMake(); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); nextEventTick = Rand.Range(mcDef.minEventInterval, mcDef.maxEventInterval); } [SyncMethod] public override void Tick() { base.Tick(); if (this.pawn.IsHashIntervalTick(1000)) { if (this.ageTicks >= nextEventTick) { HediffDef randomEffectDef = DefDatabase<HediffDef>.GetNamed(randomEffect); if (randomEffectDef != null) { pawn.health.AddHediff(randomEffectDef); } else { //--ModLog.Message("" + this.GetType().ToString() + "::Tick() - There is no Random Effect"); } this.ageTicks = 0; } } } protected HediffDef_MechImplants mcDef { get { return ((HediffDef_MechImplants)def); } } protected List<string> randomEffects { get { return mcDef.randomHediffDefs; } } protected string randomEffect { get { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); return randomEffects.RandomElement<string>(); } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/HeDiff_MicroComputer.cs
C#
mit
1,534
using System.Collections.Generic; using Verse; using System.Linq; namespace rjw { [StaticConstructorOnStartup] internal class HediffDef_EnemyImplants : HediffDef { //single parent eggs public string parentDef = ""; //multiparent eggs public List<string> parentDefs = new List<string>(); //for implanting eggs public bool IsParent(string defnam) { return //predefined parent eggs parentDef == defnam || parentDefs.Contains(defnam) || //dynamic egg (parentDef == "Unknown" && defnam == "Unknown" && RJWPregnancySettings.egg_pregnancy_implant_anyone); } } [StaticConstructorOnStartup] internal class HediffDef_InsectEgg : HediffDef_EnemyImplants { //this is filled from xml //1 day = 60000 ticks public float eggsize = 1; public bool selffertilized = false; public List<string> childrenDefs = new List<string>(); public string UnFertEggDef; public string FertEggDef; } [StaticConstructorOnStartup] internal class HediffDef_MechImplants : HediffDef_EnemyImplants { public List<string> randomHediffDefs = new List<string>(); public int minEventInterval = 30000; public int maxEventInterval = 90000; public List<string> childrenDefs = new List<string>(); } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/HediffDef_EnemyImplants.cs
C#
mit
1,239
using System; using System.Collections.Generic; using RimWorld; using Verse; using UnityEngine; using System.Text; using Multiplayer.API; using System.Linq; using RimWorld.Planet; namespace rjw { public abstract class Hediff_BasePregnancy : HediffWithComps { ///<summary> ///This hediff class simulates pregnancy. ///</summary> //Static fields private const int MiscarryCheckInterval = 1000; protected const string starvationMessage = "MessageMiscarriedStarvation"; protected const string poorHealthMessage = "MessageMiscarriedPoorHealth"; protected static readonly HashSet<string> non_genetic_traits = new HashSet<string>(DefDatabase<StringListDef>.GetNamed("NonInheritedTraits").strings); //Fields ///All babies should be premade and stored here public List<Pawn> babies; ///Reference to daddy, goes null sometimes public Pawn father; ///Is pregnancy visible? public bool is_discovered = false; public bool is_parent_known = false; public bool ShouldMiscarry = false; public bool ImmortalMiscarry = false; ///Is pregnancy type checked? public bool is_checked = false; ///Mechanoid pregnancy, false - spawn aggressive mech public bool is_hacked = false; ///Contractions duration, effectively additional hediff stage, a dirty hack to make birthing process notable public int contractions; ///Gestation progress public float p_start_tick = 0; public float p_end_tick = 0; public float lastTick = 0; //public string last_name //{ // get // { // string last_name = ""; // if (xxx.is_human(father)) // last_name = NameTriple.FromString(father.Name.ToStringFull).Last; // else if (xxx.is_human(pawn)) // last_name = NameTriple.FromString(pawn.Name.ToStringFull).Last; // return last_name; // } //} //public float skin_whiteness //{ // get // { // float skin_whiteness = Rand.Range(0, 1); // if (xxx.has_traits(pawn) && pawn.RaceProps.Humanlike) // { // skin_whiteness = pawn.story.melanin; // } // if (father != null && xxx.has_traits(father) && father.RaceProps.Humanlike) // { // skin_whiteness = Rand.Range(skin_whiteness, father.story.melanin); // } // return skin_whiteness; // } //} //public List<Trait> traitpool //{ // get // { // List<Trait> traitpool = new List<Trait>(); // if (xxx.has_traits(pawn) && pawn.RaceProps.Humanlike) // { // foreach (Trait momtrait in pawn.story.traits.allTraits) // { // if (!RJWPregnancySettings.trait_filtering_enabled || !non_genetic_traits.Contains(momtrait.def.defName)) // traitpool.Add(momtrait); // } // } // if (father != null && xxx.has_traits(father) && father.RaceProps.Humanlike) // { // foreach (Trait poptrait in father.story.traits.allTraits) // { // if (!RJWPregnancySettings.trait_filtering_enabled || !non_genetic_traits.Contains(poptrait.def.defName)) // traitpool.Add(poptrait); // } // } // return traitpool; // } //} // // Properties // public float GestationProgress { get => Severity; private set => Severity = value; } private bool IsSeverelyWounded { get { float num = 0; List<Hediff> hediffs = pawn.health.hediffSet.hediffs; foreach (Hediff h in hediffs) { //this errors somewhy, //ModLog.Message(" 1 " + h.Part.IsCorePart); //ModLog.Message(" 2 " + h.Part.parent.IsCorePart); //if (h.Part.IsCorePart || h.Part.parent.IsCorePart) if (h is Hediff_Injury && (!h.IsPermanent() || !h.IsTended())) { if (h.Part != null) if (h.Part.IsCorePart || h.Part.parent.IsCorePart) num += h.Severity; } } List<Hediff_MissingPart> missingPartsCommonAncestors = pawn.health.hediffSet.GetMissingPartsCommonAncestors(); foreach (Hediff_MissingPart mp in missingPartsCommonAncestors) { if (mp.IsFreshNonSolidExtremity) { if (mp.Part != null) if (mp.Part.IsCorePart || mp.Part.parent.IsCorePart) num += mp.Part.def.GetMaxHealth(pawn); } } return num > 38 * pawn.RaceProps.baseHealthScale; } } /// <summary> /// Indicates pregnancy can be aborted using usual means. /// </summary> public virtual bool canBeAborted { get { return true; } } /// <summary> /// Indicates pregnancy can be miscarried. /// </summary> public virtual bool canMiscarry { get { return true; } } public override string TipStringExtra { get { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.TipStringExtra); if(is_parent_known) stringBuilder.AppendLine("Father: " + xxx.get_pawnname(father)); else stringBuilder.AppendLine("Father: " + "Unknown"); return stringBuilder.ToString(); } } /// <summary> /// do not merge pregnancies /// </summary> //public override bool TryMergeWith(Hediff other) //{ // return false; //} public override void PostMake() { // Ensure the hediff always applies to the torso, regardless of incorrect directive base.PostMake(); BodyPartRecord torso = pawn.RaceProps.body.AllParts.Find(x => x.def.defName == "Torso"); if (Part != torso) Part = torso; //(debug->add heddif) //init empty preg, instabirth, cause error during birthing //Initialize(pawn, Trytogetfather(ref pawn)); } public override bool Visible => is_discovered; public virtual void DiscoverPregnancy() { is_discovered = true; if (PawnUtility.ShouldSendNotificationAbout(this.pawn)) { if (!is_checked) { string key1 = "RJW_PregnantTitle"; string message_title = TranslatorFormattedStringExtensions.Translate(key1, pawn.LabelIndefinite()).CapitalizeFirst(); string key2 = "RJW_PregnantText"; string message_text = TranslatorFormattedStringExtensions.Translate(key2, pawn.LabelIndefinite()).CapitalizeFirst(); Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.NeutralEvent, pawn, null); } else { PregnancyMessage(); } } } public virtual void CheckPregnancy() { is_checked = true; if (!is_discovered) DiscoverPregnancy(); else PregnancyMessage(); } public virtual void PregnancyMessage() { string key1 = "RJW_PregnantTitle"; string message_title = TranslatorFormattedStringExtensions.Translate(key1, pawn.LabelIndefinite()); string key2 = "RJW_PregnantNormal"; string message_text = TranslatorFormattedStringExtensions.Translate(key2, pawn.LabelIndefinite()); Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.NeutralEvent, pawn, null); } // Quick method to simply return a body part instance by a given part name internal static BodyPartRecord GetPawnBodyPart(Pawn pawn, String bodyPart) { return pawn.RaceProps.body.AllParts.Find(x => x.def == DefDatabase<BodyPartDef>.GetNamed(bodyPart)); } public virtual void Miscarry() { if (!babies.NullOrEmpty()) foreach (Pawn baby in babies) { baby.Destroy(); baby.Discard(); } pawn.health?.RemoveHediff(this); } /// <summary> /// Called on abortion (noy implemented yet) /// </summary> public virtual void Abort() { Miscarry(); } /// <summary> /// Mechanoids can remove pregnancy /// </summary> public virtual void Kill() { Miscarry(); } [SyncMethod] public Pawn partstospawn(Pawn baby, Pawn mother, Pawn dad) { //decide what parts to inherit //default use own parts Pawn partstospawn = baby; //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); //spawn with mother parts if (mother != null && Rand.Range(0, 100) <= 10) partstospawn = mother; //spawn with father parts if (dad != null && Rand.Range(0, 100) <= 10) partstospawn = dad; //ModLog.Message(" Pregnancy partstospawn " + partstospawn); return partstospawn; } [SyncMethod] public bool spawnfutachild(Pawn baby, Pawn mother, Pawn dad) { int futachance = 0; if (mother != null && Genital_Helper.is_futa(mother)) futachance = futachance + 25; if (dad != null && Genital_Helper.is_futa(dad)) futachance = futachance + 25; //ModLog.Message(" Pregnancy spawnfutachild " + futachance); //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); //theres 1% change baby will be futa //bug ... or ... feature ... nature finds a way return (Rand.Range(0, 100) <= futachance); } [SyncMethod] public static Pawn Trytogetfather(ref Pawn mother) { //birthing with debug has no father //Postmake.initialize() has no father ModLog.Warning("Hediff_BasePregnancy::Trytogetfather() - debug? no father defined, trying to add one"); Pawn pawn = mother; Pawn father = null; //possible fathers List<Pawn> partners = pawn.relations.RelatedPawns.Where(x => Genital_Helper.has_penis_fertile(x) && !x.Dead && (pawn.relations.DirectRelationExists(PawnRelationDefOf.Lover, x) || pawn.relations.DirectRelationExists(PawnRelationDefOf.Fiance, x) || pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, x)) ).ToList(); //add bonded animal if (RJWSettings.bestiality_enabled && xxx.is_zoophile(mother)) partners.AddRange(pawn.relations.RelatedPawns.Where(x => Genital_Helper.has_penis_fertile(x) && pawn.relations.DirectRelationExists(PawnRelationDefOf.Bond, x)).ToList()); if (partners.Any()) { father = partners.RandomElement(); ModLog.Warning("Hediff_BasePregnancy::Trytogetfather() - father set to: " + xxx.get_pawnname(father)); } if (father == null) { father = mother; ModLog.Warning("Hediff_BasePregnancy::Trytogetfather() - father is null, set to: " + xxx.get_pawnname(mother)); } return father; } public override void Tick() { ageTicks++; float thisTick = Find.TickManager.TicksGame; GestationProgress = (1 + thisTick - p_start_tick) / (p_end_tick - p_start_tick); if ((thisTick - lastTick) >= 1000) { if (babies.NullOrEmpty()) { ModLog.Warning(" no babies (debug?) " + this.GetType().Name); if (father == null) { father = Trytogetfather(ref pawn); } Initialize(pawn, father); GestationProgress = (1 + thisTick - p_start_tick) / (p_end_tick - p_start_tick); return; } lastTick = thisTick; if (canMiscarry) { //miscarry with immortal partners if (ImmortalMiscarry) { Miscarry(); return; } //ModLog.Message(" Pregnancy is ticking for " + pawn + " this is " + this.def.defName + " will end in " + 1/progress_per_tick/TicksPerDay + " days resulting in "+ babies[0].def.defName); //miscarry after starving if (pawn.needs.food != null && pawn.needs.food.CurCategory == HungerCategory.Starving) { var hed = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Malnutrition); if (hed.Severity > 0.4) { if (Visible && PawnUtility.ShouldSendNotificationAbout(pawn)) { string text = "MessageMiscarriedStarvation".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.NegativeHealthEvent); } Miscarry(); return; } } //let beatings only be important when pregnancy is developed somewhat //miscarry after SeverelyWounded if (Visible && (IsSeverelyWounded || ShouldMiscarry)) { if (Visible && PawnUtility.ShouldSendNotificationAbout(pawn)) { string text = "MessageMiscarriedPoorHealth".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.NegativeHealthEvent); } Miscarry(); return; } } // Check if pregnancy is far enough along to "show" for the body type if (!is_discovered) { BodyTypeDef bodyT = pawn?.story?.bodyType; //float threshold = 0f; if ((bodyT == BodyTypeDefOf.Thin && GestationProgress > 0.25f) || (bodyT == BodyTypeDefOf.Female && GestationProgress > 0.35f) || (GestationProgress > 0.50f)) // todo: Modded bodies? (FemaleBB for, example) DiscoverPregnancy(); //switch (bodyT) //{ //case BodyType.Thin: threshold = 0.3f; break; //case BodyType.Female: threshold = 0.389f; break; //case BodyType.Male: threshold = 0.41f; break; //default: threshold = 0.5f; break; //} //if (GestationProgress > threshold){ DiscoverPregnancy(); } } if (CurStageIndex == 3) { if (contractions == 0) { if (PawnUtility.ShouldSendNotificationAbout(pawn)) { string text = "RJW_Contractions".Translate(pawn.LabelIndefinite()); Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent); } contractions++; } if (GestationProgress >= 1 && (pawn.CarriedBy == null || pawn.CarriedByCaravan()))//birthing takes an hour { if (PawnUtility.ShouldSendNotificationAbout(pawn)) { string message_title = "RJW_GaveBirthTitle".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); string message_text = "RJW_GaveBirthText".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); string baby_text = ((babies.Count == 1) ? "RJW_ABaby".Translate() : "RJW_NBabies".Translate(babies.Count)); message_text = message_text + baby_text; Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.PositiveEvent, pawn); } GiveBirth(); } } } } /// <summary> /// Give birth if contraction stage, even if mother died /// </summary> public override void Notify_PawnDied() { base.Notify_PawnDied(); if (CurStageIndex == 3) GiveBirth(); } public override void ExposeData() { base.ExposeData(); Scribe_References.Look(ref father, "father", true); Scribe_Values.Look(ref is_checked, "is_checked"); Scribe_Values.Look(ref is_hacked, "is_hacked"); Scribe_Values.Look(ref is_discovered, "is_discovered"); Scribe_Values.Look(ref is_parent_known, "is_parent_known"); Scribe_Values.Look(ref ShouldMiscarry, "ShouldMiscarry"); Scribe_Values.Look(ref ImmortalMiscarry, "ImmortalMiscarry"); Scribe_Values.Look(ref contractions, "contractions"); Scribe_Collections.Look(ref babies, saveDestroyedThings: true, label: "babies", lookMode: LookMode.Deep, ctorArgs: new object[0]); Scribe_Values.Look(ref p_start_tick, "p_start_tick", 0); Scribe_Values.Look(ref p_end_tick, "p_end_tick", 0); Scribe_Values.Look(ref lastTick, "lastTick", 0); } //This should generate pawns to be born in due time. Should take into account all settings and parent races [SyncMethod] protected virtual void GenerateBabies() { Pawn mother = pawn; //Log.Message("Generating babies for " + this.def.defName); if (mother == null) { ModLog.Error("Hediff_BasePregnancy::GenerateBabies() - no mother defined"); return; } if (father == null) { father = Trytogetfather(ref mother); } //Babies will have average number of traits of their parents, this way it will hopefully be compatible with various mods that change number of allowed traits //int trait_count = 0; // not anymore. Using number of traits originally generated by game as a guide Pawn parent = mother; //race of child Pawn parent2 = father; //name for child bool is_humanmother = xxx.is_human(mother); bool is_humanfather = xxx.is_human(father); //Decide on which parent is first to be inherited if (father != null && RJWPregnancySettings.use_parent_method) { //Log.Message("The baby race needs definition"); //humanality if (is_humanmother && is_humanfather) { //Log.Message("It's of two humanlikes"); if (!Rand.Chance(RJWPregnancySettings.humanlike_DNA_from_mother)) { //Log.Message("Mother will birth father race"); parent = father; } else { //Log.Message("Mother will birth own race"); } } else { //bestiality if (is_humanmother ^ is_humanfather) { if (RJWPregnancySettings.bestiality_DNA_inheritance == 0.0f) { //Log.Message("mother will birth beast"); if (is_humanmother) parent = father; else parent = mother; } else if (RJWPregnancySettings.bestiality_DNA_inheritance == 1.0f) { //Log.Message("mother will birth humanlike"); if (is_humanmother) parent = mother; else parent = father; } else { if (!Rand.Chance(RJWPregnancySettings.bestial_DNA_from_mother)) { //Log.Message("Mother will birth father race"); parent = father; } else { //Log.Message("Mother will birth own race"); } } } //animality else if (!Rand.Chance(RJWPregnancySettings.bestial_DNA_from_mother)) { //Log.Message("Mother will birth father race"); parent = father; } else { //Log.Message("Mother will birth own race"); } } } bool IsAndroidmother = AndroidsCompatibility.IsAndroid(mother); bool IsAndroidfather = AndroidsCompatibility.IsAndroid(father); //androids can only birth non androids if (IsAndroidmother && !IsAndroidfather) { parent = father; } else if (!IsAndroidmother && IsAndroidfather) { parent = mother; } else if (IsAndroidmother && IsAndroidfather) { ModLog.Warning("Both parents are andoids, what have you done monster!"); //this should never happen but w/e } //ModLog.Message(" The main parent is " + parent); //Log.Message("Mother: " + xxx.get_pawnname(mother) + " kind: " + mother.kindDef); //Log.Message("Father: " + xxx.get_pawnname(father) + " kind: " + father.kindDef); //Log.Message("Baby base: " + xxx.get_pawnname(parent) + " kind: " + parent.kindDef); string last_name = ""; if (xxx.is_human(father)) last_name = NameTriple.FromString(father.Name.ToStringFull).Last; else if (xxx.is_human(pawn)) last_name = NameTriple.FromString(pawn.Name.ToStringFull).Last; float skin_whiteness = Rand.Range(0, 1); if (xxx.has_traits(pawn) && pawn.RaceProps.Humanlike) { skin_whiteness = pawn.story.melanin; } if (father != null && xxx.has_traits(father) && father.RaceProps.Humanlike) { skin_whiteness = Rand.Range(skin_whiteness, father.story.melanin); } List<Trait> traitpool = new List<Trait>(); List<Trait> momtraits = new List<Trait>(); List<Trait> poptraits = new List<Trait>(); List<Trait> traits_to_inherit = new List<Trait>(); System.Random rd = new System.Random(); int rand_trait_index = 0; float max_num_momtraits_inherited = RJWPregnancySettings.max_num_momtraits_inherited; float max_num_poptraits_inherited = RJWPregnancySettings.max_num_poptraits_inherited; float max_num_traits_inherited = max_num_momtraits_inherited + max_num_poptraits_inherited; int i = 1; int j = 1; //create list object to store traits of pop and mom if (xxx.has_traits(pawn) && pawn.RaceProps.Humanlike) { foreach (Trait momtrait in pawn.story.traits.allTraits) { if (!non_genetic_traits.Contains(momtrait.def.defName) && !momtrait.ScenForced) momtraits.Add(momtrait); } } if (father != null && xxx.has_traits(father) && father.RaceProps.Humanlike) { foreach (Trait poptrait in father.story.traits.allTraits) { if (!non_genetic_traits.Contains(poptrait.def.defName) && !poptrait.ScenForced) poptraits.Add(poptrait); } } //add traits from pop and mom to list for traits to inherit if(!momtraits.NullOrEmpty()) { i = 1; while (momtraits.Count > 0 && i <= max_num_momtraits_inherited) { rand_trait_index = rd.Next(0, momtraits.Count); traits_to_inherit.Add(momtraits[rand_trait_index]); momtraits.RemoveAt(rand_trait_index); } } if(!poptraits.NullOrEmpty()) { j = 1; while (poptraits.Count > 0 && j <= max_num_poptraits_inherited) { rand_trait_index = rd.Next(0, poptraits.Count); traits_to_inherit.Add(poptraits[rand_trait_index]); poptraits.RemoveAt(rand_trait_index); } } //if there is only mom or even no mom traits to be considered, then there is no need to check duplicated tratis from parents //then the traits_to_inherit List is ready to be transfered into traitpool if (poptraits.NullOrEmpty() || momtraits.NullOrEmpty()) { foreach(Trait traits in traits_to_inherit) { traitpool.Add(traits); } } //if there are traits from both pop and mom, need to check if there are duplicated traits from parents else { //if length of traits_to_inherit equals maximum number of traits, then it means traits from bot parents reaches maximum value ,and no duplication, this list is ready to go //then the following big if chunk is not going to be executed, it will go directly to the last foreach chunk if (traits_to_inherit.Count() != max_num_traits_inherited) { //if not equivalent, it may due to removal of duplicated elements or number of traits of mom or pop are less than maximum number of traits can be inherited from mom or pop //now check if all the traits of mom has been added to traitpool for babies and if number of traits from mom has reached maximum while make sure momtraits is not null first if (momtraits.Count != 0 && i != max_num_momtraits_inherited) { while (poptraits != null && momtraits.Count > 0 && i <= max_num_momtraits_inherited) { rand_trait_index = rd.Next(0, momtraits.Count); //if this newly selected traits is not duplciated with traits already in traits_to_inherit if (!traits_to_inherit.Contains(momtraits[rand_trait_index])) { traits_to_inherit.Add(momtraits[rand_trait_index]); } momtraits.RemoveAt(rand_trait_index); } } //do processing to poptraits in the same way as momtraits if (poptraits != null && poptraits.Count != 0 && j != max_num_poptraits_inherited) { while (poptraits.Count > 0 && i <= max_num_poptraits_inherited) { rand_trait_index = rd.Next(0, poptraits.Count); //if this newly selected traits is not duplciated with traits already in traits_to_inherit if (!traits_to_inherit.Contains(poptraits[rand_trait_index])) { traits_to_inherit.Add(poptraits[rand_trait_index]); } poptraits.RemoveAt(rand_trait_index); } } } //add all traits in finalized trait_to_inherit List into traitpool List for further processing //if the above if chunk is executed, the following foreach chunk still needs to be executed, therefore there is no need to put this foreach chunk into an else chunk foreach (Trait traits in traits_to_inherit) { traitpool.Add(traits); } } //Pawn generation request PawnKindDef spawn_kind_def = parent.kindDef; Faction spawn_faction = mother.IsPrisoner ? null : mother.Faction; //ModLog.Message(" default child spawn_kind_def - " + spawn_kind_def); string MotherRaceName = ""; string FatherRaceName = ""; MotherRaceName = mother.kindDef.race.defName; if (father != null) FatherRaceName = father.kindDef.race.defName; //ModLog.Message(" MotherRaceName is " + MotherRaceName); //ModLog.Message(" FatherRaceName is " + FatherRaceName); if (MotherRaceName != FatherRaceName && FatherRaceName != "") { var groups = DefDatabase<RaceGroupDef>.AllDefs.Where(x => !x.hybridRaceParents.NullOrEmpty() && !x.hybridChildKindDef.NullOrEmpty()); //ModLog.Message(" found custom RaceGroupDefs " + groups.Count()); foreach (var t in groups) { //ModLog.Message(" trying custom RaceGroupDef " + t.defName); //ModLog.Message(" custom hybridRaceParents " + t.hybridRaceParents.Count()); //ModLog.Message(" contains hybridRaceParents MotherRaceName? " + t.hybridRaceParents.Contains(MotherRaceName)); //ModLog.Message(" contains hybridRaceParents FatherRaceName? " + t.hybridRaceParents.Contains(FatherRaceName)); if ((t.hybridRaceParents.Contains(MotherRaceName) && t.hybridRaceParents.Contains(FatherRaceName)) || (t.hybridRaceParents.Contains("Any") && (t.hybridRaceParents.Contains(MotherRaceName) || t.hybridRaceParents.Contains(FatherRaceName)))) { //ModLog.Message(" has hybridRaceParents"); if (t.hybridChildKindDef.Contains("MotherKindDef")) spawn_kind_def = mother.kindDef; else if (t.hybridChildKindDef.Contains("FatherKindDef") && father != null) spawn_kind_def = father.kindDef; else { //ModLog.Message(" trying hybridChildKindDef " + t.defName); var child_kind_def_list = new List<PawnKindDef>(); child_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => t.hybridChildKindDef.Contains(x.defName))); //ModLog.Message(" found custom hybridChildKindDefs " + t.hybridChildKindDef.Count); if (!child_kind_def_list.NullOrEmpty()) spawn_kind_def = child_kind_def_list.RandomElement(); } } } } if (spawn_kind_def.defName.Contains("Nymph")) { //child is nymph, try to find other PawnKindDef var spawn_kind_def_list = new List<PawnKindDef>(); spawn_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => x.race == spawn_kind_def.race && !x.defName.Contains("Nymph"))); //no other PawnKindDef found try mother if (spawn_kind_def_list.NullOrEmpty()) spawn_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => x.race == mother.kindDef.race && !x.defName.Contains("Nymph"))); //no other PawnKindDef found try father if (spawn_kind_def_list.NullOrEmpty() && father !=null) spawn_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => x.race == father.kindDef.race && !x.defName.Contains("Nymph"))); //no other PawnKindDef found fallback to generic colonist if (spawn_kind_def_list.NullOrEmpty()) spawn_kind_def = PawnKindDefOf.Colonist; spawn_kind_def = spawn_kind_def_list.RandomElement(); } //ModLog.Message(" final child spawn_kind_def - " + spawn_kind_def); //pregnancies with slimes birth only slimes //should somehow merge with above if (xxx.is_slime(mother)) { parent = mother; spawn_kind_def = parent.kindDef; } if (father != null) { if (xxx.is_slime(father)) { parent = father; spawn_kind_def = parent.kindDef; } } PawnGenerationRequest request = new PawnGenerationRequest( kind: spawn_kind_def, faction: spawn_faction, forceGenerateNewPawn: true, newborn: true, allowDowned: true, canGeneratePawnRelations: false, colonistRelationChanceFactor: 0, allowFood: false, allowAddictions: false, relationWithExtraPawnChanceFactor: 0, fixedMelanin: skin_whiteness, fixedLastName: last_name, //forceNoIdeo: true, forbidAnyTitle: true, forceNoBackstory: true ); //ModLog.Message(" Generated request, making babies"); //Litter size. Let's use the main parent litter size, reduced by fertility. float litter_size = (parent.RaceProps.litterSizeCurve == null) ? 1 : Rand.ByCurve(parent.RaceProps.litterSizeCurve); //ModLog.Message(" base Litter size " + litter_size); litter_size *= Math.Min(mother.health.capacities.GetLevel(xxx.reproduction), 1); litter_size *= Math.Min(father == null ? 1 : father.health.capacities.GetLevel(xxx.reproduction), 1); litter_size = Math.Max(1, litter_size); //ModLog.Message(" Litter size (w fertility) " + litter_size); //Babies body size vs mother body size (bonus childrens boost for multi children pregnancy, ~1.7 for humans ~ x2.2 orassans) //assuming mother belly is 1/3 of mother body size float baby_size = spawn_kind_def.RaceProps.lifeStageAges[0].def.bodySizeFactor; // adult size/5, probably? baby_size *= spawn_kind_def.RaceProps.baseBodySize; // adult size //ModLog.Message(" Baby size " + baby_size); float max_litter = 1f / 3f / baby_size; //ModLog.Message(" Max size " + max_litter); max_litter *= (mother.Has(Quirk.Breeder) || mother.Has(Quirk.Incubator)) ? 2 : 1; //ModLog.Message(" Max size (w quirks) " + max_litter); //Generate random amount of babies within litter/max size litter_size = (Rand.Range(litter_size, max_litter)); //ModLog.Message(" Litter size roll 1:" + litter_size); litter_size = Mathf.RoundToInt(litter_size); //ModLog.Message(" Litter size roll 2:" + litter_size); litter_size = Math.Max(1, litter_size); //ModLog.Message(" final Litter size " + litter_size); for (i = 0; i < litter_size; i++) { Pawn baby = PawnGenerator.GeneratePawn(request); if (xxx.is_human(baby)) { if (mother.IsSlaveOfColony) { //Log.Message("mother.SlaveFaction " + mother.SlaveFaction); //Log.Message("mother.HomeFaction " + mother.HomeFaction); //Log.Message("mother.Faction " + mother.Faction); if (mother.SlaveFaction != null) baby.SetFaction(mother.SlaveFaction); else if (mother.HomeFaction != null) baby.SetFaction(mother.HomeFaction); else if (mother.Faction != null) baby.SetFaction(mother.Faction); else baby.SetFaction(Faction.OfPlayer); baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Slave); } else if (mother.IsPrisonerOfColony) { //Log.Message("mother.HomeFaction " + mother.HomeFaction); if (mother.HomeFaction != null) baby.SetFaction(mother.HomeFaction); baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Prisoner); } //Choose traits to add to the child. Unlike CnP this will allow for some random traits if (traitpool.Count > 0) { updateTraits(baby, traitpool); } } babies.Add(baby); } } /// <summary> /// Update pawns traits /// Uses original pawns trains and given list of traits as a source of traits to select. /// </summary> /// <param name="pawn">humanoid pawn</param> /// <param name="traitpool">list of parent traits</param> /// <param name="traitLimit">maximum allowed number of traits</param> void updateTraits(Pawn pawn, List<Trait> parenttraitpool, int traitLimit = -1) { if (pawn?.story?.traits == null) { return; } if (traitLimit == -1) { traitLimit = pawn.story.traits.allTraits.Count; } //Personal pool List<Trait> personalTraitPool = new List<Trait>(pawn.story.traits.allTraits); //Parents pool if (parenttraitpool != null) { personalTraitPool.AddRange(parenttraitpool); } //Game suggested traits. var forcedTraits = personalTraitPool .Where(x => x.ScenForced) .Distinct(new TraitComparer(ignoreDegree: true)); // result can be a mess, because game allows this mess to be created in scenario editor List<Trait> selectedTraits = new List<Trait>(); selectedTraits.AddRange(forcedTraits); // enforcing scenario forced traits var comparer = new TraitComparer(); // trait comparision implementation, because without game compares traits *by reference*, makeing them all unique. while (selectedTraits.Count < traitLimit && personalTraitPool.Count > 0) { int index = Rand.Range(0, personalTraitPool.Count); // getting trait and removing from the pull var trait = personalTraitPool[index]; personalTraitPool.RemoveAt(index); if (!selectedTraits.Any(x => comparer.Equals(x, trait) || // skipping traits conflicting with already added x.def.ConflictsWith(trait))) { selectedTraits.Add(new Trait(trait.def, trait.Degree, false)); } } pawn.story.traits.allTraits = selectedTraits; } //Handles the spawning of pawns //this is extended by other scripts public abstract void GiveBirth(); //Add relations //post pregnancy effects //update birth stats //make baby futa if needed public virtual void PostBirth(Pawn mother, Pawn father, Pawn baby) { BabyPostBirth(mother, father, baby); //inject RJW_BabyState to the newborn if RimWorldChildren is not active //cnp patches its hediff right into pawn generator, so its already in if it can if (xxx.RimWorldChildrenIsActive) { if (xxx.is_human(mother)) { //BnC compatibility if (xxx.BnC_RJW_PostPregnancy == null) { mother.health.AddHediff(xxx.PostPregnancy, null, null); mother.health.AddHediff(xxx.Lactating, mother.RaceProps.body.AllParts.Find(x => x.def.defName == "Chest"), null); } if (xxx.is_human(baby)) { if (mother.records.GetAsInt(xxx.CountOfBirthHuman) == 0 && mother.records.GetAsInt(xxx.CountOfBirthAnimal) == 0 && mother.records.GetAsInt(xxx.CountOfBirthEgg) == 0) { mother.needs.mood.thoughts.memories.TryGainMemory(xxx.IGaveBirthFirstTime); } else { mother.needs.mood.thoughts.memories.TryGainMemory(xxx.IGaveBirth); } } } if (xxx.is_human(baby)) if (xxx.is_human(father)) { father.needs.mood.thoughts.memories.TryGainMemory(xxx.PartnerGaveBirth); } } if (baby.playerSettings != null && mother.playerSettings != null) { baby.playerSettings.AreaRestriction = mother.playerSettings.AreaRestriction; } //if (xxx.is_human(baby)) //{ // baby.story.melanin = skin_whiteness; // baby.story.birthLastName = last_name; //} //ModLog.Message("" + this.GetType().ToString() + " post PostBirth 1: " + baby.story.birthLastName); //spawn futa bool isfuta = spawnfutachild(baby, mother, father); if (!RacePartDef_Helper.TryRacePartDef_partAdders(baby)) { RemoveBabyParts(baby, Genital_Helper.get_AllPartsHediffList(baby)); if (isfuta) { SexPartAdder.add_genitals(baby, partstospawn(baby, mother, father), Gender.Male); SexPartAdder.add_genitals(baby, partstospawn(baby, mother, father), Gender.Female); SexPartAdder.add_breasts(baby, partstospawn(baby, mother, father), Gender.Female); baby.gender = Gender.Female; //set gender to female for futas, should cause no errors since babies already generated with relations n stuff } else { SexPartAdder.add_genitals(baby, partstospawn(baby, mother, father)); SexPartAdder.add_breasts(baby, partstospawn(baby, mother, father)); } SexPartAdder.add_anus(baby, partstospawn(baby, mother, father)); } //ModLog.Message("" + this.GetType().ToString() + " post PostBirth 2: " + baby.story.birthLastName); if (mother.Spawned) { // 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); } // Spawn guck FilthMaker.TryMakeFilth(mother.Position, mother.Map, ThingDefOf.Filth_AmnioticFluid, mother.LabelIndefinite(), 5); mother.caller?.DoCall(); baby.caller?.DoCall(); father?.caller?.DoCall(); } //ModLog.Message("" + this.GetType().ToString() + " post PostBirth 3: " + baby.story.birthLastName); if (xxx.is_human(baby)) mother.records.AddTo(xxx.CountOfBirthHuman, 1); if (xxx.is_animal(baby)) mother.records.AddTo(xxx.CountOfBirthAnimal, 1); if ((mother.records.GetAsInt(xxx.CountOfBirthHuman) > 10 || mother.records.GetAsInt(xxx.CountOfBirthAnimal) > 20)) { mother.Add(Quirk.Breeder); mother.Add(Quirk.ImpregnationFetish); } } public static void RemoveBabyParts(Pawn baby, List<Hediff> list) { //ModLog.Message(" RemoveBabyParts( " + xxx.get_pawnname(baby) + " ) - " + list.Count); if (!list.NullOrEmpty()) foreach (var x in list) { //ModLog.Message(" RemoveBabyParts( " + xxx.get_pawnname(baby) + " ) - " + x.def.defName); baby.health.RemoveHediff(x); //baby.health.RemoveHediff(baby.health.hediffSet.hediffs.Remove(x)); } } public static void BabyPostBirth(Pawn mother, Pawn father, Pawn baby) { if (!xxx.is_human(baby)) return; if (!xxx.RimWorldChildrenIsActive) { baby.story.childhood = null; baby.story.adulthood = null; try { // set child to civil Backstory bs = null; String bsDef = null; bool isTribal = false; // set child to tribal if both parents tribals if (father != null && father.story != null) { if (mother.story.GetBackstory(BackstorySlot.Adulthood) != null && father.story.GetBackstory(BackstorySlot.Adulthood).spawnCategories.Contains("Tribal")) isTribal = true; else if (mother.story.GetBackstory(BackstorySlot.Adulthood) == null && father.story.GetBackstory(BackstorySlot.Childhood).spawnCategories.Contains("Tribal")) isTribal = true; } else { //(int)Find.GameInitData.playerFaction.def.techLevel < 4; if ((int)mother.Faction.def.techLevel < 4) isTribal = true; } if (isTribal) { bsDef = "rjw_childT"; if (baby.GetRJWPawnData().RaceSupportDef != null) if (!baby.GetRJWPawnData().RaceSupportDef.backstoryChildTribal.NullOrEmpty()) bsDef = baby.GetRJWPawnData().RaceSupportDef.backstoryChildTribal.RandomElement(); } else { bsDef = "rjw_childC"; if (baby.GetRJWPawnData().RaceSupportDef != null) if (!baby.GetRJWPawnData().RaceSupportDef.backstoryChildCivil.NullOrEmpty()) bsDef = baby.GetRJWPawnData().RaceSupportDef.backstoryChildCivil.RandomElement(); } BackstoryDatabase.TryGetWithIdentifier(bsDef, out bs); baby.story.childhood = bs; } catch (Exception e) { ModLog.Warning(e.ToString()); } } else { ModLog.Message("PostBirth::RimWorldChildrenIsActive:: Rewriting story of " + baby); //var disabledBaby = BackstoryDatabase.allBackstories["CustomBackstory_NA_Childhood_Disabled"]; // should be this, but bnc/cnp is broken and cant undisable work var BabyStory = BackstoryDatabase.allBackstories["CustomBackstory_NA_Childhood"]; if (BabyStory != null) { baby.story.childhood = BabyStory; } else { ModLog.Error("Couldn't find the required Backstory: CustomBackstory_NA_Childhood!"); } //BnC compatibility if (xxx.BnC_RJW_PostPregnancy != null) { baby.health.AddHediff(xxx.BabyState, null, null); baby.health.AddHediff(xxx.NoManipulationFlag, null, null); } } } //This method is doing the work of the constructor since hediffs are created through HediffMaker instead of normal oop way //This can't be in PostMake() because there wouldn't be father. public virtual void Initialize(Pawn mother, Pawn dad) { BodyPartRecord torso = mother.RaceProps.body.AllParts.Find(x => x.def.defName == "Torso"); mother.health.AddHediff(this, torso); //ModLog.Message("" + this.GetType().ToString() + " pregnancy hediff generated: " + this.Label); //ModLog.Message("" + this.GetType().ToString() + " mother: " + mother + " father: " + dad); father = dad; if (father != null) { babies = new List<Pawn>(); contractions = 0; //ModLog.Message("" + this.GetType().ToString() + " generating babies before: " + this.babies.Count); GenerateBabies(); } float p_end_tick_mods = 1; if (babies[0].RaceProps?.gestationPeriodDays < 1) { if (xxx.is_human(babies[0])) p_end_tick_mods = 45 * GenDate.TicksPerDay; //default human else p_end_tick_mods = GenDate.TicksPerDay; } else { p_end_tick_mods = babies[0].RaceProps.gestationPeriodDays * GenDate.TicksPerDay; } if (pawn.Has(Quirk.Breeder) || pawn.health.hediffSet.HasHediff(HediffDef.Named("FertilityEnhancer"))) p_end_tick_mods /= 1.25f; p_end_tick_mods *= RJWPregnancySettings.normal_pregnancy_duration; p_start_tick = Find.TickManager.TicksGame; p_end_tick = p_start_tick + p_end_tick_mods; lastTick = p_start_tick; if (xxx.ImmortalsIsActive && (mother.health.hediffSet.HasHediff(xxx.IH_Immortal) || father.health.hediffSet.HasHediff(xxx.IH_Immortal))) { ImmortalMiscarry = true; ShouldMiscarry = true; } //ModLog.Message("" + this.GetType().ToString() + " generating babies after: " + this.babies.Count); } private static Dictionary<Type, string> _hediffOfClass = null; protected static Dictionary<Type, string> hediffOfClass { get { if (_hediffOfClass == null) { _hediffOfClass = new Dictionary<Type, string>(); var allRJWPregnancies = AppDomain.CurrentDomain.GetAssemblies() .SelectMany( a => a .GetTypes() .Where(t => t.IsSubclassOf(typeof(Hediff_BasePregnancy))) ); foreach (var pregClass in allRJWPregnancies) { var attribute = (RJWAssociatedHediffAttribute)pregClass.GetCustomAttributes(typeof(RJWAssociatedHediffAttribute), false).FirstOrDefault(); if (attribute != null) { _hediffOfClass[pregClass] = attribute.defName; } } } return _hediffOfClass; } } /// <summary> /// Creates pregnancy hediff and assigns it to mother /// </summary> /// <typeparam name="T">type of pregnancy, should be subclass of Hediff_BasePregnancy</typeparam> /// <param name="mother"></param> /// <param name="father"></param> /// <returns>created hediff</returns> public static T Create<T>(Pawn mother, Pawn father) where T : Hediff_BasePregnancy { if (mother == null) return null; //if (mother.RaceHasOviPregnancy() && !(T is Hediff_MechanoidPregnancy)) //{ // //return null; //} //else //{ //} BodyPartRecord torso = mother.RaceProps.body.AllParts.Find(x => x.def.defName == "Torso"); string defName = hediffOfClass.ContainsKey(typeof(T)) ? hediffOfClass[typeof(T)] : "RJW_pregnancy"; if (RJWSettings.DevMode) ModLog.Message($"Hediff_BasePregnancy::create hediff:{defName} class:{typeof(T).FullName}"); T hediff = HediffHelper.MakeHediff<T>(HediffDef.Named(defName), mother, torso); hediff.Initialize(mother, father); return hediff; } /// <summary> /// list of all known RJW pregnancy hediff names (new can be regicreted by mods) /// </summary> /// <returns></returns> public static IEnumerable<string> KnownPregnancies() { return hediffOfClass.Values.Distinct(); // todo: performance } public override string DebugString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.DebugString()); stringBuilder.AppendLine("Gestation progress: " + GestationProgress.ToStringPercent()); //stringBuilder.AppendLine("Time left: " + ((int)((1f - GestationProgress) * babies[babies.Count-1].RaceProps.gestationPeriodDays * TicksPerDay * RJWPregnancySettings.normal_pregnancy_duration)).ToStringTicksToPeriod()); return stringBuilder.ToString(); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_BasePregnancy.cs
C#
mit
43,024
using System.Collections.Generic; using System.Linq; using RimWorld; using Verse; namespace rjw { ///<summary> ///This hediff class simulates pregnancy with animal children, mother may be human. It is not intended to be reasonable. ///Differences from humanlike pregnancy are that animals are given some training and that less punishing relations are used for parent-child. ///</summary> [RJWAssociatedHediff("RJW_pregnancy_beast")] public class Hediff_BestialPregnancy : Hediff_BasePregnancy { private static readonly PawnRelationDef relation_birthgiver = PawnRelationDefOf.Parent; //static int max_train_level = TrainableUtility.TrainableDefsInListOrder.Sum(tr => tr.steps); public override void PregnancyMessage() { string message_title = "RJW_PregnantTitle".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); string message_text1 = "RJW_PregnantText".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); string message_text2 = "RJW_PregnantStrange".Translate(); Find.LetterStack.ReceiveLetter(message_title, message_text1 + "\n" + message_text2, LetterDefOf.NeutralEvent, pawn); } //Makes half-human babies start off better. They start obedient, and if mother is a human, they get hediff to boost their training protected void train(Pawn baby, Pawn mother, Pawn father) { bool _; if (!xxx.is_human(baby) && baby.Faction == Faction.OfPlayer) { if (xxx.is_human(mother) && baby.Faction == Faction.OfPlayer && baby.training.CanAssignToTrain(TrainableDefOf.Obedience, out _).Accepted) { baby.training.Train(TrainableDefOf.Obedience, mother); } if (xxx.is_human(mother) && baby.Faction == Faction.OfPlayer && baby.training.CanAssignToTrain(TrainableDefOf.Tameness, out _).Accepted) { baby.training.Train(TrainableDefOf.Tameness, mother); } } //baby.RaceProps.TrainableIntelligence.LabelCap. //if (xxx.is_human(mother)) //{ // Let the animals be born as colony property // if (mother.IsPrisonerOfColony || mother.IsColonist) // { // baby.SetFaction(Faction.OfPlayer); // } // let it be trained half to the max // var baby_int = baby.RaceProps.TrainableIntelligence; // int max_int = TrainableUtility.TrainableDefsInListOrder.FindLastIndex(tr => (tr.requiredTrainableIntelligence == baby_int)); // if (max_int == -1) // return; // Log.Message("RJW training " + baby + " max_int is " + max_int); // var available_tricks = TrainableUtility.TrainableDefsInListOrder.GetRange(0, max_int + 1); // int max_steps = available_tricks.Sum(tr => tr.steps); // Log.Message("RJW training " + baby + " vill do " + max_steps/2 + " steps"); // int t_score = Rand.Range(Mathf.RoundToInt(max_steps / 4), Mathf.RoundToInt(max_steps / 2)); // for (int i = 1; i <= t_score; i++) // { // var tr = available_tricks.Where(t => !baby.training.IsCompleted(t)). RandomElement(); // Log.Message("RJW training " + baby + " for " + tr); // baby.training.Train(tr, mother); // } // baby.health.AddHediff(HediffDef.Named("RJW_smartPup")); //} } //Handles the spawning of pawns and adding relations public override void GiveBirth() { Pawn mother = pawn; if (mother == null) return; if (babies.NullOrEmpty()) { ModLog.Warning(" no babies (debug?) " + this.GetType().Name); if (father == null) { father = Trytogetfather(ref pawn); } Initialize(mother, father); } List<Pawn> siblings = new List<Pawn>(); foreach (Pawn baby in babies) { //backup melanin, LastName for when baby reset by other mod on spawn/backstorychange //var skin_whiteness = baby.story.melanin; //var last_name = baby.story.birthLastName; PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother); Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>(); if (mother.Faction != null && !(mother.Faction?.IsPlayer ?? false) && sex_need != null) { sex_need.CurLevel = 1.0f; } if (!RJWSettings.Disable_bestiality_pregnancy_relations) { baby.relations.AddDirectRelation(relation_birthgiver, mother); if (father != null && mother != father) { baby.relations.AddDirectRelation(relation_birthgiver, father); } } train(baby, mother, father); PostBirth(mother, father, baby); //restore melanin, LastName for when baby reset by other mod on spawn/backstorychange //baby.story.melanin = skin_whiteness; //baby.story.birthLastName = last_name; } mother.health.RemoveHediff(this); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_BestialPregnancy.cs
C#
mit
4,541
using System; using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using Verse; using UnityEngine; namespace rjw { [RJWAssociatedHediff("RJW_pregnancy")] public class Hediff_HumanlikePregnancy : Hediff_BasePregnancy ///<summary> ///This hediff class simulates pregnancy resulting in humanlike childs. ///</summary> { //Handles the spawning of pawns and adding relations public override void GiveBirth() { Pawn mother = pawn; if (mother == null) return; if (babies.NullOrEmpty()) { ModLog.Warning(" no babies (debug?) " + this.GetType().Name); if (father == null) { father = Trytogetfather(ref pawn); } Initialize(mother, father); } List<Pawn> siblings = new List<Pawn>(); foreach (Pawn baby in babies) { //backup melanin, LastName for when baby reset by other mod on spawn/backstorychange //var skin_whiteness = baby.story.melanin; //var last_name = baby.story.birthLastName; //ModLog.Message("" + this.GetType().ToString() + " pre TrySpawnHatchedOrBornPawn: " + baby.story.birthLastName); PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother); //ModLog.Message("" + this.GetType().ToString() + " post TrySpawnHatchedOrBornPawn: " + baby.story.birthLastName); var sex_need = mother.needs?.TryGetNeed<Need_Sex>(); if (mother.Faction != null && !(mother.Faction?.IsPlayer ?? false) && sex_need != null) { sex_need.CurLevel = 1.0f; } if (mother.IsSlaveOfColony) { //Log.Message("mother.SlaveFaction " + mother.SlaveFaction); //Log.Message("mother.HomeFaction " + mother.HomeFaction); //Log.Message("mother.Faction " + mother.Faction); if (mother.SlaveFaction != null) baby.SetFaction(mother.SlaveFaction); else if (mother.HomeFaction != null) baby.SetFaction(mother.HomeFaction); else if (mother.Faction != null) baby.SetFaction(mother.Faction); else baby.SetFaction(Faction.OfPlayer); baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Slave); } else if (mother.IsPrisonerOfColony) { //Log.Message("mother.HomeFaction " + mother.HomeFaction); if (mother.HomeFaction != null) baby.SetFaction(mother.HomeFaction); baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Prisoner); } baby.relations.AddDirectRelation(PawnRelationDefOf.Parent, mother); if (father != null && mother != father) { baby.relations.AddDirectRelation(PawnRelationDefOf.Parent, father); } //ModLog.Message("" + this.GetType().ToString() + " pre PostBirth: " + baby.story.birthLastName); PostBirth(mother, father, baby); //ModLog.Message("" + this.GetType().ToString() + " post PostBirth: " + baby.story.birthLastName); //restore melanin, LastName for when baby reset by other mod on spawn/backstorychange //baby.story.melanin = skin_whiteness; //baby.story.birthLastName = last_name; } mother.health.RemoveHediff(this); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_HumanlikePregnancy.cs
C#
mit
3,019
using System; using System.Linq; using System.Collections.Generic; using RimWorld; using RimWorld.Planet; using Verse; using System.Text; using Verse.AI.Group; using Multiplayer.API; namespace rjw { public class Hediff_InsectEgg : HediffWithComps { public float p_start_tick = 0; public float p_end_tick = 0; public float lastTick = 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.1f; protected List<Pawn> babies; float Gestation = 0f; ///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) if (implanter != null) return implanter.kindDef.race.label + " egg"; } if (eggssize <= 0.10f) return "Small egg"; if (eggssize <= 0.3f) return "Medium egg"; else if (eggssize <= 0.5f) return "Big egg"; else return "Huge egg"; //return Label; } } public override string LabelInBrackets { get { if (Prefs.DevMode) { if (fertilized) return "Fertilized"; else return "Unfertilized"; } return null; } } public float GestationProgress { get => Gestation; set => Gestation = value; } public override bool TryMergeWith(Hediff other) { return false; } public override void PostAdd(DamageInfo? dinfo) { //--ModLog.Message("Hediff_InsectEgg::PostAdd() - added parentDef:" + parentDef+""); base.PostAdd(dinfo); } public override void Tick() { var thisTick = Find.TickManager.TicksGame; GestationProgress = (1 + thisTick - p_start_tick) / (p_end_tick - p_start_tick); if ((thisTick - lastTick) >= 1000) { lastTick = thisTick; //birthing takes an hour if (GestationProgress >= 1 && contractions == 0 && !(pawn.jobs.curDriver is JobDriver_Sex)) { if (PawnUtility.ShouldSendNotificationAbout(pawn) && (pawn.IsColonist || pawn.IsPrisonerOfColony)) { string key = "RJW_EggContractions"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()); Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent); } contractions++; if (!Genital_Helper.has_ovipositorF(pawn)) pawn.health.AddHediff(xxx.submitting); } else if (GestationProgress >= 1 && contractions != 0 && (pawn.CarriedBy == null || pawn.CarriedByCaravan())) { if (PawnUtility.ShouldSendNotificationAbout(pawn) && (pawn.IsColonist || pawn.IsPrisonerOfColony)) { 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)); } } } public override void ExposeData() { base.ExposeData(); Scribe_References.Look(ref father, "father", true); Scribe_References.Look(ref implanter, "implanter", true); Scribe_Values.Look(ref Gestation, "Gestation"); Scribe_Values.Look(ref p_start_tick, "p_start_tick", 0); Scribe_Values.Look(ref p_end_tick, "p_end_tick", 0); Scribe_Values.Look(ref lastTick, "lastTick", 0); Scribe_Values.Look(ref eggssize, "eggssize", 0.1f); Scribe_Values.Look(ref canbefertilized, "canbefertilized", true); 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) { //ModLog.Message("Hediff_InsectEgg::BirthBaby() - Egg of " + parentDef + " in " + mother.ToString() + " birth!"); PawnKindDef spawn_kind_def = implanter.kindDef; //egg mostlikely insect or implanter spawned factionless through debug, set to insect Faction spawn_faction = Faction.OfInsects; //ModLog.Message("Hediff_InsectEgg::BirthBaby() - insect " + (implanter.Faction == Faction.OfInsects || father.Faction == Faction.OfInsects || mother.Faction == Faction.OfInsects)); //ModLog.Message("Hediff_InsectEgg::BirthBaby() - human " + (xxx.is_human(implanter) && xxx.is_human(father))); //ModLog.Message("Hediff_InsectEgg::BirthBaby() - animal1 " + (!xxx.is_human(implanter) && !(implanter.Faction?.IsPlayer ?? false))); //ModLog.Message("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) { //ModLog.Message("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; } if (spawn_kind_def.defName.Contains("Nymph")) { //child is nymph, try to find other PawnKindDef var spawn_kind_def_list = new List<PawnKindDef>(); spawn_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => x.race == spawn_kind_def.race && !x.defName.Contains("Nymph"))); //no other PawnKindDef found try mother if (spawn_kind_def_list.NullOrEmpty()) spawn_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => x.race == mother.kindDef.race && !x.defName.Contains("Nymph"))); //no other PawnKindDef found try implanter if (spawn_kind_def_list.NullOrEmpty() && implanter != null) spawn_kind_def_list.AddRange(DefDatabase<PawnKindDef>.AllDefs.Where(x => x.race == implanter.kindDef.race && !x.defName.Contains("Nymph"))); //no other PawnKindDef found fallback to generic colonist if (spawn_kind_def_list.NullOrEmpty()) spawn_kind_def = PawnKindDefOf.Colonist; spawn_kind_def = spawn_kind_def_list.RandomElement(); } if (!spawn_kind_def.RaceProps.Humanlike) //TODO: fix inconsistencies betwin this and egg itself { //TODO: merge of old birthing and CompHatcher.Hatch()? Thing egg; ThingDef EggDef; string childrendef = ""; PawnKindDef children = null; if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(pawn) + " birth:" + this.ToString()); //make egg EggDef = DefDatabase<ThingDef>.GetNamedSilentFail(((HediffDef_InsectEgg)def).FertEggDef); //try to find predefined if (EggDef == null) //fail, use generic EggDef = (DefDatabase<ThingDef>.GetNamedSilentFail("RJW_EggInsectFertilized")); egg = ThingMaker.MakeThing(EggDef); //make child List<string> childlist = new List<string>(); if (!((HediffDef_InsectEgg)def).childrenDefs.NullOrEmpty()) { foreach (var child in ((HediffDef_InsectEgg)def).childrenDefs) { if (DefDatabase<PawnKindDef>.GetNamedSilentFail(child) != null) childlist.AddDistinct(child); } childrendef = childlist.RandomElement(); //try to find predefined } if (!childrendef.NullOrEmpty()) children = DefDatabase<PawnKindDef>.GetNamedSilentFail(childrendef); if (children == null) //use fatherDef children = spawn_kind_def; //put child into egg if (children != null) { var t = egg.TryGetComp<CompHatcher>(); t.Props.hatcherPawn = children; t.hatcheeParent = implanter; t.otherParent = father; t.hatcheeFaction = implanter.Faction; } if (mother.MapHeld?.areaManager?.Home[mother.PositionHeld] == false) egg.SetForbidden(true, false); //poop egg GenPlace.TryPlaceThing(egg, mother.PositionHeld, mother.MapHeld, ThingPlaceMode.Near); } else //humanlike baby { //ModLog.Message("Hediff_InsectEgg::BirthBaby() " + spawn_kind_def + " of " + spawn_faction + " in " + (int)(50 * implanter.GetStatValue(StatDefOf.PsychicSensitivity)) + " chance!"); PawnGenerationRequest request = new PawnGenerationRequest( kind: spawn_kind_def, faction: spawn_faction, forceGenerateNewPawn: true, newborn: true, allowDowned: true, canGeneratePawnRelations: false, colonistRelationChanceFactor: 0, allowFood: false, allowAddictions: false, relationWithExtraPawnChanceFactor: 0, //forceNoIdeo: true, forbidAnyTitle: true, forceNoBackstory: true ); baby = PawnGenerator.GeneratePawn(request); if (mother.IsSlaveOfColony) { //Log.Message("mother.SlaveFaction " + mother.SlaveFaction); //Log.Message("mother.HomeFaction " + mother.HomeFaction); //Log.Message("mother.Faction " + mother.Faction); if (mother.SlaveFaction != null) baby.SetFaction(mother.SlaveFaction); else if (mother.HomeFaction != null) baby.SetFaction(mother.HomeFaction); else if (mother.Faction != null) baby.SetFaction(mother.Faction); else baby.SetFaction(Faction.OfPlayer); baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Slave); } else if (mother.IsPrisonerOfColony) { if (mother.HomeFaction != null) baby.SetFaction(mother.HomeFaction); baby.guest.SetGuestStatus(Faction.OfPlayer, GuestStatus.Prisoner); } PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother); if (spawn_faction == Faction.OfInsects || (spawn_faction != null && (spawn_faction.def.defName.Contains("insect") || spawn_faction == implanter.Faction))) { //ModLog.Message("Hediff_InsectEgg::BirthBaby() GetLord"); //ModLog.Message("Hediff_InsectEgg::BirthBaby() " + implanter.GetLord()); //add ai to pawn? //LordManager.lords Lord lord = implanter.GetLord(); if (lord != null) { //ModLog.Message("Hediff_InsectEgg::BirthBaby() lord: " +lord); //ModLog.Message("Hediff_InsectEgg::BirthBaby() LordJob: " + lord.LordJob); //ModLog.Message("Hediff_InsectEgg::BirthBaby() CurLordToil: " + lord.CurLordToil); lord.AddPawn(baby); } else { //ModLog.Message("Hediff_InsectEgg::BirthBaby() lord null"); //LordJob_DefendAndExpandHive lordJob = new LordJob_DefendAndExpandHive(); //lord = LordMaker.MakeNewLord(baby.Faction, lordJob, mother.Map); //lord.AddPawn(baby); //lord.SetJob(lordJob); } //ModLog.Message("Hediff_InsectEgg::BirthBaby() " + baby.GetLord().DebugString()); } Hediff_BasePregnancy.BabyPostBirth(mother, father, baby); Sexualizer.sexualize_pawn(baby); // Move the baby in front of the mother, rather than on top if (mother.Spawned) 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) { mother.Add(Quirk.Incubator); mother.Add(Quirk.ImpregnationFetish); } } else { if (PawnUtility.ShouldSendNotificationAbout(pawn) && (pawn.IsColonist || pawn.IsPrisonerOfColony)) { string key = "EggDead"; string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()).CapitalizeFirst(); Messages.Message(text, pawn, MessageTypeDefOf.SituationResolved); } Thing egg; var UEgg = DefDatabase<ThingDef>.GetNamedSilentFail(((HediffDef_InsectEgg)def).UnFertEggDef); if (UEgg == null) UEgg = (DefDatabase<ThingDef>.GetNamedSilentFail("RJW_EggInsectUnfertilized")); egg = ThingMaker.MakeThing(UEgg); //Log.Message("1"); if (mother.MapHeld?.areaManager?.Home[mother.PositionHeld] == false) egg.SetForbidden(true, false); //Log.Message("2"); GenPlace.TryPlaceThing(egg, mother.PositionHeld, mother.MapHeld, ThingPlaceMode.Near); //Log.Message("3"); } // 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.TryMakeFilth(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); int i = 0; if (xxx.is_insect(baby) || xxx.is_insect(mother) || xxx.is_insect(implanter) || xxx.is_insect(father)) { while (i++ < howmuch) { Thing jelly = ThingMaker.MakeThing(ThingDefOf.InsectJelly); if (mother.MapHeld?.areaManager?.Home[mother.PositionHeld] == false ) jelly.SetForbidden(true, false); GenPlace.TryPlaceThing(jelly, mother.PositionHeld, mother.MapHeld, ThingPlaceMode.Near); } } } mother.health.RemoveHediff(this); } //set father/final egg type public void Fertilize(Pawn Pawn) { if (implanter == null) // immortal ressurrected? { return; } if (xxx.ImmortalsIsActive && (Pawn.health.hediffSet.HasHediff(xxx.IH_Immortal) || pawn.health.hediffSet.HasHediff(xxx.IH_Immortal))) { return; } if (!AndroidsCompatibility.IsAndroid(pawn)) if (!fertilized && canbefertilized && GestationProgress < 0.5) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(pawn) + " fertilize eggs:" + this.ToString()); father = Pawn; ChangeEgg(implanter); } } //set implanter/base egg type public void Implanter(Pawn Pawn) { if (implanter == null) { if (RJWSettings.DevMode) ModLog.Message("Hediff_InsectEgg:: set implanter:" + xxx.get_pawnname(Pawn)); implanter = Pawn; ChangeEgg(implanter); if (!implanter.health.hediffSet.HasHediff(xxx.sterilized)) { if (((HediffDef_InsectEgg)def).selffertilized) Fertilize(implanter); } else canbefertilized = false; } } //Change egg type after implanting/fertilizing public void ChangeEgg(Pawn Pawn) { if (Pawn != null) { float p_end_tick_mods = 1; if (Pawn.RaceProps?.gestationPeriodDays < 1) { p_end_tick_mods = GenDate.TicksPerDay; } else { p_end_tick_mods = Pawn.RaceProps.gestationPeriodDays * GenDate.TicksPerDay; } if ((xxx.has_quirk(pawn, "Incubator") || pawn.health.hediffSet.HasHediff(HediffDef.Named("FertilityEnhancer")))) p_end_tick_mods /= 2f; p_end_tick_mods *= RJWPregnancySettings.egg_pregnancy_duration; p_start_tick = Find.TickManager.TicksGame; p_end_tick = p_start_tick + p_end_tick_mods; lastTick = p_start_tick; eggssize = Pawn.RaceProps.baseBodySize / 5; if (!Genital_Helper.has_ovipositorF(pawn)) // non ovi egg full size Severity = eggssize; else if (eggssize > 0.1f) // cap egg size in ovi to 10% Severity = 0.1f; else 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: " + GestationProgress.ToStringPercent()); if (RJWSettings.DevMode) stringBuilder.AppendLine(" Implanter: " + xxx.get_pawnname(implanter)); if (RJWSettings.DevMode) stringBuilder.AppendLine(" Father: " + xxx.get_pawnname(father)); //stringBuilder.AppendLine(" potential father: " + parentDef); return stringBuilder.ToString(); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs
C#
mit
18,825
using RimWorld; using System.Linq; using Verse; using Verse.AI; namespace rjw { public 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); } } public 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>(); //--ModLog.Message("" + 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); } } public 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); Sexualizer.sexualize_pawn(implanter); Sexualizer.sexualize_pawn(fertilizer); //Pawn cumSender = (from p in Find.WorldPawns.AllPawnsAlive where p.gender == Gender.Male select p).RandomElement<Pawn>(); //--ModLog.Message("" + 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); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_MCEvents.cs
C#
mit
2,770
using System.Collections.Generic; using Verse; namespace rjw { internal class Hediff_MechImplants : HediffWithComps { public override bool TryMergeWith(Hediff other) { return false; } } }
jojo1541/rjw
1.3/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> [RJWAssociatedHediff("RJW_pregnancy_mech")] public class Hediff_MechanoidPregnancy : Hediff_BasePregnancy { public override bool canBeAborted { get { return false; } } public override bool canMiscarry { get { return false; } } public override void PregnancyMessage() { string message_title = "RJW_PregnantTitle".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); string message_text1 = "RJW_PregnantText".Translate(pawn.LabelIndefinite()).CapitalizeFirst(); 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; if (!babies.NullOrEmpty()) { foreach (Pawn baby in babies) { baby.Destroy(); baby.Discard(true); } babies.Clear(); } Faction spawn_faction = null; if (!is_hacked) spawn_faction = Faction.OfMechanoids; PawnKindDef children = null; if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(pawn) + " birth:" + this.ToString()); foreach (HediffDef_MechImplants implant in DefDatabase<HediffDef_MechImplants>.AllDefs.Where(x => x.parentDefs.Contains(father.kindDef.ToString()))) //try to find predefined { string childrendef; //try to find predefined List<string> childlist = new List<string>(); if (!implant.childrenDefs.NullOrEmpty()) { foreach (var child in (implant.childrenDefs)) { if (DefDatabase<PawnKindDef>.GetNamedSilentFail(child) != null) childlist.AddDistinct(child); } childrendef = childlist.RandomElement(); //try to find predefined children = DefDatabase<PawnKindDef>.GetNamedSilentFail(childrendef); if (children != null) continue; } } if (children == null) //fallback, use fatherDef children = father.kindDef; PawnGenerationRequest request = new PawnGenerationRequest( kind: children, faction: spawn_faction, forceGenerateNewPawn: true, newborn: true ); Pawn mech = PawnGenerator.GeneratePawn(request); PawnUtility.TrySpawnHatchedOrBornPawn(mech, mother); if (!is_hacked) { LordJob_MechanoidsDefend lordJob = new LordJob_MechanoidsDefend(); Lord lord = LordMaker.MakeNewLord(mech.Faction, lordJob, mech.Map); lord.AddPawn(mech); } FilthMaker.TryMakeFilth(mech.PositionHeld, mech.MapHeld, mother.RaceProps.BloodDef, mother.LabelIndefinite()); IEnumerable<BodyPartRecord> source = from x in mother.health.hediffSet.GetNotMissingParts() where x.IsInGroup(BodyPartGroupDefOf.Torso) && !x.IsCorePart //&& x.groups.Contains(BodyPartGroupDefOf.Torso) //&& x.depth == BodyPartDepth.Inside //&& x.height == BodyPartHeight.Bottom //someday include depth filter //so it doesn't 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) { mother.health.DropBloodFilth(); } if (RJWPregnancySettings.safer_mechanoid_pregnancy && is_checked) { foreach (BodyPartRecord part in source) { DamageDef surgicalCut = DamageDefOf.SurgicalCut; float amount = 5f; float armorPenetration = 999f; mother.TakeDamage(new DamageInfo(surgicalCut, amount, armorPenetration, -1f, null, part, null, DamageInfo.SourceCategory.ThingOrUnknown, null)); } } else { 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); } } } mother.health.RemoveHediff(this); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_MechanoidPregnancy.cs
C#
mit
4,876
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( kind: father.kindDef, faction: father.Faction, forceGenerateNewPawn: true, newborn: true, allowDowned: true, canGeneratePawnRelations: false, mustBeCapableOfViolence: true, colonistRelationChanceFactor: 0, allowFood: false, allowAddictions: false, relationWithExtraPawnChanceFactor: 0 ); 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.TryMakeFilth(mother.Position, mother.Map, ThingDefOf.Filth_AmnioticFluid, mother.LabelIndefinite(), 5); if (mother.caller != null) { mother.caller.DoCall(); } if (pawn.caller != null) { pawn.caller.DoCall(); } } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_ParasitePregnancy.cs
C#
mit
1,888
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; private int stage_completed = 0; public float lastTick = 0; public float dayTick = 0; //Properties public int Grown_To { get { return grown_to; } } public override string DebugString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.DebugString()); stringBuilder.Append("Current CurLifeStageIndex: " + pawn.ageTracker.CurLifeStageIndex + ", grown_to: " + grown_to); return stringBuilder.ToString(); } public override void PostMake() { Severity = Math.Max(0.01f, Severity); if (grown_to == 0 && !pawn.health.hediffSet.HasHediff(HediffDef.Named("RJW_NoManipulationFlag"))) { pawn.health.AddHediff(HediffDef.Named("RJW_NoManipulationFlag"), null, null); } base.PostMake(); if (!pawn.RaceProps.lifeStageAges.Any(x => x.def.reproductive)) { if (pawn.health.hediffSet.HasHediff(xxx.RJW_NoManipulationFlag)) { pawn.health.hediffSet.hediffs.Remove(pawn.health.hediffSet.GetFirstHediffOfDef(xxx.RJW_NoManipulationFlag)); } pawn.health.RemoveHediff(this); } } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref grown_to, "grown_to", 0); Scribe_Values.Look(ref lastTick, "lastTick", 0); Scribe_Values.Look(ref dayTick, "dayTick", 0); } internal void GrowUpTo(int stage) { GrowUpTo(stage, true); } [SyncMethod] internal void GrowUpTo(int stage, bool generated) { //Rand.PopState(); //Rand.PushState(RJW_Multiplayer.PredictableSeed()); if (grown_to < stage) 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 || pawn.ageTracker.CurLifeStage.reproductive) && stage_completed < 1) { Severity = Math.Max(0.5f, Severity); stage_completed++; } // Re-enable skills that were locked out from toddlers if ((stage >= 2 || pawn.ageTracker.CurLifeStage.reproductive) && stage_completed < 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(xxx.RJW_NoManipulationFlag)) { pawn.health.hediffSet.hediffs.Remove(pawn.health.hediffSet.GetFirstHediffOfDef(xxx.RJW_NoManipulationFlag)); } Severity = Math.Max(0.75f, Severity); stage_completed++; } // The child has grown to a teenager so we no longer need this effect if ((stage >= 3 || pawn.ageTracker.CurLifeStage.reproductive) && stage_completed < 3) { if (!generated && pawn.story.childhood != null && 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--; } } } stage_completed++; pawn.health.RemoveHediff(this); } } //everyday grow 1 year until reproductive public void GrowFast() { if (RJWPregnancySettings.phantasy_pregnancy) { if (!pawn.ageTracker.CurLifeStage.reproductive) { pawn.ageTracker.AgeBiologicalTicks = (pawn.ageTracker.AgeBiologicalYears + 1) * GenDate.TicksPerYear + 1; pawn.ageTracker.DebugForceBirthdayBiological(); GrowUpTo(pawn.ageTracker.CurLifeStageIndex, false); } } } public void TickRare() { //--ModLog.Message("Hediff_SimpleBaby::TickRare is called"); if (pawn.ageTracker.CurLifeStageIndex > Grown_To) { GrowUpTo(pawn.ageTracker.CurLifeStageIndex, 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 Tick() { /* 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 //--ModLog.Message("Hediff_SimpleBaby::PostTick is called"); base.Tick(); if (pawn.Spawned) { var thisTick = Find.TickManager.TicksGame; if ((thisTick - dayTick) >= GenDate.TicksPerDay) { GrowFast(); dayTick = thisTick; } if ((thisTick - lastTick) >= 250) { TickRare(); lastTick = thisTick; } } } public override bool Visible { get { return false; } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/Hediff_SimpleBaby.cs
C#
mit
10,360
using System; namespace rjw { public class RJWAssociatedHediffAttribute : Attribute { public string defName { get; private set; } public RJWAssociatedHediffAttribute(string defName) { this.defName = defName; } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Hediffs/RJWAssociatedHediffAttribute.cs
C#
mit
232
using RimWorld; using Verse; using System; using System.Linq; using System.Collections.Generic; using Multiplayer.API; using rjw.Modules.Interactions.Enums; using rjw.Modules.Interactions.Extensions; ///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 //pawn - "father"; partner = mother //TODO: this needs rewrite to account reciever group sex (props?) public static void impregnate(SexProps props) { if (RJWSettings.DevMode) ModLog.Message("Rimjobworld::impregnate(" + props.sexType + "):: " + xxx.get_pawnname(props.pawn) + " + " + xxx.get_pawnname(props.partner) + ":"); //"mech" pregnancy if (props.sexType == xxx.rjwSextype.MechImplant) { if (RJWPregnancySettings.mechanoid_pregnancy_enabled && xxx.is_mechanoid(props.pawn)) { // removing old pregnancies var p = GetPregnancies(props.partner); if (!p.NullOrEmpty()) { var i = p.Count; while (i > 0) { i -= 1; var h = GetPregnancies(props.partner); if (h[i] is Hediff_MechanoidPregnancy) { if (RJWSettings.DevMode) ModLog.Message(" already pregnant by mechanoid"); } else if (h[i] is Hediff_BasePregnancy) { if (RJWSettings.DevMode) ModLog.Message(" removing rjw normal pregnancy"); (h[i] as Hediff_BasePregnancy).Kill(); } else { if (RJWSettings.DevMode) ModLog.Message(" removing vanilla or other mod pregnancy"); props.partner.health.RemoveHediff(h[i]); } } } // new pregnancy if (RJWSettings.DevMode) ModLog.Message(" mechanoid pregnancy started"); Hediff_MechanoidPregnancy hediff = Hediff_BasePregnancy.Create<Hediff_MechanoidPregnancy>(props.partner, props.pawn); 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; } //"ovi" pregnancy/egglaying var AnalOk = props.sexType == xxx.rjwSextype.Anal && RJWPregnancySettings.insect_anal_pregnancy_enabled; var OralOk = props.sexType == xxx.rjwSextype.Oral && RJWPregnancySettings.insect_oral_pregnancy_enabled; // Sextype can result in pregnancy. if (!(props.sexType == xxx.rjwSextype.Vaginal || props.sexType == xxx.rjwSextype.DoublePenetration || AnalOk || OralOk)) return; Pawn giver = props.pawn; // orgasmer Pawn reciever = props.partner; List<Hediff> pawnparts = giver.GetGenitalsList(); List<Hediff> partnerparts = reciever.GetGenitalsList(); var interaction = Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey); //ModLog.Message(" RaceImplantEggs()" + pawn.RaceImplantEggs()); //"insect" pregnancy //straight, female (partner) recives egg insertion from other/sex starter (pawn) if (CouldBeEgging(props, giver, reciever, pawnparts, partnerparts)) { //TODO: add widget toggle for bind all/neutral/hostile pawns if (!props.isReceiver) if (CanCocoon(giver)) if (giver.HostileTo(reciever) || reciever.IsPrisonerOfColony || reciever.health.hediffSet.HasHediff(xxx.submitting)) if (!reciever.health.hediffSet.HasHediff(HediffDef.Named("RJW_Cocoon"))) { reciever.health.AddHediff(HediffDef.Named("RJW_Cocoon")); } DoEgg(props); return; } if (!(props.sexType == xxx.rjwSextype.Vaginal || props.sexType == xxx.rjwSextype.DoublePenetration)) return; //"normal" and "beastial" pregnancy if (RJWSettings.DevMode) ModLog.Message(" 'normal' pregnancy checks"); //interaction stuff if for handling futa/see who penetrates who in interaction if (!props.isReceiver && interaction.DominantHasTag(GenitalTag.CanPenetrate) && interaction.SubmissiveHasFamily(GenitalFamily.Vagina)) { if (RJWSettings.DevMode) ModLog.Message(" impregnate - by initiator"); } else if (props.isReceiver && interaction.DominantHasFamily(GenitalFamily.Vagina) && interaction.SubmissiveHasTag(GenitalTag.CanPenetrate) && interaction.HasInteractionTag(InteractionTag.Reverse)) { if (RJWSettings.DevMode) ModLog.Message(" impregnate - by receiver (reverse)"); } else { if (RJWSettings.DevMode) ModLog.Message(" no valid interaction tags/family"); return; } if (!Modules.Interactions.Helpers.PartHelper.FindParts(giver, GenitalTag.CanFertilize).Any()) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(giver) + " has no parts to Fertilize with"); return; } if (!Modules.Interactions.Helpers.PartHelper.FindParts(reciever, GenitalTag.CanBeFertilized).Any()) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(reciever) + " has no parts to be Fertilized"); return; } if (CanImpregnate(giver, reciever, props.sexType)) { Doimpregnate(giver, reciever); } } private static bool CouldBeEgging(SexProps props, Pawn giver, Pawn reciever, List<Hediff> pawnparts, List<Hediff> partnerparts) { //no ovipositor or fertilization possible if ((Genital_Helper.has_ovipositorF(giver, pawnparts) || Genital_Helper.has_ovipositorM(giver, pawnparts) || (Genital_Helper.has_penis_fertile(giver, pawnparts) && (giver.RaceImplantEggs() || reciever.health.hediffSet.GetHediffs<Hediff_InsectEgg>().Any())) ) == false) { return false; } if ((props.sexType == xxx.rjwSextype.Vaginal || props.sexType == xxx.rjwSextype.DoublePenetration) && Genital_Helper.has_vagina(reciever, partnerparts)) { return true; } if ((props.sexType == xxx.rjwSextype.Anal || props.sexType == xxx.rjwSextype.DoublePenetration) && Genital_Helper.has_anus(reciever) && RJWPregnancySettings.insect_anal_pregnancy_enabled) { return true; } if (props.sexType == xxx.rjwSextype.Oral && RJWPregnancySettings.insect_oral_pregnancy_enabled) { return true; } return false; } private static bool CanCocoon(Pawn pawn) { return xxx.is_insect(pawn); } public static Hediff GetPregnancy(Pawn pawn) { var set = pawn.health.hediffSet; Hediff preg = Hediff_BasePregnancy.KnownPregnancies() .Select(x => set.GetFirstHediffOfDef(HediffDef.Named(x))) .FirstOrDefault(x => x != null) ?? set.GetFirstHediffOfDef(HediffDefOf.Pregnant); return preg; } public static List<Hediff> GetPregnancies(Pawn pawn) { List<Hediff> preg = new List<Hediff>(); preg.AddRange(pawn.health.hediffSet.hediffs.Where(x => x is Hediff_BasePregnancy || x is Hediff_Pregnant)); return preg; } ///<summary>Can get preg with above conditions, do impregnation.</summary> [SyncMethod] public static void DoEgg(SexProps props) { if (RJWPregnancySettings.insect_pregnancy_enabled) { if (RJWSettings.DevMode) ModLog.Message(" insect pregnancy"); //female "insect" plant eggs //futa "insect" 50% plant eggs if ((Genital_Helper.has_ovipositorF(props.pawn) && !Genital_Helper.has_penis_fertile(props.pawn)) || (Rand.Value > 0.5f && Genital_Helper.has_ovipositorF(props.pawn))) //penis eggs someday? //(Rand.Value > 0.5f && (Genital_Helper.has_ovipositorF(pawn) || Genital_Helper.has_penis_fertile(pawn) && pawn.RaceImplantEggs()))) { float maxeggssize = (props.partner.BodySize / 5) * (xxx.has_quirk(props.partner, "Incubator") ? 2f : 1f) * (Genital_Helper.has_ovipositorF(props.partner) ? 2f : 1f); float eggedsize = 0; foreach (Hediff_InsectEgg egg in props.partner.health.hediffSet.GetHediffs<Hediff_InsectEgg>()) { if (egg.father != null) eggedsize += egg.father.RaceProps.baseBodySize / 5 * (egg.def as HediffDef_InsectEgg).eggsize * RJWPregnancySettings.egg_pregnancy_eggs_size; else eggedsize += egg.implanter.RaceProps.baseBodySize / 5 * (egg.def as HediffDef_InsectEgg).eggsize * RJWPregnancySettings.egg_pregnancy_eggs_size; } if (RJWSettings.DevMode) ModLog.Message(" determine " + xxx.get_pawnname(props.partner) + " size of eggs inside: " + eggedsize + ", max: " + maxeggssize); var eggs = props.pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().ToList(); BodyPartRecord partnerGenitals = null; if (props.sexType == xxx.rjwSextype.Anal) partnerGenitals = Genital_Helper.get_anusBPR(props.partner); else if (props.sexType == xxx.rjwSextype.Oral) partnerGenitals = Genital_Helper.get_stomachBPR(props.partner); else if (props.sexType == xxx.rjwSextype.DoublePenetration && Rand.Value > 0.5f && RJWPregnancySettings.insect_anal_pregnancy_enabled) partnerGenitals = Genital_Helper.get_anusBPR(props.partner); else partnerGenitals = Genital_Helper.get_genitalsBPR(props.partner); while (eggs.Any() && eggedsize < maxeggssize) { if (props.sexType == xxx.rjwSextype.Vaginal) { // removing old pregnancies var p = GetPregnancies(props.partner); if (!p.NullOrEmpty()) { var i = p.Count; while (i > 0) { i -= 1; var h = GetPregnancies(props.partner); if (h[i] is Hediff_MechanoidPregnancy) { if (RJWSettings.DevMode) ModLog.Message(" egging - pregnant by mechanoid, skip"); } else if (h[i] is Hediff_BasePregnancy) { if (RJWSettings.DevMode) ModLog.Message(" egging - removing rjw normal pregnancy"); (h[i] as Hediff_BasePregnancy).Kill(); } else { if (RJWSettings.DevMode) ModLog.Message(" egging - removing vanilla or other mod pregnancy"); props.partner.health.RemoveHediff(h[i]); } } } } var egg = eggs.First(); eggs.Remove(egg); props.pawn.health.RemoveHediff(egg); props.partner.health.AddHediff(egg, partnerGenitals); egg.Implanter(props.pawn); eggedsize += egg.eggssize * (egg.def as HediffDef_InsectEgg).eggsize * RJWPregnancySettings.egg_pregnancy_eggs_size; } } //male or futa fertilize eggs else if (!props.pawn.health.hediffSet.HasHediff(xxx.sterilized)) { if (Genital_Helper.has_penis_fertile(props.pawn)) if ((Genital_Helper.has_ovipositorF(props.pawn) || Genital_Helper.has_ovipositorM(props.pawn)) || (props.pawn.health.capacities.GetLevel(xxx.reproduction) > 0)) { foreach (var egg in props.partner.health.hediffSet.GetHediffs<Hediff_InsectEgg>()) egg.Fertilize(props.pawn); } } return; } } [SyncMethod] public static void Doimpregnate(Pawn pawn, Pawn partner) { if (RJWSettings.DevMode) ModLog.Message(" 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) ModLog.Message(" Father is android with no arcotech penis, abort"); return; } if (AndroidsCompatibility.IsAndroid(partner) && !AndroidsCompatibility.AndroidVaginaFertility(partner)) { if (RJWSettings.DevMode) ModLog.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; // IUD fertility check if (partner.health.hediffSet.GetFirstHediffOfDef(DefDatabase<HediffDef>.GetNamed("RJW_IUD")) != null) fertility /= 99f; // Interspecies modifier if (pawn.def.defName != partner.def.defName) { if (RJWPregnancySettings.complex_interspecies) fertility *= SexUtility.BodySimilarity(pawn, partner); else fertility *= RJWPregnancySettings.interspecies_impregnation_modifier; } else { //Egg fertility check CompEggLayer compEggLayer = partner.TryGetComp<CompEggLayer>(); if (compEggLayer != null) fertility = 1.0f; } //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_chance = fertility * ReproductionFactor; float pregnancy_roll_to_fail = Rand.Value; //BodyPartRecord torso = partner.RaceProps.body.AllParts.Find(x => x.def == BodyPartDefOf.Torso); if (pregnancy_roll_to_fail > pregnancy_chance || pregnancy_chance <= 0) { if (RJWSettings.DevMode) ModLog.Message(" Impregnation failed. Chance: " + pregnancy_chance.ToStringPercent() + " < " + pregnancy_roll_to_fail.ToStringPercent()); return; } if (RJWSettings.DevMode) ModLog.Message(" Impregnation succeeded. Chance: " + pregnancy_chance.ToStringPercent() + " > " + pregnancy_roll_to_fail.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) ModLog.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) ModLog.Message(" mechanoid 'pregnancy' disabled"); return false; } if (!(sexType == xxx.rjwSextype.Vaginal || sexType == xxx.rjwSextype.DoublePenetration)) { if (RJWSettings.DevMode) ModLog.Message(" sextype cannot result in pregnancy"); return false; } if (AndroidsCompatibility.IsAndroid(fucker) && AndroidsCompatibility.IsAndroid(fucked)) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(fucked) + " androids cant breed/reproduce androids"); return false; } if ((fucker.IsUnsexyRobot() || fucked.IsUnsexyRobot()) && !(sexType == xxx.rjwSextype.MechImplant)) { if (RJWSettings.DevMode) ModLog.Message(" unsexy robot cant be pregnant"); return false; } if (!fucker.RaceHasPregnancy()) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(fucked) + " filtered race that cant be pregnant"); return false; } if (!fucked.RaceHasPregnancy()) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(fucker) + " filtered race that cant impregnate"); return false; } if (fucked.IsPregnant()) { if (RJWSettings.DevMode) ModLog.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) ModLog.Message(xxx.get_pawnname(fucked) + " cant get pregnant while eggs inside"); return false; } var pawnparts = fucker.GetGenitalsList(); var partnerparts = fucked.GetGenitalsList(); if (!(Genital_Helper.has_penis_fertile(fucker, pawnparts) && Genital_Helper.has_vagina(fucked, partnerparts)) && !(Genital_Helper.has_penis_fertile(fucked, partnerparts) && Genital_Helper.has_vagina(fucker, pawnparts))) { if (RJWSettings.DevMode) ModLog.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) ModLog.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) ModLog.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) ModLog.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) ModLog.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) ModLog.Message(" interspecies pregnancy disabled."); return false; } if (!(fucked.RaceProps.gestationPeriodDays > 0)) { CompEggLayer compEggLayer = fucked.TryGetComp<CompEggLayer>(); if (compEggLayer == null) { if (RJWSettings.DevMode) ModLog.Message(xxx.get_pawnname(fucked) + " mother.RaceProps.gestationPeriodDays is " + fucked.RaceProps.gestationPeriodDays + " cant impregnate"); 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)) { CompEggLayer compEggLayer = mother.TryGetComp<CompEggLayer>(); if (compEggLayer != null) { // fertilize eggs of humanlikes ?! if (!compEggLayer.FullyFertilized) { compEggLayer.Fertilize(father); //if (!mother.kindDef.defName.Contains("Chicken")) // if (compEggLayer.Props.eggFertilizedDef.defName.Contains("RJW")) } } else Hediff_BasePregnancy.Create<Hediff_HumanlikePregnancy>(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_human(father))) { CompEggLayer compEggLayer = mother.TryGetComp<CompEggLayer>(); if (compEggLayer != null) { if (!compEggLayer.FullyFertilized) compEggLayer.Fertilize(father); } else Hediff_BasePregnancy.Create<Hediff_BestialPregnancy>(mother, father); } //animal-animal else if (xxx.is_animal(mother) && xxx.is_animal(father)) { CompEggLayer compEggLayer = mother.TryGetComp<CompEggLayer>(); if (compEggLayer != null) { // fertilize eggs of same species if (!compEggLayer.FullyFertilized) if (mother.kindDef == father.kindDef) compEggLayer.Fertilize(father); } else if (RJWPregnancySettings.animal_pregnancy_enabled) { Hediff_BasePregnancy.Create<Hediff_BestialPregnancy>(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_anusBPR(target) : Genital_Helper.get_genitalsBPR(target); if (Part != null || Part.parts.Count != 0) { //killoff normal preg if (!isToAnal) { if (RJWSettings.DevMode) ModLog.Message(" removing other pregnancies"); var p = GetPregnancies(target); if (!p.NullOrEmpty()) { foreach (var x in p) { if (x is Hediff_BasePregnancy) { var preg = x as Hediff_BasePregnancy; preg.Kill(); } else { target.health.RemoveHediff(x); } } } } for (int i = 0; i < amount; i++) { if (RJWSettings.DevMode) ModLog.Message(" planting something weird"); target.health.AddHediff(def, Part); } 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 (RJWSettings.DevMode) ModLog.Message(" cleanup_CnP after love check"); var h = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("HumanPregnancy")); if (h != null && h.ageTicks < 100) { pawn.health.RemoveHediff(h); if (RJWSettings.DevMode) ModLog.Message(" removed hediff from " + xxx.get_pawnname(pawn)); } } /// <summary> /// Remove Vanilla Pregnancy /// </summary> public static void cleanup_vanilla(Pawn pawn) { if (RJWSettings.DevMode) ModLog.Message(" cleanup_vanilla after love check"); var h = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Pregnant); if (h != null && h.ageTicks < 100) { pawn.health.RemoveHediff(h); if (RJWSettings.DevMode) ModLog.Message(" 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); } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Pregnancy_Helper.cs
C#
mit
23,179
using RimWorld; using System; using System.Linq; 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) { bool isMatch = Hediff_BasePregnancy.KnownPregnancies() // For every known pregnancy .Where(x => pawn.health.hediffSet.HasHediff(HediffDef.Named(x), true) && recipe.removesHediff == HediffDef.Named(x)) // Find matching bodyparts .Select(x => (Hediff_BasePregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named(x))) // get pregnancy hediff .Where(pregnancy => pregnancy.is_discovered && (!pregnancy.is_checked || !(pregnancy is Hediff_MechanoidPregnancy))) // Find visible pregnancies or unchecked mech .Any(); // return true if found something if (isMatch) { yield return part; } } } public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { foreach (Hediff x in pawn.health.hediffSet.hediffs.Where(x => x is Hediff_MechanoidPregnancy)) { (x as Hediff_MechanoidPregnancy).GiveBirth(); return; } base.ApplyOnPawn(pawn, part, billDoer, ingredients, bill); } } public class Recipe_PregnancyAbortMech : Recipe_Abortion { 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) { bool isMatch = Hediff_BasePregnancy.KnownPregnancies() // For every known pregnancy .Where(x => pawn.health.hediffSet.HasHediff(HediffDef.Named(x), true) && recipe.removesHediff == HediffDef.Named(x)) // Find matching bodyparts .Select(x => (Hediff_BasePregnancy)pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named(x))) // get pregnancy hediff .Where(pregnancy => pregnancy.is_checked && pregnancy is Hediff_MechanoidPregnancy) // Find checked/visible pregnancies .Any(); // return true if found something if (isMatch) { yield return part; } } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Recipes/Recipe_Abortion.cs
C#
mit
2,492
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) { ModLog.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. } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Recipes/Recipe_ClaimChild.cs
C#
mit
1,289
using RimWorld; using System; using System.Linq; 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.IsPregnant(true)) { yield return part; } } public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { var p = PregnancyHelper.GetPregnancies(pawn); if (p.NullOrEmpty()) { Messages.Message(xxx.get_pawnname(billDoer) + " has determined " + xxx.get_pawnname(pawn) + " is not pregnant.", MessageTypeDefOf.NeutralEvent); return; } foreach (var x in p) { if (x is Hediff_BasePregnancy) { var preg = x as Hediff_BasePregnancy; preg.CheckPregnancy(); } } } } public class Recipe_DeterminePaternity : 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.IsPregnant(true)) { yield return part; } } public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill) { var p = PregnancyHelper.GetPregnancies(pawn); if (p.NullOrEmpty()) { Messages.Message(xxx.get_pawnname(billDoer) + " has determined " + xxx.get_pawnname(pawn) + " is not pregnant.", MessageTypeDefOf.NeutralEvent); return; } foreach (var x in p) { if (x is Hediff_BasePregnancy) { var preg = x as Hediff_BasePregnancy; Messages.Message(xxx.get_pawnname(billDoer) + " has determined " + xxx.get_pawnname(pawn) + " is pregnant and " + preg.father + " is the father.", MessageTypeDefOf.NeutralEvent); preg.CheckPregnancy(); preg.is_parent_known = true; } } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Recipes/Recipe_DeterminePregnancy.cs
C#
mit
2,435
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); } } }
jojo1541/rjw
1.3/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 && !pregnancy.is_hacked) 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(); } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Recipes/Recipe_PregnancyHackMech.cs
C#
mit
1,273
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; } } } } }
jojo1541/rjw
1.3/Source/Modules/Pregnancy/Recipes/Recipe_Sterilize.cs
C#
mit
697
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.Modules.Quirks { public interface IQuirkService { bool HasQuirk(Pawn pawn, string quirk); } }
jojo1541/rjw
1.3/Source/Modules/Quirks/IQuirkService.cs
C#
mit
246
using rjw.Modules.Quirks; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.Modules.Quirks.Implementation { public class QuirkService : IQuirkService { public static IQuirkService Instance { get; private set; } static QuirkService() { Instance = new QuirkService(); } private QuirkService() { } public bool HasQuirk(Pawn pawn, string quirk) { //No paw ! hum ... I meant pawn ! if (pawn == null) { return false; } //No quirk ! if (string.IsNullOrWhiteSpace(quirk)) { return false; } string loweredQuirk = quirk.ToLower(); string pawnQuirks = CompRJW.Comp(pawn).quirks .ToString() .ToLower(); return pawnQuirks.Contains(loweredQuirk); } } }
jojo1541/rjw
1.3/Source/Modules/Quirks/Implementation/QuirkService.cs
C#
mit
814
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Quirks { public static class Quirks { public const string Podophile = "Podophile"; public const string Impregnation = "Impregnation fetish"; } }
jojo1541/rjw
1.3/Source/Modules/Quirks/Quirks.cs
C#
mit
294
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Shared.Comparers { public class StringComparer_IgnoreCase : IEqualityComparer<string> { public bool Equals(string x, string y) { return String.Equals(x, y, StringComparison.InvariantCultureIgnoreCase); } public int GetHashCode(string obj) { if (obj == null) { return 0; } return obj.GetHashCode(); } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Comparers/StringComparer_IgnoreCase.cs
C#
mit
482
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Shared.Enums { public enum PawnState { Healthy, Downed, Unconscious, Dead } }
jojo1541/rjw
1.3/Source/Modules/Shared/Enums/PawnState.cs
C#
mit
231
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.Modules.Shared.Extensions { public static class BodyPartRecordExtension { public static bool IsMissingForPawn(this BodyPartRecord self, Pawn pawn) { if (pawn == null) { throw new ArgumentNullException(nameof(pawn)); } if (self == null) { throw new ArgumentNullException(nameof(self)); } return pawn.health.hediffSet.hediffs .Where(hediff => hediff.Part == self) .Where(hediff => hediff is Hediff_MissingPart) .Any(); } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Extensions/BodyPartRecordExtension.cs
C#
mit
621
using System; using Verse; namespace rjw.Modules.Shared.Extensions { public static class PawnExtensions { public static string GetName(this Pawn pawn) { if (pawn == null) { return "null"; } if (String.IsNullOrWhiteSpace(pawn.Name?.ToStringFull) == false) { return pawn.Name.ToStringFull; } return pawn.def.defName; } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Extensions/PawnExtensions.cs
C#
mit
365
using System; using UnityEngine; using Verse; namespace rjw.Modules.Shared.Helpers { public static class AgeHelper { public const int ImmortalRaceAgeClamp = 25; public const int NonHumanRaceAgeClamp = 25; public static int ScaleToHumanAge(Pawn pawn, int humanLifespan = 80) { float pawnAge = pawn.ageTracker.AgeBiologicalYearsFloat; if (pawn.def.defName == "Human") return (int)pawnAge; // Human, no need to scale anything. float lifeExpectancy = pawn.RaceProps.lifeExpectancy; if (RJWSettings.UseAdvancedAgeScaling == true) { //pseudo-immortal & immortal races if (lifeExpectancy >= 500) { return CalculateForImmortals(pawn, humanLifespan); } if (lifeExpectancy != humanLifespan) { //other races return CalculateForNonHuman(pawn, humanLifespan); } } float ageScaling = humanLifespan / lifeExpectancy; float scaledAge = pawnAge * ageScaling; return (int)Mathf.Max(scaledAge, 1); } private static int CalculateForImmortals(Pawn pawn, int humanLifespan) { float age = pawn.ageTracker.AgeBiologicalYearsFloat; float lifeExpectancy = pawn.RaceProps.lifeExpectancy; float growth = pawn.ageTracker.Growth; //Growth and hacks { growth = ImmortalGrowthHacks(pawn, age, growth); if (growth < 1) { return (int)Mathf.Lerp(0, ImmortalRaceAgeClamp, growth); } } //curve { float life = age / lifeExpectancy; //Hypothesis : very long living races looks "young" until the end of their lifespan if (life < 0.9f) { return ImmortalRaceAgeClamp; } return (int)Mathf.LerpUnclamped(ImmortalRaceAgeClamp, humanLifespan, Mathf.InverseLerp(0.9f, 1, life)); } } private static float ImmortalGrowthHacks(Pawn pawn, float age, float originalGrowth) { if (pawn.ageTracker.CurLifeStage.reproductive == false) { //Hopefully, reproductive life stage will mean that we're dealing with an adult return Math.Min(1, age / ImmortalRaceAgeClamp); } return 1; } private static int CalculateForNonHuman(Pawn pawn, int humanLifespan) { float age = pawn.ageTracker.AgeBiologicalYearsFloat; float lifeExpectancy = pawn.RaceProps.lifeExpectancy; float growth = pawn.ageTracker.Growth; //Growth and hacks { growth = NonHumanGrowthHacks(pawn, age, growth); if (growth < 1) { return (int)Mathf.Lerp(0, NonHumanRaceAgeClamp, growth); } } //curve { float life = age / lifeExpectancy; return (int)Mathf.LerpUnclamped(NonHumanRaceAgeClamp, humanLifespan, life); } } private static float NonHumanGrowthHacks(Pawn pawn, float age, float originalGrowth) { if (pawn.ageTracker.CurLifeStage.reproductive == false) { //Hopefully, reproductive life stage will mean that we're dealing with an adult return Math.Min(1, age / NonHumanRaceAgeClamp); } return 1; } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Helpers/AgeHelper.cs
C#
mit
2,914
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.Modules.Shared.Helpers { public static class RandomHelper { private static Random _random; static RandomHelper() { _random = new Random(); } /// <remarks>this is not foolproof</remarks> public static TType WeightedRandom<TType>(IList<Weighted<TType>> weights) { if (weights == null || weights.Any() == false || weights.Where(e => e.Weight < 0).Any()) { return default(TType); } Weighted<TType> result; if (weights.TryRandomElementByWeight(e => e.Weight, out result) == true) { return result.Element; } return weights.RandomElement().Element; } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Helpers/RandomHelper.cs
C#
mit
754
using rjw.Modules.Shared.Enums; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.Modules.Shared { public interface IPawnStateService { PawnState Detect(Pawn pawn); } }
jojo1541/rjw
1.3/Source/Modules/Shared/IPawnStateService.cs
C#
mit
271
using rjw.Modules.Shared.Enums; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.Modules.Shared.Implementation { public class PawnStateService : IPawnStateService { public static IPawnStateService Instance { get; private set; } static PawnStateService() { Instance = new PawnStateService(); } public PawnState Detect(Pawn pawn) { if (pawn.Dead) { return PawnState.Dead; } if (pawn.Downed) { if (pawn.health.capacities.CanBeAwake == false) { return PawnState.Unconscious; } return PawnState.Downed; } return PawnState.Healthy; } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Implementation/PawnStateService.cs
C#
mit
701
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Shared.Logs { public interface ILog { void Debug(string message); void Debug(string message, Exception e); void Message(string message); void Message(string message, Exception e); void Warning(string message); void Warning(string message, Exception e); void Error(string message); void Error(string message, Exception e); } }
jojo1541/rjw
1.3/Source/Modules/Shared/Logs/ILog.cs
C#
mit
487
namespace rjw.Modules.Shared.Logs { public interface ILogProvider { bool IsActive { get; } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Logs/ILogProvider.cs
C#
mit
103
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Shared.Logs { public static class LogManager { private class Logger : ILog { private readonly string _loggerTypeName; private readonly ILogProvider _logProvider; public Logger(string typeName) { _loggerTypeName = typeName; } public Logger(string typeName, ILogProvider logProvider) { _loggerTypeName = typeName; _logProvider = logProvider; } public void Debug(string message) { LogDebug(CreateLogMessage(message)); } public void Debug(string message, Exception exception) { LogDebug(CreateLogMessage(message, exception)); } public void Message(string message) { LogMessage(CreateLogMessage(message)); } public void Message(string message, Exception exception) { LogMessage(CreateLogMessage(message, exception)); } public void Warning(string message) { LogWarning(CreateLogMessage(message)); } public void Warning(string message, Exception exception) { LogWarning(CreateLogMessage(message, exception)); } public void Error(string message) { LogError(CreateLogMessage(message)); } public void Error(string message, Exception exception) { LogError(CreateLogMessage(message, exception)); } private string CreateLogMessage(string message) { return $"[{_loggerTypeName}] {message}"; } private string CreateLogMessage(string message, Exception exception) { return $"{CreateLogMessage(message)}{Environment.NewLine}{exception}"; } private void LogDebug(string message) { if (_logProvider?.IsActive != false && RJWSettings.DevMode == true) { ModLog.Message(message); } } private void LogMessage(string message) { if (_logProvider?.IsActive != false) { ModLog.Message(message); } } private void LogWarning(string message) { if (_logProvider?.IsActive != false) { ModLog.Warning(message); } } private void LogError(string message) { if (_logProvider?.IsActive != false) { ModLog.Error(message); } } } public static ILog GetLogger<TType, TLogProvider>() where TLogProvider : ILogProvider, new() { return new Logger(typeof(TType).Name, new TLogProvider()); } public static ILog GetLogger<TType>() { return new Logger(typeof(TType).Name); } public static ILog GetLogger(string staticTypeName) { return new Logger(staticTypeName); } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Logs/LogManager.cs
C#
mit
2,582
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Shared { public static class Multipliers { public const float Never = 0f; public const float AlmostNever = 0.1f; public const float VeryRare = 0.2f; public const float Rare = 0.5f; public const float Uncommon = 0.8f; public const float Average = 1.0f; public const float Common = 1.2f; public const float Frequent = 1.5f; public const float VeryFrequent = 1.8f; public const float Doubled = 2.0f; public const float DoubledPlus = 2.5f; } }
jojo1541/rjw
1.3/Source/Modules/Shared/Multipliers.cs
C#
mit
612
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rjw.Modules.Shared { public class Weighted<TType> { public TType Element { get; set; } public float Weight { get; set; } public Weighted(float weight, TType element) { Weight = weight; Element = element; } } }
jojo1541/rjw
1.3/Source/Modules/Shared/Weighted.cs
C#
mit
360
using System; using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Need_Sex : Need_Seeker { public bool isInvisible => pawn.Map == null; private bool BootStrapTriggered = false; public 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 override bool ShowOnNeedList //{ // get // { // if (Genital_Helper.has_genitals(pawn)) // return true; // ModLog.Message("curLevelInt " + curLevelInt); // return false; // } //} //public override string GetTipString() //{ // return string.Concat(new string[] // { // this.LabelCap, // ": ", // this.CurLevelPercentage.ToStringPercent(), // "\n", // this.def.description, // "\n", // }); //} public static float druggedfactor(Pawn pawn) { if (pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomAddiction")) && !pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomEffect"))) { //ModLog.Message("Need_Sex::druggedfactor 0.5 pawn is " + xxx.get_pawnname(pawn)); return 0.5f; } if (pawn.health.hediffSet.HasHediff(HediffDef.Named("HumpShroomEffect"))) { //ModLog.Message("Need_Sex::druggedfactor 3 pawn is " + xxx.get_pawnname(pawn)); return 3f; } //ModLog.Message("Need_Sex::druggedfactor 1 pawn is " + xxx.get_pawnname(pawn)); return 1f; } static float diseasefactor(Pawn pawn) { return 1f; } static float futafactor(Pawn pawn) { var parts = pawn.GetGenitalsList(); return (((Genital_Helper.has_penis_fertile(pawn, parts) || Genital_Helper.has_penis_infertile(pawn, parts)) && Genital_Helper.has_vagina(pawn, parts)) ? 2.0f : 1.0f); } static float agefactor(Pawn pawn) { if (xxx.is_human(pawn)) { //countdown Need_Sex horniness = pawn.needs.TryGetNeed<Need_Sex>(); if (horniness.CurLevel > 0.5f) return 1f; //set to 50% for underage if (RJWSettings.sex_age_legacymode) { int age = pawn.ageTracker.AgeBiologicalYears; if (age < RJWSettings.sex_minimum_age) return 0f; } //{ // int age = pawn.ageTracker.AgeBiologicalYears; // int t = 12; // humans teen/reproductive stage // if (pawn.GetRJWPawnData().RaceSupportDef?.limitedSex != null) // { // t = pawn.GetRJWPawnData().RaceSupportDef.limitedSex; // } // else if (!pawn.ageTracker.CurLifeStage.reproductive) // if (pawn.ageTracker.Growth < 1) // return 0f; // if (age < t) // return 0f; //} if (pawn.ageTracker.Growth < 1 && !pawn.ageTracker.CurLifeStage.reproductive) return 0f; } return 1f; } static float fall_per_tick(Pawn pawn) { var fall_per_tick = //def.fallPerDay * decay_per_day / GenDate.TicksPerDay * brokenbodyfactor(pawn) * druggedfactor(pawn) * diseasefactor(pawn) * agefactor(pawn) * futafactor(pawn); //--ModLog.Message("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))); //ModLog.Message(" " + 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) ); return fall_per_tick; } public override void NeedInterval() //150 ticks between each calls from Pawn_NeedsTracker() { if (isInvisible) return; // no caravans if (needsex_tick <= 0) // every 10 ticks - real tick { if (xxx.is_asexual(pawn)) { CurLevel = 0.5f; return; } //--ModLog.Message("Need_Sex::NeedInterval is called0 - pawn is "+xxx.get_pawnname(pawn)); needsex_tick = needsex_tick_timer; if (!def.freezeWhileSleeping || pawn.Awake()) { var fall_per_call = 150 * needsex_tick_timer * fall_per_tick(pawn); CurLevel -= fall_per_call * xxx.get_sex_drive(pawn) * RJWSettings.sexneed_decay_rate; // 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. //ModLog.Message(" " + xxx.get_pawnname(pawn) + "'s sex need stats:: Decay/call: " + fall_per_call * decay_rate_modifier * xxx.get_sex_drive(pawn) + ", Cur.lvl: " + CurLevel + ", Dec. rate: " + decay_rate_modifier + ", Sex drive: " + xxx.get_sex_drive(pawn)); if (!RJWSettings.Disable_MeditationFocusDrain && CurLevel < thresh_frustrated()) { SexUtility.OffsetPsyfocus(pawn, -0.01f); } //if (CurLevel < thresh_horny()) //{ // SexUtility.OffsetPsyfocus(pawn, -0.01f); //} //if (CurLevel < thresh_frustrated() || CurLevel > thresh_ahegao()) //{ // SexUtility.OffsetPsyfocus(pawn, -0.05f); //} } //--ModLog.Message("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) { //--ModLog.Message("Need_Sex::NeedInterval::calling boostrap - pawn is " + xxx.get_pawnname(pawn)); xxx.bootstrap(pawn.Map); BootStrapTriggered = true; } } else { needsex_tick--; } //--ModLog.Message("Need_Sex::NeedInterval is called2 - needsex_tick is "+needsex_tick); } } }
jojo1541/rjw
1.3/Source/Needs/Need_Sex.cs
C#
mit
6,663
using Verse; namespace rjw { /// <summary> /// Looks up and returns a BodyPartTagDef defined in the XML /// </summary> public static class BodyPartTagDefOf { public static BodyPartTagDef RJW_Fertility { get { if (a == null) a = (BodyPartTagDef)GenDefDatabase.GetDef(typeof(BodyPartTagDef), "RJW_Fertility"); return a; } } private static BodyPartTagDef a; } }
jojo1541/rjw
1.3/Source/PawnCapacities/BodyPartTagDefOf.cs
C#
mit
395
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 { public override float CalculateCapacityLevel(HediffSet diffSet, List<PawnCapacityUtility.CapacityImpactor> impactors = null) { Pawn pawn = diffSet.pawn; var parts = pawn.GetGenitalsList(); if (!Genital_Helper.has_penis_fertile(pawn, parts) && !Genital_Helper.has_vagina(pawn, parts)) return 0; if (Genital_Helper.has_ovipositorF(pawn, parts) || Genital_Helper.has_ovipositorM(pawn, parts)) return 0; //ModLog.Message("PawnCapacityWorker_Fertility::CalculateCapacityLevel is called for: " + xxx.get_pawnname(pawn)); RaceProperties race = diffSet.pawn.RaceProps; if (!pawn.RaceHasFertility()) { //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; } 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%. } } //If pawn is an animal, first reproductive lifestage is (usually) adult, so set startMaxAge at first reproductive stage, and startAge at stage before that. int adult; if (xxx.is_animal(pawn) && (adult = race.lifeStageAges.FirstIndexOf((ls) => ls.def.reproductive)) > 0) { startAge = race.lifeStageAges[adult - 1].minAge; startMaxAge = race.lifeStageAges[adult].minAge; } else { 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) // ensure peak fertility stays at start or a bit before adult stage startMaxAge = lifestage.minAge; } } } //Log.Message(" Fertility ages for " + pawn.Name + " are: " + startAge + ", " + startMaxAge + ", " + endAge + ", " + endMaxAge); float result = PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.RJW_Fertility, 1f, FloatRange.ZeroToOne, impactors); result *= GenMath.FlatHill(startAge, startMaxAge, endAge, zeroFertility, pawn.ageTracker.AgeBiologicalYearsFloat); //ModLog.Message("PawnCapacityWorker_Fertility::CalculateCapacityLevel result is: " + result); return result; } public override bool CanHaveCapacity(BodyDef body) { return body.HasPartWithTag(BodyPartTagDefOf.RJW_Fertility); } } }
jojo1541/rjw
1.3/Source/PawnCapacities/PawnCapacityWorker_Fertility.cs
C#
mit
3,850
using System; using System.Collections.Generic; using System.Linq; using Verse; using UnityEngine; using RimWorld; using Verse.Sound; namespace rjw.MainTab { [StaticConstructorOnStartup] public static class DesignatorCheckbox { public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Service_on"); public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Service_off"); public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/Service_Refuse"); private static bool checkboxPainting; private static bool checkboxPaintingState; public static void Checkbox(Vector2 topLeft, ref bool checkOn, float size = 24f, bool disabled = false, Texture2D texChecked = null, Texture2D texUnchecked = null, Texture2D texDisabled = null) { Checkbox(topLeft.x, topLeft.y, ref checkOn, size, disabled, texChecked, texUnchecked); } public static void Checkbox(float x, float y, ref bool checkOn, float size = 24f, bool disabled = false, Texture2D texChecked = null, Texture2D texUnchecked = null, Texture2D texDisabled = null) { Rect rect = new Rect(x, y, size, size); CheckboxDraw(x, y, checkOn, disabled, size, texChecked, texUnchecked,texDisabled); if (!disabled) { MouseoverSounds.DoRegion(rect); bool flag = false; Widgets.DraggableResult draggableResult = Widgets.ButtonInvisibleDraggable(rect, false); if (draggableResult == Widgets.DraggableResult.Pressed) { checkOn = !checkOn; flag = true; } else if (draggableResult == Widgets.DraggableResult.Dragged) { checkOn = !checkOn; flag = true; checkboxPainting = true; checkboxPaintingState = checkOn; } if (Mouse.IsOver(rect) && checkboxPainting && Input.GetMouseButton(0) && checkOn != checkboxPaintingState) { checkOn = checkboxPaintingState; flag = true; } if (flag) { if (checkOn) { SoundDefOf.Checkbox_TurnedOn.PlayOneShotOnCamera(null); } else { SoundDefOf.Checkbox_TurnedOff.PlayOneShotOnCamera(null); } } } } private static void CheckboxDraw(float x, float y, bool active, bool disabled, float size = 24f, Texture2D texChecked = null, Texture2D texUnchecked = null, Texture2D texDisabled = null) { Texture2D image; if (disabled) { image = ((!(texDisabled != null)) ? CheckboxDisabledTex : texDisabled); } else if (active) { image = ((!(texChecked != null)) ? CheckboxOnTex : texChecked); } else { image = ((!(texUnchecked != null)) ? CheckboxOffTex : texUnchecked); } Rect position = new Rect(x, y, size, size); GUI.DrawTexture(position, image); } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/DesignatorCheckbox.cs
C#
mit
2,754
using System; using System.Collections.Generic; using System.Linq; using Verse; using UnityEngine; using RimWorld; using Verse.Sound; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public abstract class PawnColumnCheckbox : PawnColumnWorker { public static readonly Texture2D CheckboxOnTex; public static readonly Texture2D CheckboxOffTex; public static readonly Texture2D CheckboxDisabledTex; public const int HorizontalPadding = 2; public override void DoCell(Rect rect, Pawn pawn, RimWorld.PawnTable table) { if (!this.HasCheckbox(pawn)) { return; } if (Find.TickManager.TicksGame % 60 == 0) { pawn.UpdatePermissions(); //Log.Message("GetDisabled UpdateCanDesignateService for " + xxx.get_pawnname(pawn)); //Log.Message("UpdateCanDesignateService " + pawn.UpdateCanDesignateService()); //Log.Message("CanDesignateService " + pawn.CanDesignateService()); //Log.Message("GetDisabled " + GetDisabled(pawn)); } int num = (int)((rect.width - 24f) / 2f); int num2 = Mathf.Max(3, 0); Vector2 vector = new Vector2(rect.x + (float)num, rect.y + (float)num2); Rect rect2 = new Rect(vector.x, vector.y, 24f, 24f); bool disabled = this.GetDisabled(pawn); bool value; if (disabled) { value = false; } else { value = this.GetValue(pawn); } bool flag = value; Vector2 topLeft = vector; //Widgets.Checkbox(topLeft, ref value, 24f, disabled, CheckboxOnTex, CheckboxOffTex, CheckboxDisabledTex); MakeCheckbox(topLeft, ref value, 24f, disabled, CheckboxOnTex, CheckboxOffTex, CheckboxDisabledTex); if (Mouse.IsOver(rect2)) { string tip = this.GetTip(pawn); if (!tip.NullOrEmpty()) { TooltipHandler.TipRegion(rect2, tip); } } if (value != flag) { this.SetValue(pawn, value); } } protected void MakeCheckbox(Vector2 topLeft, ref bool value, float v = 24f, bool disabled = false, Texture2D checkboxOnTex = null, Texture2D checkboxOffTex = null, Texture2D checkboxDisabledTex = null) { Widgets.Checkbox(topLeft, ref value, v, disabled, checkboxOnTex, checkboxOffTex, checkboxDisabledTex); } protected virtual string GetTip(Pawn pawn) { return null; } protected virtual bool HasCheckbox(Pawn pawn) { return false; } protected abstract bool GetValue(Pawn pawn); protected abstract void SetValue(Pawn pawn, bool value); protected virtual bool GetDisabled(Pawn pawn) { return false; } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnCheckbox.cs
C#
mit
2,494
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public class PawnColumnWorker_BreedAnimal : PawnColumnWorker_Checkbox { public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_on"); public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_off"); public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_Refuse"); protected override bool HasCheckbox(Pawn pawn) { return pawn.CanDesignateBreeding(); } protected bool GetDisabled(Pawn pawn) { return !pawn.CanDesignateBreeding(); } protected override bool GetValue(Pawn pawn) { return pawn.IsDesignatedBreeding() && xxx.is_animal(pawn); } protected override void SetValue(Pawn pawn, bool value, PawnTable table) { if (value == this.GetValue(pawn)) return; pawn.ToggleBreeding(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnWorker_BreedAnimal.cs
C#
mit
1,000
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public class PawnColumnWorker_BreedHumanlike : PawnColumnWorker_Checkbox { public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_on"); public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_off"); public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_Refuse"); protected override bool HasCheckbox(Pawn pawn) { return pawn.CanDesignateBreeding(); } protected bool GetDisabled(Pawn pawn) { return !pawn.CanDesignateBreeding(); } protected override bool GetValue(Pawn pawn) { return pawn.IsDesignatedBreeding() && xxx.is_human(pawn); } protected override void SetValue(Pawn pawn, bool value, PawnTable table) { if (value == this.GetValue(pawn)) return; pawn.ToggleBreeding(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnWorker_BreedHumanlike.cs
C#
mit
1,002
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public class PawnColumnWorker_BreederAnimal : PawnColumnWorker_Checkbox { public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_on"); public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_off"); public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/Breeding_Pawn_Refuse"); protected override bool HasCheckbox(Pawn pawn) { return pawn.CanDesignateBreedingAnimal(); } protected bool GetDisabled(Pawn pawn) { return !pawn.CanDesignateBreedingAnimal(); } protected override bool GetValue(Pawn pawn) { return pawn.IsDesignatedBreedingAnimal() && xxx.is_animal(pawn); } protected override void SetValue(Pawn pawn, bool value, PawnTable table) { if (value == this.GetValue(pawn)) return; pawn.ToggleBreedingAnimal(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnWorker_BreederAnimal.cs
C#
mit
1,026
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public class PawnColumnWorker_Comfort : PawnColumnWorker_Checkbox { public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_on"); public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off"); public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_Refuse"); protected override bool HasCheckbox(Pawn pawn) { return pawn.CanDesignateComfort(); } protected bool GetDisabled(Pawn pawn) { return !pawn.CanDesignateComfort(); } protected override bool GetValue(Pawn pawn) { return pawn.IsDesignatedComfort(); } protected override void SetValue(Pawn pawn, bool value, PawnTable table) { pawn.ToggleComfort(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnWorker_Comfort.cs
C#
mit
931
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public class PawnColumnWorker_Hero : PawnColumnCheckbox { //public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Hero_on"); //public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Hero_off"); //public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_Refuse"); //public static readonly Texture2D iconAccept = ContentFinder<Texture2D>.Get("UI/Commands/Hero_off"); //static readonly Texture2D iconCancel = ContentFinder<Texture2D>.Get("UI/Commands/Hero_on"); //protected override Texture2D GetIconFor(Pawn pawn) //{ // return pawn.CanDesignateHero() ? pawn.IsDesignatedHero() ? iconAccept : iconCancel : null; //} //protected override string GetIconTip(Pawn pawn) //{ // return "PawnColumnWorker_IsHero".Translate(); // ; //} //public static Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Hero_on"); //public static Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Hero_off"); protected override bool HasCheckbox(Pawn pawn) { return pawn.CanDesignateHero() || pawn.IsDesignatedHero(); } protected override bool GetValue(Pawn pawn) { return pawn.IsDesignatedHero(); } protected override void SetValue(Pawn pawn, bool value) { if (pawn.IsDesignatedHero()) return; pawn.ToggleHero(); //reload/update tab var rjwtab = DefDatabase<MainButtonDef>.GetNamed("RJW_MainButton"); Find.MainTabsRoot.ToggleTab(rjwtab, false);//off Find.MainTabsRoot.ToggleTab(rjwtab, false);//on } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnWorker_Hero.cs
C#
mit
1,740
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Checkbox { [StaticConstructorOnStartup] public class PawnColumnWorker_Whore : PawnColumnWorker_Checkbox { public static readonly Texture2D CheckboxOnTex = ContentFinder<Texture2D>.Get("UI/Commands/Service_on"); public static readonly Texture2D CheckboxOffTex = ContentFinder<Texture2D>.Get("UI/Commands/Service_off"); public static readonly Texture2D CheckboxDisabledTex = ContentFinder<Texture2D>.Get("UI/Commands/Service_Refuse"); protected override bool HasCheckbox(Pawn pawn) { return pawn.CanDesignateService(); } protected bool GetDisabled(Pawn pawn) { return !pawn.CanDesignateService(); } protected override bool GetValue(Pawn pawn) { return pawn.IsDesignatedService(); } protected override void SetValue(Pawn pawn, bool value, PawnTable table) { pawn.ToggleService(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Checkboxes/PawnColumnWorker_Whore.cs
C#
mit
905
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjw.MainTab.DefModExtensions { public class RJW_PawnTable : DefModExtension { public string label; } }
jojo1541/rjw
1.3/Source/RJWTab/DefModExtensions/RJW_PawnTable.cs
C#
mit
251
using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using RimWorld.Planet; using UnityEngine; using Verse; namespace rjw.MainTab.Icon { [StaticConstructorOnStartup] public class PawnColumnWorker_IsBreeder : PawnColumnWorker_Icon { private static readonly Texture2D comfortOn = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_on"); private readonly Texture2D comfortOff = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off"); private readonly Texture2D comfortOff_nobg = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off_nobg"); protected override Texture2D GetIconFor(Pawn pawn) { return pawn.CanDesignateBreeding() ? pawn.IsDesignatedBreeding() ? comfortOn : comfortOff : comfortOff_nobg; //return xxx.is_slave(pawn) ? comfortOff : null; } protected override string GetIconTip(Pawn pawn) { return "PawnColumnWorker_IsBreeder".Translate(); ; } } }
jojo1541/rjw
1.3/Source/RJWTab/Icons/PawnColumnWorker_IsBreeder.cs
C#
mit
954
using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using RimWorld.Planet; using UnityEngine; using Verse; namespace rjw.MainTab.Icon { [StaticConstructorOnStartup] public class PawnColumnWorker_IsComfort : PawnColumnWorker_Icon { private readonly Texture2D comfortOn = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_on"); private readonly Texture2D comfortOff = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off"); private readonly Texture2D comfortOff_nobg = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off_nobg"); protected override Texture2D GetIconFor(Pawn pawn) { return pawn.CanDesignateComfort() ? pawn.IsDesignatedComfort() ? comfortOn : comfortOff : comfortOff_nobg; } protected override string GetIconTip(Pawn pawn) { return "PawnColumnWorker_IsComfort".Translate(); ; } } }
jojo1541/rjw
1.3/Source/RJWTab/Icons/PawnColumnWorker_IsComfort.cs
C#
mit
893
using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using RimWorld.Planet; using UnityEngine; using Verse; namespace rjw.MainTab.Icon { [StaticConstructorOnStartup] public class PawnColumnWorker_IsPrisoner : PawnColumnWorker_Icon { private static readonly Texture2D comfortOn = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_on"); private readonly Texture2D comfortOff = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off"); private readonly Texture2D comfortOff_nobg = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off_nobg"); protected override Texture2D GetIconFor(Pawn pawn) { return pawn.IsPrisonerOfColony ? comfortOff_nobg : null; } protected override string GetIconTip(Pawn pawn) { return "PawnColumnWorker_IsPrisoner".Translate(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Icons/PawnColumnWorker_IsPrisoner.cs
C#
mit
848
using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using RimWorld.Planet; using UnityEngine; using Verse; namespace rjw.MainTab.Icon { [StaticConstructorOnStartup] public class PawnColumnWorker_IsSlave : PawnColumnWorker_Icon { private readonly Texture2D comfortOn = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_on"); private readonly Texture2D comfortOff = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off"); private readonly Texture2D comfortOff_nobg = ContentFinder<Texture2D>.Get("UI/Commands/ComfortPrisoner_off_nobg"); protected override Texture2D GetIconFor(Pawn pawn) { return xxx.is_slave(pawn) ? ModsConfig.IdeologyActive ? GuestUtility.SlaveIcon : comfortOff_nobg : null; } protected override string GetIconTip(Pawn pawn) { return "PawnColumnWorker_IsSlave".Translate(); ; } } }
jojo1541/rjw
1.3/Source/RJWTab/Icons/PawnColumnWorker_IsSlave.cs
C#
mit
887
using RimWorld; using UnityEngine; using Verse; namespace rjw.MainTab.Icon { [StaticConstructorOnStartup] public class PawnColumnWorker_RJWGender : PawnColumnWorker_Gender { public static readonly Texture2D hermIcon = ContentFinder<Texture2D>.Get("UI/Icons/Gender/Genders", true); protected override Texture2D GetIconFor(Pawn pawn) { return ((Genital_Helper.has_penis_fertile(pawn) || Genital_Helper.has_penis_infertile(pawn)) && Genital_Helper.has_vagina(pawn)) ? hermIcon : pawn.gender.GetIcon(); } protected override string GetIconTip(Pawn pawn) { return ((Genital_Helper.has_penis_fertile(pawn) || Genital_Helper.has_penis_infertile(pawn)) && Genital_Helper.has_vagina(pawn)) ? "PawnColumnWorker_RJWGender_IsHerm".Translate() : pawn.GetGenderLabel().CapitalizeFirst(); } } }
jojo1541/rjw
1.3/Source/RJWTab/Icons/PawnColumnWorker_RJWGender.cs
C#
mit
807
using System.Collections.Generic; using System.Linq; using Verse; using RimWorld; using RimWorld.Planet; using UnityEngine; using rjw.MainTab.DefModExtensions; namespace rjw.MainTab { [StaticConstructorOnStartup] public class RJW_PawnTableList { public List<PawnTableDef> getdefs() { var defs = new List<PawnTableDef>(); defs.AddRange(DefDatabase<PawnTableDef>.AllDefs.Where(x => x.HasModExtension<RJW_PawnTable>())); return defs; } } public class MainTabWindow : MainTabWindow_PawnTable { protected override float ExtraBottomSpace { get { return 53f; //default 53 } } protected override float ExtraTopSpace { get { return 40f; //default 0 } } protected override PawnTableDef PawnTableDef => pawnTableDef; protected override IEnumerable<Pawn> Pawns => pawns; public IEnumerable<Pawn> pawns = Find.CurrentMap.mapPawns.AllPawns.Where(p => p.RaceProps.Humanlike && p.IsColonist && !xxx.is_slave(p)); public PawnTableDef pawnTableDef = DefDatabase<PawnTableDef>.GetNamed("RJW_PawnTable_Colonists"); /// <summary> /// draw table /// </summary> /// <param name="rect"></param> public override void DoWindowContents(Rect rect) { base.DoWindowContents(rect); if (Widgets.ButtonText(new Rect(rect.x + 5f, rect.y + 5f, Mathf.Min(rect.width, 260f), 32f), "MainTabWindow_Designators".Translate(), true, true, true)) { MakeMenu(); } } public override void PostOpen() { base.PostOpen(); Find.World.renderer.wantedMode = WorldRenderMode.None; } /// <summary> /// reload/update tab /// </summary> public static void Reloadtab() { var rjwtab = DefDatabase<MainButtonDef>.GetNamed("RJW_MainButton"); Find.MainTabsRoot.ToggleTab(rjwtab, false);//off Find.MainTabsRoot.ToggleTab(rjwtab, false);//on } public void MakeMenu() { Find.WindowStack.Add(new FloatMenu(MakeOptions())); } /// <summary> /// switch pawnTable's /// patch this /// </summary> public List<FloatMenuOption> MakeOptions() { List<FloatMenuOption> opts = new List<FloatMenuOption>(); PawnTableDef tabC = DefDatabase<PawnTableDef>.GetNamed("RJW_PawnTable_Colonists"); PawnTableDef tabA = DefDatabase<PawnTableDef>.GetNamed("RJW_PawnTable_Animals"); PawnTableDef tabP = DefDatabase<PawnTableDef>.GetNamed("RJW_PawnTable_Property"); opts.Add(new FloatMenuOption(tabC.GetModExtension<RJW_PawnTable>().label, () => { pawnTableDef = tabC; pawns = Find.CurrentMap.mapPawns.AllPawns.Where(p => p.RaceProps.Humanlike && p.IsColonist && !xxx.is_slave(p)); Notify_ResolutionChanged(); Reloadtab(); }, MenuOptionPriority.Default)); opts.Add(new FloatMenuOption(tabA.GetModExtension<RJW_PawnTable>().label, () => { pawnTableDef = tabA; pawns = Find.CurrentMap.mapPawns.PawnsInFaction(Faction.OfPlayer).Where(p => xxx.is_animal(p)); Notify_ResolutionChanged(); Reloadtab(); }, MenuOptionPriority.Default)); opts.Add(new FloatMenuOption(tabP.GetModExtension<RJW_PawnTable>().label, () => { pawnTableDef = tabP; pawns = Find.CurrentMap.mapPawns.AllPawns.Where(p => p.RaceProps.Humanlike && (p.IsColonist && xxx.is_slave(p) || p.IsPrisonerOfColony)); Notify_ResolutionChanged(); Reloadtab(); }, MenuOptionPriority.Default)); return opts; } } }
jojo1541/rjw
1.3/Source/RJWTab/MainTabWindow.cs
C#
mit
3,335
using System; using UnityEngine; using Verse; using Verse.Sound; namespace RimWorld { // Token: 0x020013F0 RID: 5104 public class PawnColumnWorker_Master : PawnColumnWorker { // Token: 0x17001618 RID: 5656 // (get) Token: 0x06007D97 RID: 32151 RVA: 0x00012AE6 File Offset: 0x00010CE6 protected override GameFont DefaultHeaderFont { get { return GameFont.Tiny; } } // Token: 0x06007D98 RID: 32152 RVA: 0x002CCC79 File Offset: 0x002CAE79 public override int GetMinWidth(PawnTable table) { return Mathf.Max(base.GetMinWidth(table), 100); } // Token: 0x06007D99 RID: 32153 RVA: 0x002CCC89 File Offset: 0x002CAE89 public override int GetOptimalWidth(PawnTable table) { return Mathf.Clamp(170, this.GetMinWidth(table), this.GetMaxWidth(table)); } // Token: 0x06007D9A RID: 32154 RVA: 0x002CB126 File Offset: 0x002C9326 public override void DoHeader(Rect rect, PawnTable table) { base.DoHeader(rect, table); MouseoverSounds.DoRegion(rect); } // Token: 0x06007D9B RID: 32155 RVA: 0x002CCCA3 File Offset: 0x002CAEA3 public override void DoCell(Rect rect, Pawn pawn, PawnTable table) { if (!this.CanAssignMaster(pawn)) { return; } TrainableUtility.MasterSelectButton(rect.ContractedBy(2f), pawn, true); } // Token: 0x06007D9C RID: 32156 RVA: 0x002CCCC4 File Offset: 0x002CAEC4 public override int Compare(Pawn a, Pawn b) { int valueToCompare = this.GetValueToCompare1(a); int valueToCompare2 = this.GetValueToCompare1(b); if (valueToCompare != valueToCompare2) { return valueToCompare.CompareTo(valueToCompare2); } return this.GetValueToCompare2(a).CompareTo(this.GetValueToCompare2(b)); } // Token: 0x06007D9D RID: 32157 RVA: 0x002CCD01 File Offset: 0x002CAF01 private bool CanAssignMaster(Pawn pawn) { return pawn.RaceProps.Animal && pawn.Faction == Faction.OfPlayer && pawn.training.HasLearned(TrainableDefOf.Obedience); } // Token: 0x06007D9E RID: 32158 RVA: 0x002CCD34 File Offset: 0x002CAF34 private int GetValueToCompare1(Pawn pawn) { if (!this.CanAssignMaster(pawn)) { return 0; } if (pawn.playerSettings.Master == null) { return 1; } return 2; } // Token: 0x06007D9F RID: 32159 RVA: 0x002CCD51 File Offset: 0x002CAF51 private string GetValueToCompare2(Pawn pawn) { if (pawn.playerSettings != null && pawn.playerSettings.Master != null) { return pawn.playerSettings.Master.Label; } return ""; } } }
jojo1541/rjw
1.3/Source/RJWTab/PawnColumnWorker_Master.cs
C#
mit
2,498
using System.Collections.Generic; using System.Linq; using System.Text; using RimWorld; using RimWorld.Planet; using UnityEngine; using Verse; namespace rjw.MainTab { public abstract class PawnColumnWorker_TextCenter : PawnColumnWorker_Text { public void DoCell(Rect rect, Pawn pawn, PawnTable table) { Rect rect2 = new Rect(rect.x, rect.y, rect.width, Mathf.Min(rect.height, 30f)); string textFor = GetTextFor(pawn); if (textFor != null) { Text.Font = GameFont.Small; Text.Anchor = TextAnchor.MiddleCenter; Text.WordWrap = false; Widgets.Label(rect2, textFor); Text.WordWrap = true; Text.Anchor = TextAnchor.UpperLeft; string tip = GetTip(pawn); if (!tip.NullOrEmpty()) { TooltipHandler.TipRegion(rect2, tip); } } } } }
jojo1541/rjw
1.3/Source/RJWTab/PawnColumnWorker_TextCenter.cs
C#
mit
794
using System; using System.Collections.Generic; using System.Linq; using RimWorld; using rjw; using Verse; namespace rjw.MainTab { public class RJW_PawnTable_Animals : PawnTable_Animals { public RJW_PawnTable_Animals(PawnTableDef def, Func<IEnumerable<Pawn>> pawnsGetter, int uiWidth, int uiHeight) : base(def, pawnsGetter, uiWidth, uiHeight) { } //default sorting protected override IEnumerable<Pawn> LabelSortFunction(IEnumerable<Pawn> input) { //return input.OrderBy(p => p.Name); foreach (Pawn p in input) p.UpdatePermissions(); return input.OrderByDescending(p => xxx.get_pawnname(p)); //return input.OrderByDescending(p => (p.IsPrisonerOfColony || p.IsSlaveOfColony) != false).ThenBy(p => (p.Name.ToStringShort.Colorize(Color.yellow))); //return input.OrderBy(p => xxx.get_pawnname(p)); } protected override IEnumerable<Pawn> PrimarySortFunction(IEnumerable<Pawn> input) { foreach (Pawn p in input) p.UpdatePermissions(); return input; //return base.PrimarySortFunction(input); } //public IEnumerable<Pawn> FilterPawns //{ // get // { // ModLog.Message("FilterPawnsGet"); // var x = Find.CurrentMap.mapPawns.PawnsInFaction(Faction.OfPlayer).Where(p => xxx.is_animal(p)); // ModLog.Message("x: " + x); // return x; // } //} } }
jojo1541/rjw
1.3/Source/RJWTab/PawnTable_Animals.cs
C#
mit
1,314
using System; using System.Collections.Generic; using System.Linq; using RimWorld; using rjw; using Verse; namespace rjw.MainTab { public class RJW_PawnTable_Humanlikes : PawnTable_PlayerPawns { public RJW_PawnTable_Humanlikes(PawnTableDef def, Func<IEnumerable<Pawn>> pawnsGetter, int uiWidth, int uiHeight) : base(def, pawnsGetter, uiWidth, uiHeight) { } //default sorting protected override IEnumerable<Pawn> LabelSortFunction(IEnumerable<Pawn> input) { //return input.OrderBy(p => p.Name); foreach (Pawn p in input) p.UpdatePermissions(); return input.OrderByDescending(p => (p.IsPrisonerOfColony || p.IsSlaveOfColony) != false).ThenBy(p => xxx.get_pawnname(p)); //return input.OrderByDescending(p => (p.IsPrisonerOfColony || p.IsSlaveOfColony) != false).ThenBy(p => (p.Name.ToStringShort.Colorize(Color.yellow))); //return input.OrderBy(p => xxx.get_pawnname(p)); } protected override IEnumerable<Pawn> PrimarySortFunction(IEnumerable<Pawn> input) { foreach (Pawn p in input) p.UpdatePermissions(); return input; //return base.PrimarySortFunction(input); } //public static IEnumerable<Pawn> FilterPawns() //{ // return Find.CurrentMap.mapPawns.PawnsInFaction(Faction.OfPlayer).Where(p => xxx.is_animal(p)); //} } }
jojo1541/rjw
1.3/Source/RJWTab/PawnTable_Humanlikes.cs
C#
mit
1,285
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; } } }
jojo1541/rjw
1.3/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; } } }
jojo1541/rjw
1.3/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; } } }
jojo1541/rjw
1.3/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) } } }
jojo1541/rjw
1.3/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) { yield break; var chest = Genital_Helper.get_breastsBPR(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; } } } }
jojo1541/rjw
1.3/Source/Recipes/Recipe_GrowBreasts.cs
C#
mit
1,538
using RimWorld; using System.Collections.Generic; using Verse; namespace rjw { /// <summary> /// Removes heddifs (restraints/cocoon) /// </summary> public class Recipe_RemoveRestraints : Recipe_RemoveHediff { public override bool AvailableOnNow(Thing pawn, BodyPartRecord part = null) { return true; } 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; } } }
jojo1541/rjw
1.3/Source/Recipes/Recipe_Restraints.cs
C#
mit
734
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) { yield break; var chest = Genital_Helper.get_breastsBPR(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; } } } }
jojo1541/rjw
1.3/Source/Recipes/Recipe_ShrinkBreasts.cs
C#
mit
1,755
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; } } } }
jojo1541/rjw
1.3/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; } } } }
jojo1541/rjw
1.3/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; } } } }
jojo1541/rjw
1.3/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, doer); } else { //Log.Message("dead harvest " + part); ThoughtUtility.GiveThoughtsForPawnExecuted(p, doer, 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)); } } */ }
jojo1541/rjw
1.3/Source/Recipes/Remove_Part/Recipe_RemovePart.cs
C#
mit
2,701
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; } } } }
jojo1541/rjw
1.3/Source/Recipes/Remove_Part/Recipe_RemovePenis.cs
C#
mit
595
using System.Collections.Generic; using RimWorld; using Verse; namespace rjw { public class Recipe_RemoveUdder : Recipe_RemovePart { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { if (Genital_Helper.has_udder(p)) { bool blocked = Genital_Helper.udder_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; } } } }
jojo1541/rjw
1.3/Source/Recipes/Remove_Part/Recipe_RemoveUdder.cs
C#
mit
546
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; } } } }
jojo1541/rjw
1.3/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) { var parts = p.GetGenitalsList(); bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p); //|| xxx.is_demon(p); bool has_vag = Genital_Helper.has_vagina(p, parts); bool has_cock = Genital_Helper.has_penis_fertile(p, parts) || Genital_Helper.has_penis_infertile(p, parts) || Genital_Helper.has_ovipositorM(p, parts); 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) { var parts = p.GetGenitalsList(); bool blocked = Genital_Helper.genitals_blocked(p) || xxx.is_slime(p); //|| xxx.is_demon(p); bool has_vag = Genital_Helper.has_vagina(p, parts); bool has_cock = Genital_Helper.has_penis_fertile(p, parts) || Genital_Helper.has_penis_infertile(p, parts) || Genital_Helper.has_ovipositorM(p, parts); 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 doesn't exist yet //add multi parts public class Recipe_AddMultiPart : Recipe_MakeFuta { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { //don't add artificial - peg, hydraulics, bionics, archo, ovi if (r.addsHediff.addedPartProps?.solid ?? false) yield break; //don't add if artificial 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; var parts = p.GetGenitalsList(); //don't add if no ovi //if (Genital_Helper.has_ovipositorF(p, parts) || Genital_Helper.has_ovipositorM(p, parts)) // yield break; //don't add if same part type not present yet if (!Genital_Helper.has_vagina(p, parts) && r.defName.ToLower().Contains("vagina")) yield break; if (!Genital_Helper.has_penis_fertile(p, parts) && r.defName.ToLower().Contains("penis")) 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; } } public class Recipe_AddSinglePart : Recipe_MakeFuta { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { //cant install parts when part blocked, on slimes, or when already has one bool blocked = xxx.is_slime(p) || p.health.hediffSet.HasHediff(r.addsHediff); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked) yield return part; } } public class Recipe_RemoveSinglePart : Recipe_MakeFuta { public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r) { //cant install parts when part blocked, on slimes, or when already has one bool blocked = xxx.is_slime(p) || !p.health.hediffSet.HasHediff(r.removesHediff); foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r)) if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked) yield return part; } } }
jojo1541/rjw
1.3/Source/Recipes/Transgender/Recipe_MakeFuta.cs
C#
mit
4,556
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RimWorld; using Verse; namespace rjw { public class PawnRelationWorker_Child_Beast : PawnRelationWorker_Child { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isChildOf(other, me); } } public class PawnRelationWorker_Sibling_Beast : PawnRelationWorker_Sibling { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isSiblingOf(other, me); } } public class PawnRelationWorker_HalfSibling_Beast : PawnRelationWorker_HalfSibling { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isHalfSiblingOf(other, me); } } public class PawnRelationWorker_Grandparent_Beast : PawnRelationWorker_Grandparent { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGrandchildOf(me, other); } } public class PawnRelationWorker_Grandchild_Beast : PawnRelationWorker_Grandchild { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGrandparentOf(me, other); //if other isGrandchildOf of me, me is their grandparent } } public class PawnRelationWorker_NephewOrNiece_Beast : PawnRelationWorker_NephewOrNiece { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isUncleOrAuntOf(me, other); } } public class PawnRelationWorker_UncleOrAunt_Beast : PawnRelationWorker_UncleOrAunt { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isNephewOrNieceOf(me, other); } } public class PawnRelationWorker_Cousin_Beast : PawnRelationWorker_Cousin { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isCousinOf(me, other); } } public class PawnRelationWorker_GreatGrandparent_Beast : PawnRelationWorker_GreatGrandparent { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGreatGrandChildOf(me, other); } } public class PawnRelationWorker_GreatGrandchild_Beast : PawnRelationWorker_GreatGrandchild { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGreatGrandparentOf(me, other); } } public class PawnRelationWorker_GranduncleOrGrandaunt_Beast : PawnRelationWorker_GranduncleOrGrandaunt { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGrandnephewOrGrandnieceOf(me, other); } } public class PawnRelationWorker_GrandnephewOrGrandniece_Beast : PawnRelationWorker_GrandnephewOrGrandniece { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGreatUncleOrAuntOf(me, other); } } public class PawnRelationWorker_CousinOnceRemoved_Beast : PawnRelationWorker_CousinOnceRemoved { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isCousinOnceRemovedOf(me, other); } } public class PawnRelationWorker_SecondCousin_Beast : PawnRelationWorker_SecondCousin { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isSecondCousinOf(me, other); } } /* public class PawnRelationWorker_Kin_Beast : PawnRelationWorker_Kin { public override bool InRelation(Pawn me, Pawn other) { if (!xxx.is_animal(other) || me == other) { return false; } if (base.InRelation(me, other) == true) { return true; } return false; } } */ }
jojo1541/rjw
1.3/Source/Relations/BeastPawnRelationWorkers.cs
C#
mit
4,540
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RimWorld; using Verse; namespace rjw { public class PawnRelationWorker_Child_Humanlike : PawnRelationWorker_Child { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } if (base.InRelation(me, other) == true) { return true; } return false; } } public class PawnRelationWorker_Sibling_Humanlike : PawnRelationWorker_Sibling { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } if (base.InRelation(me, other) == true) { return true; } return false; } } public class PawnRelationWorker_HalfSibling_Humanlike : PawnRelationWorker_HalfSibling { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isHalfSiblingOf(other, me); } } public class PawnRelationWorker_Grandparent_Humanlike : PawnRelationWorker_Grandparent { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGrandchildOf(me, other); } } public class PawnRelationWorker_Grandchild_Humanlike : PawnRelationWorker_Grandchild { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGrandparentOf(me, other); } } public class PawnRelationWorker_NephewOrNiece_Humanlike : PawnRelationWorker_NephewOrNiece { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isUncleOrAuntOf(me, other); } } public class PawnRelationWorker_UncleOrAunt_Humanlike : PawnRelationWorker_UncleOrAunt { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isNephewOrNieceOf(me, other); } } public class PawnRelationWorker_Cousin_Humanlike : PawnRelationWorker_Cousin { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isCousinOf(me, other); } } public class PawnRelationWorker_GreatGrandparent_Humanlike : PawnRelationWorker_GreatGrandparent { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGreatGrandChildOf(me, other); } } public class PawnRelationWorker_GreatGrandchild_Humanlike : PawnRelationWorker_GreatGrandchild { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGreatGrandparentOf(me, other); } } public class PawnRelationWorker_GranduncleOrGrandaunt_Humanlike : PawnRelationWorker_GranduncleOrGrandaunt { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGrandnephewOrGrandnieceOf(me, other); } } public class PawnRelationWorker_GrandnephewOrGrandniece_Humanlike : PawnRelationWorker_GrandnephewOrGrandniece { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isGreatUncleOrAuntOf(me, other); } } public class PawnRelationWorker_CousinOnceRemoved_Humanlike : PawnRelationWorker_CousinOnceRemoved { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isCousinOnceRemovedOf(me, other); } } public class PawnRelationWorker_SecondCousin_Humanlike : PawnRelationWorker_SecondCousin { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } return RelationChecker.isSecondCousinOf(me, other); } } public class PawnRelationWorker_Kin_Humanlike : PawnRelationWorker_Kin { public override bool InRelation(Pawn me, Pawn other) { if (xxx.is_animal(other) || me == other) { return false; } if (base.InRelation(me, other) == true) { return true; } return false; } } }
jojo1541/rjw
1.3/Source/Relations/HumanlikeBloodRelationWorkers.cs
C#
mit
4,596
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RimWorld; using Verse; namespace rjw { /// <summary> /// Checks for relations, workaround for relation checks that rely on other relation checks, since the vanilla inRelation checks have been prefixed. /// /// Return true if first pawn is specified relation of the second pawn /// /// If "me" isRelationOf "other" return true /// </summary> /// public static class RelationChecker { public static bool isChildOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if (me.GetMother() != other) { return me.GetFather() == other; } //else "other" is mother return true; } public static bool isSiblingOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if (me.GetMother() != null && me.GetFather() != null && me.GetMother() == other.GetMother() && me.GetFather() == other.GetFather()) { return true; } return false; } public static bool isHalfSiblingOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if (isSiblingOf(me, other)) { return false; } return ((me.GetMother() != null && me.GetMother() == other.GetMother()) || (me.GetFather() != null && me.GetFather() == other.GetFather())); } public static bool isAnySiblingOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((me.GetMother() != null && me.GetMother() == other.GetMother()) || (me.GetFather() != null && me.GetFather() == other.GetFather())) { return true; } return false; } public static bool isGrandchildOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((me.GetMother() != null && isChildOf(me.GetMother(), other)) || (me.GetFather() != null && isChildOf(me.GetFather(), other))) { return true; } return false; } public static bool isGrandparentOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if (isGrandchildOf(other, me)) { return true; } return false; } public static bool isNephewOrNieceOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((me.GetMother() != null && (isAnySiblingOf(other, me.GetMother()))) || (me.GetFather() != null && (isAnySiblingOf(other, me.GetFather())))) { return true; } return false; } public static bool isUncleOrAuntOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if (isNephewOrNieceOf(other, me)) { return true; } return false; } public static bool isCousinOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((other.GetMother() != null && isNephewOrNieceOf(me, other.GetMother())) || (other.GetFather() != null && isNephewOrNieceOf(me, other.GetFather()))) { return true; } return false; } public static bool isGreatGrandparentOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } return isGreatGrandChildOf(other, me); } public static bool isGreatGrandChildOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((me.GetMother() != null && isGrandchildOf(me.GetMother(), other)) || (me.GetFather() != null && isGrandchildOf(me.GetFather(), other))) { return true; } return false; } public static bool isGreatUncleOrAuntOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } return isGrandnephewOrGrandnieceOf(other, me); } public static bool isGrandnephewOrGrandnieceOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((me.GetMother() != null && isUncleOrAuntOf(other, me.GetMother())) || (me.GetFather() != null && isUncleOrAuntOf(other, me.GetFather()))) { return true; } return false; } public static bool isCousinOnceRemovedOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } if ((other.GetMother() != null && isCousinOf(me, other.GetMother())) || (other.GetFather() != null && isCousinOf(me, other.GetFather()))) { return true; } if ((other.GetMother() != null && isGrandnephewOrGrandnieceOf(me, other.GetMother())) || (other.GetFather() != null && isGrandnephewOrGrandnieceOf(me, other.GetFather()))) { return true; } return false; } public static bool isSecondCousinOf(Pawn me, Pawn other) { if (me == null || me == other) { return false; } PawnRelationWorker worker = PawnRelationDefOf.GranduncleOrGrandaunt.Worker; Pawn mother = other.GetMother(); if (mother != null && ((mother.GetMother() != null && isGrandnephewOrGrandnieceOf(me, mother.GetMother())) || (mother.GetFather() != null && isGrandnephewOrGrandnieceOf(me, mother.GetFather())))) { return true; } Pawn father = other.GetFather(); if (father != null && ((father.GetMother() != null && isGrandnephewOrGrandnieceOf(me, father.GetMother())) || (father.GetFather() != null && isGrandnephewOrGrandnieceOf(me, father.GetFather())))) { return true; } return false; } } }
jojo1541/rjw
1.3/Source/Relations/RelationChecker.cs
C#
mit
5,373
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}</ProjectGuid> <OutputType>Library</OutputType> <NoStandardLibraries>false</NoStandardLibraries> <AssemblyName>RJW</AssemblyName> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile /> <ShouldCreateLogs>True</ShouldCreateLogs> <AdvancedSettingsExpanded>True</AdvancedSettingsExpanded> <UpdateAssemblyVersion>True</UpdateAssemblyVersion> <UpdateAssemblyFileVersion>True</UpdateAssemblyFileVersion> <UpdateAssemblyInfoVersion>True</UpdateAssemblyInfoVersion> <AssemblyVersionSettings>None.None.IncrementOnDemand.Increment</AssemblyVersionSettings> <AssemblyFileVersionSettings>None.None.IncrementOnDemand.None</AssemblyFileVersionSettings> <AssemblyInfoVersionSettings>None.None.IncrementOnDemand.None</AssemblyInfoVersionSettings> <PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType> <AssemblyVersion>1.6.0.493</AssemblyVersion> <LangVersion>8</LangVersion> <NuGetPackageImportStamp> </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\Assemblies\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <FileAlignment>4096</FileAlignment> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> <Optimize>true</Optimize> <OutputPath>..\Assemblies\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <LangVersion>latest</LangVersion> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup> <RootNamespace>rjw</RootNamespace> </PropertyGroup> <ItemGroup> <Compile Include="Common\Data\AgeConfigDef.cs" /> <Compile Include="Common\Helpers\AfterSexUtility.cs" /> <Compile Include="Common\Helpers\Bed_Utility.cs" /> <Compile Include="Common\Helpers\CasualSex_Helper.cs" /> <Compile Include="Common\Helpers\Pather_Utility.cs" /> <Compile Include="Common\RMB\RMB_Sex.cs" /> <Compile Include="Common\RMB\RMB_Masturbate.cs" /> <Compile Include="Common\RMB\RMB_Menu2.cs" /> <Compile Include="Common\RMB\RMB_Rape.cs" /> <Compile Include="Common\RMB\RMB_Socialize.cs" /> <Compile Include="Common\SexGizmo.cs" /> <Compile Include="Comps\CompRJWHatcher.cs" /> <Compile Include="Comps\CompRJWProperties_Hatcher.cs" /> <Compile Include="Common\Helpers\CondomUtility.cs" /> <Compile Include="Common\Data\DesignatorsData.cs" /> <Compile Include="Common\Data\PartStagesDef.cs" /> <Compile Include="Common\Data\RaceGroupDef.cs" /> <Compile Include="Common\Data\RaceTag.cs" /> <Compile Include="Common\Data\RacePartDef.cs" /> <Compile Include="Common\Data\PawnData.cs" /> <Compile Include="Common\Helpers\HediffHelper.cs" /> <Compile Include="Common\Helpers\LegacySexPartAdder.cs" /> <Compile Include="Common\Helpers\RacePartDef_Helper.cs" /> <Compile Include="Common\Helpers\RaceGroupDef_Helper.cs" /> <Compile Include="Common\Helpers\Sexualizer.cs" /> <Compile Include="Common\Helpers\SexPartAdder.cs" /> <Compile Include="Common\ModLog.cs" /> <Compile Include="Common\Logger.cs" /> <Compile Include="Common\MapCom_Injector.cs" /> <Compile Include="Common\PawnExtensions.cs" /> <Compile Include="Common\SexAppraiser.cs" /> <Compile Include="Common\SexPartTypeExtensions.cs" /> <Compile Include="Common\SexPartType.cs" /> <Compile Include="Common\TraitComparer.cs" /> <Compile Include="Comps\CompRJWHediffBodyPart.cs" /> <Compile Include="Comps\CompRJWThingBodyPart.cs" /> <Compile Include="Comps\Orientation.cs" /> <Compile Include="Common\Helpers\OviHelper.cs" /> <Compile Include="Comps\QuirkAdder.cs" /> <Compile Include="Comps\SexProps.cs" /> <Compile Include="Comps\Quirk.cs" /> <Compile Include="Designators\Breeder.cs" /> <Compile Include="Designators\Breedee.cs" /> <Compile Include="Designators\Comfort.cs" /> <Compile Include="Designators\Hero.cs" /> <Compile Include="Designators\Milking.cs" /> <Compile Include="Designators\Utility.cs" /> <Compile Include="Designators\Service.cs" /> <Compile Include="Harmony\DesignatorsUnset.cs" /> <Compile Include="Harmony\Patch_GenSpawn.cs" /> <Compile Include="Harmony\patch_meditate.cs" /> <Compile Include="Harmony\Patch_PawnGenerator.cs" /> <Compile Include="Harmony\Patch_PawnUtility.cs" /> <Compile Include="Harmony\patch_recipes.cs" /> <Compile Include="Harmony\patch_selector.cs" /> <Compile Include="Harmony\patch_AddSexGizmo.cs" /> <Compile Include="Harmony\patch_StockGenerator_BuyExpensiveSimple.cs" /> <Compile Include="Harmony\patch_surgery.cs" /> <Compile Include="Harmony\patch_ui_hero.cs" /> <Compile Include="Harmony\patch_ui_rjw_buttons.cs" /> <Compile Include="Harmony\patch_wordoflove.cs" /> <Compile Include="Hediffs\HediffDef_PartBase.cs" /> <Compile Include="Hediffs\Hediff_PartBaseNatural.cs" /> <Compile Include="Hediffs\Hediff_PartBaseArtifical.cs" /> <Compile Include="Hediffs\Hediff_PartsSizeChanger.cs" /> <Compile Include="Hediffs\PartAdder.cs" /> <Compile Include="Hediffs\PartProps.cs" /> <Compile Include="Hediffs\PartSizeExtension.cs" /> <Compile Include="Interactions\InteractionExtension.cs" /> <Compile Include="JobDrivers\JobDriver_Knotted.cs" /> <Compile Include="JobDrivers\JobDriver_Mating.cs" /> <Compile Include="JobDrivers\JobDriver_SexQuick.cs" /> <Compile Include="JobDrivers\JobDriver_SexBaseInitiator.cs" /> <Compile Include="JobDrivers\JobDriver_SexBaseReciever.cs" /> <Compile Include="JobDrivers\JobDriver_Sex.cs" /> <Compile Include="JobGivers\JobGiver_LayEgg.cs" /> <Compile Include="JobGivers\JobGiver_DoQuickie.cs" /> <Compile Include="Modules\Androids\AndroidsCompatibility.cs" /> <Compile Include="Modules\Bondage\bondage_gear.cs" /> <Compile Include="Common\Helpers\Breeder_Helper.cs" /> <Compile Include="Modules\Genitals\Enums\Gender.cs" /> <Compile Include="Modules\Genitals\Enums\GenitalFamily.cs" /> <Compile Include="Modules\Genitals\Enums\GenitalTag.cs" /> <Compile Include="Modules\Genitals\Helpers\GenderHelper.cs" /> <Compile Include="Modules\Interactions\Contexts\SpecificInteractionInputs.cs" /> <Compile Include="Modules\Interactions\Exposable\HediffWithExtensionExposable.cs" /> <Compile Include="Modules\Interactions\Exposable\InteractionExposable.cs" /> <Compile Include="Modules\Interactions\Exposable\InteractionPawnExposable.cs" /> <Compile Include="Modules\Interactions\Exposable\InteractionWithExtensionExposable.cs" /> <Compile Include="Modules\Interactions\Exposable\RJWLewdablePartExposable.cs" /> <Compile Include="Modules\Interactions\Exposable\VanillaLewdablePartExposable.cs" /> <Compile Include="Modules\Interactions\Helpers\InteractionHelper.cs" /> <Compile Include="Modules\Interactions\Helpers\PartHelper.cs" /> <Compile Include="Modules\Interactions\ICustomRequirementHandler.cs" /> <Compile Include="Modules\Interactions\ISpecificLewdInteractionService.cs" /> <Compile Include="Modules\Interactions\ILewdInteractionValidatorService.cs" /> <Compile Include="Modules\Interactions\Implementation\SpecificLewdInteractionService.cs" /> <Compile Include="Modules\Interactions\Implementation\LewdInteractionValidatorService.cs" /> <Compile Include="Modules\Interactions\InteractionLogProvider.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\PartSelectorService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\RulePackService.cs" /> <Compile Include="Modules\Interactions\Internals\IPartSelectorService.cs" /> <Compile Include="Modules\Interactions\Internals\IRulePackService.cs" /> <Compile Include="Modules\Interactions\Objects\LewdablePartComparer.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\MasturbationInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\MechImplantInteractionRule.cs" /> <Compile Include="Modules\Nymphs\Implementation\NymphService.cs" /> <Compile Include="Modules\Nymphs\Incidents\IncidentWorker_BaseNymphRaid.cs" /> <Compile Include="Modules\Nymphs\Incidents\IncidentWorker_NymphJoin.cs" /> <Compile Include="Modules\Nymphs\Incidents\IncidentWorker_NymphRaidEasy.cs" /> <Compile Include="Modules\Nymphs\Incidents\IncidentWorker_NymphRaidHard.cs" /> <Compile Include="Modules\Nymphs\Incidents\IncidentWorker_NymphVisitor.cs" /> <Compile Include="Modules\Interactions\Enums\GenitalFamily.cs" /> <Compile Include="Modules\Interactions\Enums\GenitalTag.cs" /> <Compile Include="Modules\Interactions\Enums\InteractionTag.cs" /> <Compile Include="Modules\Interactions\Extensions\GenitalFamilyExtension.cs" /> <Compile Include="Modules\Interactions\Internals\IBlockedPartDetectorService.cs" /> <Compile Include="Modules\Interactions\Internals\IInteractionBuilderService.cs" /> <Compile Include="Modules\Interactions\IInteractionRequirementService.cs" /> <Compile Include="Modules\Interactions\Internals\IInteractionScoringService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\BlockedPartDetectorService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\InteractionBuilderService.cs" /> <Compile Include="Modules\Interactions\Implementation\InteractionRequirementService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\InteractionScoringService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\PartFinderService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\PartPreferenceDetectorService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\InteractionSelectorService.cs" /> <Compile Include="Modules\Interactions\Internals\IPartFinderService.cs" /> <Compile Include="Modules\Interactions\Internals\IPartPreferenceDetectorService.cs" /> <Compile Include="Modules\Interactions\Objects\InteractionScore.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\IInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\NecrophiliaInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\AnimalInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\BestialityInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\WhoringInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\RapeInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\InteractionRules\Implementation\ConsensualInteractionRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\WhoringPartKindUsageRule.cs" /> <Compile Include="Modules\Nymphs\INymphService.cs" /> <Compile Include="Modules\Nymphs\NymphLogProvider.cs" /> <Compile Include="Modules\Shared\Extensions\PawnExtensions.cs" /> <Compile Include="Modules\Shared\Helpers\AgeHelper.cs" /> <Compile Include="Modules\Shared\Implementation\PawnStateService.cs" /> <Compile Include="Modules\Shared\IPawnStateService.cs" /> <Compile Include="Modules\Shared\Logs\ILog.cs" /> <Compile Include="Modules\Shared\Logs\ILogProvider.cs" /> <Compile Include="Modules\Shared\Logs\LogManager.cs" /> <Compile Include="Modules\Shared\Multipliers.cs" /> <Compile Include="Modules\Interactions\Contexts\InteractionContext.cs" /> <Compile Include="Modules\Interactions\DefModExtensions\GenitalPartExtension.cs" /> <Compile Include="Modules\Interactions\DefModExtensions\InteractionSelectorExtension.cs" /> <Compile Include="Modules\Interactions\Defs\InteractionDefOf.cs" /> <Compile Include="Modules\Interactions\Enums\InteractionType.cs" /> <Compile Include="Modules\Interactions\Enums\LewdablePartKind.cs" /> <Compile Include="Modules\Shared\Enums\PawnState.cs" /> <Compile Include="Modules\Interactions\Extensions\InteractionWithExtensions.cs" /> <Compile Include="Modules\Interactions\ILewdInteractionService.cs" /> <Compile Include="Modules\Interactions\Implementation\LewdInteractionService.cs" /> <Compile Include="Modules\Interactions\Internals\IInteractionTypeDetectorService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\InteractionTypeDetectorService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\ReverseDetectorService.cs" /> <Compile Include="Modules\Interactions\Internals\IReverseDetectorService.cs" /> <Compile Include="Modules\Interactions\Objects\Parts\ILewdablePart.cs" /> <Compile Include="Modules\Interactions\Objects\Interaction.cs" /> <Compile Include="Modules\Interactions\Objects\Parts\RJWLewdablePart.cs" /> <Compile Include="Modules\Interactions\Objects\Parts\VanillaLewdablePart.cs" /> <Compile Include="Modules\Interactions\Rules\PartBlockedRules\Implementation\DownedPartBlockedRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartBlockedRules\Implementation\UnconsciousPartBlockedRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartBlockedRules\Implementation\DeadPartBlockedRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartBlockedRules\Implementation\PartAvailibilityPartBlockedRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\QuirksPartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\AnimalPartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\BestialityPartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\BestialityForZoophilePartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\BigBreastsPartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\PawnAlreadySatisfiedPartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\MainPartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\RapePartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\Implementation\SizeDifferencePartKindUsageRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartPreferenceRules\IPartKindUsageRule.cs" /> <Compile Include="Modules\Shared\Comparers\StringComparer_IgnoreCase.cs" /> <Compile Include="Modules\Shared\Extensions\BodyPartRecordExtension.cs" /> <Compile Include="Modules\Interactions\Extensions\EnumerableExtensions.cs" /> <Compile Include="Modules\Interactions\Extensions\HediffWithGenitalPartExtentions.cs" /> <Compile Include="Modules\Interactions\Extensions\PawnExtensions.cs" /> <Compile Include="Modules\Interactions\Internals\IInteractionSelectorService.cs" /> <Compile Include="Modules\Interactions\Internals\Implementation\InteractionRepository.cs" /> <Compile Include="Modules\Interactions\Internals\IInteractionRepository.cs" /> <Compile Include="Modules\Interactions\Objects\InteractionWithExtension.cs" /> <Compile Include="Modules\Interactions\Objects\HediffWithExtension.cs" /> <Compile Include="Modules\Interactions\Defs\DefFragment\InteractionRequirement.cs" /> <Compile Include="Modules\Interactions\Objects\InteractionPawn.cs" /> <Compile Include="Modules\Interactions\Rules\PartBlockedRules\Implementation\MainPartBlockedRule.cs" /> <Compile Include="Modules\Interactions\Rules\PartBlockedRules\IPartBlockedRule.cs" /> <Compile Include="Modules\Multiplayer\Multiplayer.cs" /> <Compile Include="Modules\Nymphs\JobGivers\JobGiver_NymphSapper.cs" /> <Compile Include="Modules\Nymphs\Pawns\Nymph_Backstories.cs" /> <Compile Include="Modules\Nymphs\Pawns\Nymph_Generator.cs" /> <Compile Include="Modules\Pregnancy\BackstoryDef.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\RJWAssociatedHediffAttribute.cs" /> <Compile Include="Modules\Interactions\Contexts\InteractionInputs.cs" /> <Compile Include="Modules\Interactions\Contexts\InteractionInternals.cs" /> <Compile Include="Modules\Interactions\Contexts\InteractionOutputs.cs" /> <Compile Include="Modules\Interactions\Objects\SexablePawnParts.cs" /> <Compile Include="Modules\Shared\Helpers\RandomHelper.cs" /> <Compile Include="Modules\Quirks\Implementation\QuirkService.cs" /> <Compile Include="Modules\Quirks\IQuirkService.cs" /> <Compile Include="Modules\Quirks\Quirks.cs" /> <Compile Include="Modules\Shared\Weighted.cs" /> <Compile Include="Relations\HumanlikeBloodRelationWorkers.cs" /> <Compile Include="Relations\BeastPawnRelationWorkers.cs" /> <Compile Include="Relations\RelationChecker.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnCheckbox.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnWorker_BreedAnimal.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnWorker_BreederAnimal.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnWorker_Comfort.cs" /> <Compile Include="RJWTab\DefModExtensions\RJW_PawnTable.cs" /> <Compile Include="RJWTab\Icons\PawnColumnWorker_IsBreeder.cs" /> <Compile Include="RJWTab\Icons\PawnColumnWorker_IsComfort.cs" /> <Compile Include="RJWTab\Icons\PawnColumnWorker_IsPrisoner.cs" /> <Compile Include="RJWTab\Icons\PawnColumnWorker_IsSlave.cs" /> <Compile Include="RJWTab\Icons\PawnColumnWorker_RJWGender.cs" /> <Compile Include="RJWTab\MainTabWindow.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnWorker_BreedHumanlike.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnWorker_Hero.cs" /> <Compile Include="RJWTab\Checkboxes\PawnColumnWorker_Whore.cs" /> <Compile Include="RJWTab\PawnColumnWorker_TextCenter.cs" /> <Compile Include="RJWTab\PawnTable_Animals.cs" /> <Compile Include="RJWTab\PawnTable_Humanlikes.cs" /> <Compile Include="RJWTab\Checkboxes\DesignatorCheckbox.cs" /> <Compile Include="Settings\config.cs" /> <Compile Include="Common\CORE_EXPOSED\CORE_EXPOSED.cs" /> <Compile Include="Common\Data\DataStore.cs" /> <Compile Include="Common\Helpers\Gender_Helper.cs" /> <Compile Include="Common\Helpers\Genital_Helper.cs" /> <Compile Include="Common\MiscTranslationDef.cs" /> <Compile Include="Common\Data\ModData.cs" /> <Compile Include="Modules\Pregnancy\Pregnancy_Helper.cs" /> <Compile Include="Common\Helpers\SexUtility.cs" /> <Compile Include="Common\Data\StringListDef.cs" /> <Compile Include="Common\Unprivater.cs" /> <Compile Include="Common\xxx.cs" /> <Compile Include="Comps\CompAdder.cs" /> <Compile Include="Modules\Bondage\Comps\CompBondageGear.cs" /> <Compile Include="Modules\Bondage\Comps\CompGetBondageGear.cs" /> <Compile Include="Modules\Bondage\Comps\CompHoloCryptoStamped.cs" /> <Compile Include="Comps\CompProperties.cs" /> <Compile Include="Comps\CompRJW.cs" /> <Compile Include="Modules\Bondage\Comps\CompStampedApparelKey.cs" /> <Compile Include="Modules\Bondage\Comps\CompUnlockBondageGear.cs" /> <Compile Include="Designators\_RJWdesignationsWidget.cs" /> <Compile Include="Harmony\First.cs" /> <Compile Include="Harmony\patch_ABF.cs" /> <Compile Include="Harmony\patch_bondage_gear.cs" /> <Compile Include="Harmony\patch_lovin.cs" /> <Compile Include="Harmony\patch_pregnancy.cs" /> <Compile Include="Harmony\SexualityCard.cs" /> <Compile Include="Harmony\SexualityCardInternal.cs" /> <Compile Include="Hediffs\HediffComp_FeelingBroken.cs" /> <Compile Include="Hediffs\Hediff_Cocoon.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\HediffDef_EnemyImplants.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_InsectEggPregnancy.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_MCEvents.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_MechanoidPregnancy.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_MechImplants.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\HeDiff_MicroComputer.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_ParasitePregnancy.cs" /> <Compile Include="Hediffs\Hediff_Submitting.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_BasePregnancy.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_BestialPregnancy.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_HumanlikePregnancy.cs" /> <Compile Include="Modules\Pregnancy\Hediffs\Hediff_SimpleBaby.cs" /> <Compile Include="Interactions\InteractionWorker_SexAttempt.cs" /> <Compile Include="JobDrivers\JobDriver_BestialityForMale.cs" /> <Compile Include="JobDrivers\JobDriver_BestialityForFemale.cs" /> <Compile Include="JobDrivers\JobDriver_Breeding.cs" /> <Compile Include="JobDrivers\JobDriver_SexBaseRecieverLoved.cs" /> <Compile Include="JobDrivers\JobDriver_SexBaseRecieverRaped.cs" /> <Compile Include="JobDrivers\JobDriver_SexCasual.cs" /> <Compile Include="JobDrivers\JobDriver_Masturbate.cs" /> <Compile Include="JobDrivers\JobDriver_RapeEnemyByHumanlike.cs" /> <Compile Include="JobDrivers\JobDriver_RapeComfortPawn.cs" /> <Compile Include="JobDrivers\JobDriver_RapeRandom.cs" /> <Compile Include="JobDrivers\JobDriver_Rape.cs" /> <Compile Include="JobDrivers\JobDriver_RapeEnemy.cs" /> <Compile Include="JobDrivers\JobDriver_RapeEnemyByAnimal.cs" /> <Compile Include="JobDrivers\JobDriver_RapeEnemyByInsect.cs" /> <Compile Include="JobDrivers\JobDriver_RapeEnemyByMech.cs" /> <Compile Include="JobDrivers\JobDriver_RapeEnemyToParasite.cs" /> <Compile Include="Modules\Bondage\JobDrivers\JobDriver_StruggleInBondageGear.cs" /> <Compile Include="Modules\Bondage\JobDrivers\JobDriver_UseItemOn.cs" /> <Compile Include="JobDrivers\JobDriver_RapeCorpse.cs" /> <Compile Include="JobGivers\JobGiver_AIRapePrisoner.cs" /> <Compile Include="JobGivers\JobGiver_Bestiality.cs" /> <Compile Include="JobGivers\JobGiver_Breed.cs" /> <Compile Include="JobGivers\JobGiver_ComfortPrisonerRape.cs" /> <Compile Include="JobGivers\JobGiver_Masturbate.cs" /> <Compile Include="JobGivers\JobGiver_JoinInBed.cs" /> <Compile Include="JobGivers\JobGiver_RandomRape.cs" /> <Compile Include="JobGivers\JobGiver_RapeEnemy.cs" /> <Compile Include="JobGivers\JobGiver_ViolateCorpse.cs" /> <Compile Include="MentalStates\MentalState_RandomRape.cs" /> <Compile Include="MentalStates\SexualMentalState.cs" /> <Compile Include="Needs\Need_Sex.cs" /> <Compile Include="PawnCapacities\BodyPartTagDefOf.cs" /> <Compile Include="PawnCapacities\PawnCapacityWorker_Fertility.cs" /> <Compile Include="Recipes\Install_Part\Recipe_InstallPart.cs" /> <Compile Include="Modules\Pregnancy\Recipes\Recipe_Abortion.cs" /> <Compile Include="Modules\Bondage\Recipes\Recipe_ChastityBelt.cs" /> <Compile Include="Modules\Pregnancy\Recipes\Recipe_ClaimChild.cs" /> <Compile Include="Modules\Pregnancy\Recipes\Recipe_DeterminePregnancy.cs" /> <Compile Include="Modules\Bondage\Recipes\Recipe_ForceOffGear.cs" /> <Compile Include="Modules\Pregnancy\Recipes\Recipe_InstallIUD.cs" /> <Compile Include="Modules\Pregnancy\Recipes\Recipe_PregnancyHackMech.cs" /> <Compile Include="Modules\Pregnancy\Recipes\Recipe_Sterilize.cs" /> <Compile Include="Recipes\Recipe_Restraints.cs" /> <Compile Include="Recipes\Remove_Part\Recipe_RemoveAnus.cs" /> <Compile Include="Recipes\Remove_Part\Recipe_RemoveBreasts.cs" /> <Compile Include="Recipes\Remove_Part\Recipe_RemoveGenitals.cs" /> <Compile Include="Recipes\Remove_Part\Recipe_RemovePart.cs" /> <Compile Include="Recipes\Remove_Part\Recipe_RemoveUdder.cs" /> <Compile Include="Recipes\Transgender\Recipe_MakeFuta.cs" /> <Compile Include="Settings\RJWDebugSettings.cs" /> <Compile Include="Settings\RJWHookupSettings.cs" /> <Compile Include="Settings\RJWPregnancySettings.cs" /> <Compile Include="Settings\RJWSettings.cs" /> <Compile Include="Settings\RJWSettingsController.cs" /> <Compile Include="Settings\RJWSexSettings.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ChancePerHour_Bestiality.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ChancePerHour_Breed.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ChancePerHour_Fappin.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ChancePerHour_Necro.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ChancePerHour_RapeCP.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalBestiality.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalCanBreed.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalCanRapeCP.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalFrustrated.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalHorny.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalHornyOrFrustrated.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalMate.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalNecro.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalNympho.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalRapist.cs" /> <Compile Include="ThinkTreeNodes\ThinkNode_ConditionalSexChecks.cs" /> <Compile Include="Modules\Bondage\Thoughts\ThoughtWorker_Bound.cs" /> <Compile Include="Thoughts\ThoughtWorker_FeelingBroken.cs" /> <Compile Include="Thoughts\ThoughtWorker_NeedSex.cs" /> <Compile Include="Thoughts\ThoughtWorker_SexChange.cs" /> <Compile Include="Triggers\Trigger_SexSatisfy.cs" /> <Compile Include="Settings\Settings.cs" /> <Compile Include="WorkGivers\WorkGiver_Sexchecks.cs" /> <!-- the dream: rm -rf $UNUSED_FILES; <Compile Include="**.cs" /> --> </ItemGroup> <ItemGroup> <Reference Include="0Harmony"> <HintPath>0trash\packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll</HintPath> <HintPath Condition="Exists('0trash\packages\Lib.Harmony.2.2.0\lib\net472\')">0trash\packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll</HintPath> <HintPath Condition="Exists('$(RIMWORLD)\..\..\workshop\content\294100\2009463077\')">$(RIMWORLD)\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="0MultiplayerAPI, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>0trash\packages\RimWorld.MultiplayerAPI.0.3.0\lib\net472\0MultiplayerAPI.dll</HintPath> </Reference> <Reference Include="HugsLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath Condition="Exists('0trash\packages\UnlimitedHugs.Rimworld.HugsLib.9.0.0\lib\net472\')">0trash\packages\UnlimitedHugs.Rimworld.HugsLib.9.0.0\lib\net472\HugsLib.dll</HintPath> <HintPath Condition="Exists('$(RIMWORLD)\..\..\workshop\content\294100\818773962\')">$(RIMWORLD)\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="Psychology"> <HintPath>0trash\modpackages\Psychology.2018-11-18\Assemblies\Psychology.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="RimWorldChildren"> <HintPath>0trash\modpackages\ChildrenAndPregnancy.0.4e\Assemblies\RimWorldChildren.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="SyrTraits"> <HintPath>0trash\modpackages\SYR.Individuality.1.1.7\1.1\Assemblies\SyrTraits.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="System" /> <Reference Include="System.Runtime.InteropServices.RuntimeInformation" /> <!-- RimWorld references --> <Reference Include="Assembly-CSharp"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/Assembly-CSharp.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/Assembly-CSharp.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/Assembly-CSharp.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="ISharpZipLib"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/ISharpZipLib.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\ISharpZipLib.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\ISharpZipLib.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/ISharpZipLib.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/ISharpZipLib.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\ISharpZipLib.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="Unity.TextMeshPro"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/Unity.TextMeshPro.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\Unity.TextMeshPro.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Unity.TextMeshPro.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/Unity.TextMeshPro.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/Unity.TextMeshPro.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\Unity.TextMeshPro.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.AIModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.AIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.AIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.AIModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.AIModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.AIModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.AIModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ARModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ARModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ARModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ARModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ARModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ARModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ARModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.AccessibilityModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.AccessibilityModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.AccessibilityModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.AccessibilityModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.AccessibilityModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.AccessibilityModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.AccessibilityModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.AndroidJNIModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.AndroidJNIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.AndroidJNIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.AndroidJNIModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.AndroidJNIModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.AndroidJNIModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.AndroidJNIModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.AnimationModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.AnimationModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.AnimationModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.AnimationModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.AnimationModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.AnimationModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.AnimationModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.AssetBundleModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.AssetBundleModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.AssetBundleModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.AssetBundleModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.AudioModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.AudioModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.AudioModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.AudioModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.AudioModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.AudioModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.AudioModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ClothModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ClothModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ClothModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ClothModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ClothModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ClothModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ClothModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ClusterInputModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ClusterInputModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ClusterInputModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ClusterInputModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ClusterInputModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ClusterInputModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ClusterInputModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ClusterRendererModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ClusterRendererModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ClusterRendererModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ClusterRendererModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ClusterRendererModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ClusterRendererModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ClusterRendererModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.CoreModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.CoreModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.CoreModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.CoreModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.CrashReportingModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.CrashReportingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CrashReportingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CrashReportingModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.CrashReportingModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.CrashReportingModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.CrashReportingModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.DSPGraphModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.DSPGraphModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.DSPGraphModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.DSPGraphModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.DSPGraphModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.DSPGraphModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.DSPGraphModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.DirectorModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.DirectorModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.DirectorModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.DirectorModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.DirectorModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.DirectorModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.DirectorModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.GameCenterModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.GameCenterModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.GameCenterModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.GameCenterModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.GameCenterModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.GameCenterModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.GameCenterModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.GridModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.GridModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.GridModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.GridModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.GridModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.GridModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.GridModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.HotReloadModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.HotReloadModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.HotReloadModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.HotReloadModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.HotReloadModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.HotReloadModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.HotReloadModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.IMGUIModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.IMGUIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.IMGUIModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.IMGUIModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ImageConversionModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ImageConversionModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ImageConversionModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ImageConversionModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.InputLegacyModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.InputLegacyModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.InputLegacyModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.InputLegacyModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.InputModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.InputModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.InputModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.InputModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.InputModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.InputModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.InputModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.JSONSerializeModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.JSONSerializeModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.JSONSerializeModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.JSONSerializeModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.LocalizationModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.LocalizationModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.LocalizationModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.LocalizationModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.LocalizationModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.LocalizationModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.LocalizationModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ParticleSystemModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ParticleSystemModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ParticleSystemModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ParticleSystemModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ParticleSystemModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ParticleSystemModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ParticleSystemModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.PerformanceReportingModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.PerformanceReportingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.PerformanceReportingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.PerformanceReportingModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.PerformanceReportingModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.PerformanceReportingModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.PerformanceReportingModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.Physics2DModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.Physics2DModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.Physics2DModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.Physics2DModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.PhysicsModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.PhysicsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.PhysicsModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.PhysicsModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ProfilerModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ProfilerModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ProfilerModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ProfilerModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ProfilerModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ProfilerModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ProfilerModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.ScreenCaptureModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.ScreenCaptureModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.ScreenCaptureModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.ScreenCaptureModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.ScreenCaptureModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.ScreenCaptureModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.ScreenCaptureModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.SharedInternalsModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.SharedInternalsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.SharedInternalsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.SharedInternalsModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.SharedInternalsModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.SharedInternalsModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.SharedInternalsModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.SpriteMaskModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.SpriteMaskModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.SpriteMaskModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.SpriteMaskModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.SpriteMaskModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.SpriteMaskModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.SpriteMaskModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.SpriteShapeModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.SpriteShapeModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.SpriteShapeModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.SpriteShapeModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.StreamingModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.StreamingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.StreamingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.StreamingModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.StreamingModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.StreamingModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.StreamingModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.SubstanceModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.SubstanceModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.SubstanceModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.SubstanceModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.SubstanceModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.SubstanceModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.SubstanceModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.TLSModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.TLSModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.TLSModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TLSModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.TLSModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.TLSModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.TLSModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.TerrainModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.TerrainModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.TerrainModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TerrainModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.TerrainModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.TerrainModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.TerrainModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.TerrainPhysicsModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.TerrainPhysicsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.TerrainPhysicsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TerrainPhysicsModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.TerrainPhysicsModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.TerrainPhysicsModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.TerrainPhysicsModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.TextCoreModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.TextCoreModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.TextCoreModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TextCoreModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.TextCoreModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.TextCoreModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.TextCoreModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.TextRenderingModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.TextRenderingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.TextRenderingModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.TextRenderingModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.TilemapModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.TilemapModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.TilemapModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.TilemapModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.TilemapModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.TilemapModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.TilemapModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UI"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UI.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UI.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UI.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UI.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UI.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UI.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UIElementsModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UIElementsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UIElementsModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UIElementsModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UIModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UIModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UIModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UIModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UIModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UIModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UNETModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UNETModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UNETModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UNETModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UNETModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UNETModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UNETModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UmbraModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UmbraModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UmbraModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UmbraModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UmbraModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UmbraModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UmbraModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityAnalyticsModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityAnalyticsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityAnalyticsModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityAnalyticsModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityAnalyticsModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityAnalyticsModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityAnalyticsModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityConnectModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityConnectModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityConnectModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityConnectModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityConnectModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityConnectModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityConnectModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityTestProtocolModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityTestProtocolModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityTestProtocolModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityTestProtocolModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityTestProtocolModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityTestProtocolModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityTestProtocolModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityWebRequestAssetBundleModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityWebRequestAudioModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityWebRequestAudioModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityWebRequestAudioModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityWebRequestAudioModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityWebRequestModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityWebRequestModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityWebRequestModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityWebRequestModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityWebRequestTextureModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.UnityWebRequestWWWModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.VFXModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.VFXModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.VFXModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.VFXModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.VFXModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.VFXModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.VFXModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.VRModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.VRModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.VRModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.VRModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.VRModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.VRModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.VRModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.VehiclesModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.VehiclesModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.VehiclesModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.VehiclesModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.VehiclesModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.VehiclesModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.VehiclesModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.VideoModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.VideoModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.VideoModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.VideoModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.VideoModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.VideoModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.VideoModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.WindModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.WindModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.WindModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.WindModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.WindModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.WindModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.WindModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine.XRModule"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.XRModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.XRModule.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.XRModule.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.XRModule.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.XRModule.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.XRModule.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="UnityEngine"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/UnityEngine.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/UnityEngine.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="NAudio"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/NAudio.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\NAudio.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\NAudio.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/NAudio.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/NAudio.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\NAudio.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <Reference Include="NVorbis"> <HintPath Condition="Exists('../../../_RimWorldData/Managed/')">../../../_RimWorldData/Managed/NVorbis.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('..\..\..\..\RimWorldWin64_Data\Managed\')">..\..\..\..\RimWorldWin64_Data\Managed\NVorbis.dll</HintPath> <!-- Custom directory --> <HintPath Condition="Exists('C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\')">C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\NVorbis.dll</HintPath> <!-- Windows Steam install path --> <HintPath Condition="Exists('$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/')">$(HOME)/.steam/steam/SteamApps/common/RimWorld/RimWorldLinux_Data/Managed/NVorbis.dll</HintPath> <!-- Linux Steam install path --> <HintPath Condition="Exists('$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/')">$(HOME)/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/NVorbis.dll</HintPath> <!-- macOS Steam install path --> <HintPath Condition="Exists('$(RIMWORLD)\RimWorldWin64_Data\Managed\')">$(RIMWORLD)\RimWorldWin64_Data\Managed\NVorbis.dll</HintPath> <!-- only works on windows, just define the RIMWORLD environement variable to Rimworld's install folder (Steam only)--> <Private>False</Private> </Reference> <!-- end RimWorld references --> </ItemGroup> <ItemGroup> <None Include="0trash\packages.config" /> </ItemGroup> <ItemGroup /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" /> <ProjectExtensions> <VisualStudio AllowExistingFolder="true" /> </ProjectExtensions> </Project>
jojo1541/rjw
1.3/Source/RimJobWorld.Main.csproj
csproj
mit
137,353
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2024 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RimJobWorld.Main", "RimJobWorld.Main.csproj", "{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Debug|Any CPU.ActiveCfg = Release|Any CPU {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Debug|Any CPU.Build.0 = Release|Any CPU {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Release|Any CPU.ActiveCfg = Release|Any CPU {22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {16BA61E5-4C97-4E73-926D-6718DE8E4776} EndGlobalSection EndGlobal
jojo1541/rjw
1.3/Source/RimJobWorld.Main.sln
sln
mit
1,105
using System; using UnityEngine; using Verse; using System.Collections.Generic; 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(5f); 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("designated_freewill".Translate(), ref RJWSettings.designated_freewill, "designated_freewill_desc".Translate()); listingStandard.Gap(5f); if (listingStandard.ButtonText("Rjw Parts " + RJWSettings.ShowRjwParts)) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("Extended", (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Extended)), new FloatMenuOption("Show", (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Show)), //new FloatMenuOption("Known".Translate(), (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Known)), new FloatMenuOption("Hide", (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Hide)) })); } listingStandard.Gap(30f); GUI.contentColor = Color.yellow; listingStandard.Label("YOU PATHETIC CHEATER "); GUI.contentColor = Color.white; 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("override_control".Translate(), ref RJWSettings.override_control, "override_control_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("AddTrait_Rapist".Translate(), ref RJWSettings.AddTrait_Rapist, "AddTrait_Rapist_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("AddTrait_Masocist".Translate(), ref RJWSettings.AddTrait_Masocist, "AddTrait_Masocist_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("AddTrait_Nymphomaniac".Translate(), ref RJWSettings.AddTrait_Nymphomaniac, "AddTrait_Nymphomaniac_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("AddTrait_Necrophiliac".Translate(), ref RJWSettings.AddTrait_Necrophiliac, "AddTrait_Necrophiliac_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("AddTrait_Nerves".Translate(), ref RJWSettings.AddTrait_Nerves, "AddTrait_Nerves_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("AddTrait_Zoophiliac".Translate(), ref RJWSettings.AddTrait_Zoophiliac, "AddTrait_Zoophiliac_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("Allow_RMB_DeepTalk".Translate(), ref RJWSettings.Allow_RMB_DeepTalk, "Allow_RMB_DeepTalk_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("Disable_bestiality_pregnancy_relations".Translate(), ref RJWSettings.Disable_bestiality_pregnancy_relations, "Disable_bestiality_pregnancy_relations_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("Disable_MeditationFocusDrain".Translate(), ref RJWSettings.Disable_MeditationFocusDrain, "Disable_MeditationFocusDrain_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("Disable_RecreationDrain".Translate(), ref RJWSettings.Disable_RecreationDrain, "Disable_RecreationDrain_desc".Translate()); listingStandard.Gap(5f); listingStandard.NewColumn(); listingStandard.Gap(4f); GUI.contentColor = Color.yellow; listingStandard.CheckboxLabeled("override_lovin".Translate(), ref RJWSettings.override_lovin, "override_lovin_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("override_matin".Translate(), ref RJWSettings.override_matin, "override_matin_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("matin_crossbreed".Translate(), ref RJWSettings.matin_crossbreed, "matin_crossbreed_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DevMode_name".Translate(), ref RJWSettings.DevMode, "DevMode_desc".Translate()); listingStandard.Gap(5f); if (RJWSettings.DevMode) { listingStandard.CheckboxLabeled("WildMode_name".Translate(), ref RJWSettings.WildMode, "WildMode_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("HippieMode_name".Translate(), ref RJWSettings.HippieMode, "HippieMode_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DebugLogJoinInBed".Translate(), ref RJWSettings.DebugLogJoinInBed, "DebugLogJoinInBed_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DebugRape".Translate(), ref RJWSettings.DebugRape, "DebugRape_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DebugInteraction".Translate(), ref RJWSettings.DebugInteraction, "DebugInteraction_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("DebugNymph".Translate(), ref RJWSettings.DebugNymph, "DebugNymph_desc".Translate()); listingStandard.Gap(5f); } else { RJWSettings.DebugLogJoinInBed = false; RJWSettings.DebugRape = false; } listingStandard.CheckboxLabeled("GenderlessAsFuta_name".Translate(), ref RJWSettings.GenderlessAsFuta, "GenderlessAsFuta_desc".Translate()); listingStandard.Gap(5f); GUI.contentColor = Color.white; listingStandard.Gap(30f); listingStandard.Label("maxDistanceCellsCasual_name".Translate() + ": " + (RJWSettings.maxDistanceCellsCasual), -1f, "maxDistanceCellsCasual_desc".Translate()); RJWSettings.maxDistanceCellsCasual = listingStandard.Slider((int)RJWSettings.maxDistanceCellsCasual, 0, 10000); listingStandard.Label("maxDistanceCellsRape_name".Translate() + ": " + (RJWSettings.maxDistanceCellsRape), -1f, "maxDistanceCellsRape_desc".Translate()); RJWSettings.maxDistanceCellsRape = listingStandard.Slider((int)RJWSettings.maxDistanceCellsRape, 0, 10000); listingStandard.Label("maxDistancePathCost_name".Translate() + ": " + (RJWSettings.maxDistancePathCost), -1f, "maxDistancePathCost_desc".Translate()); RJWSettings.maxDistancePathCost = listingStandard.Slider((int)RJWSettings.maxDistancePathCost, 0, 5000); listingStandard.End(); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref RJWSettings.submit_button_enabled, "submit_button_enabled", RJWSettings.submit_button_enabled, true); Scribe_Values.Look(ref RJWSettings.show_RJW_designation_box, "show_RJW_designation_box", RJWSettings.show_RJW_designation_box, true); Scribe_Values.Look(ref RJWSettings.ShowRjwParts, "ShowRjwParts", RJWSettings.ShowRjwParts, true); Scribe_Values.Look(ref RJWSettings.maxDistanceCellsCasual, "maxDistanceCellsCasual", RJWSettings.maxDistanceCellsCasual, true); Scribe_Values.Look(ref RJWSettings.maxDistanceCellsRape, "maxDistanceCellsRape", RJWSettings.maxDistanceCellsRape, true); Scribe_Values.Look(ref RJWSettings.maxDistancePathCost, "maxDistancePathCost", RJWSettings.maxDistancePathCost, true); Scribe_Values.Look(ref RJWSettings.AddTrait_Rapist, "AddTrait_Rapist", RJWSettings.AddTrait_Rapist, true); Scribe_Values.Look(ref RJWSettings.AddTrait_Masocist, "AddTrait_Masocist", RJWSettings.AddTrait_Masocist, true); Scribe_Values.Look(ref RJWSettings.AddTrait_Nymphomaniac, "AddTrait_Nymphomaniac", RJWSettings.AddTrait_Nymphomaniac, true); Scribe_Values.Look(ref RJWSettings.AddTrait_Necrophiliac, "AddTrait_Necrophiliac", RJWSettings.AddTrait_Necrophiliac, true); Scribe_Values.Look(ref RJWSettings.AddTrait_Nerves, "AddTrait_Nerves", RJWSettings.AddTrait_Nerves, true); Scribe_Values.Look(ref RJWSettings.AddTrait_Zoophiliac, "AddTrait_Zoophiliac", RJWSettings.AddTrait_Zoophiliac, true); Scribe_Values.Look(ref RJWSettings.Allow_RMB_DeepTalk, "Allow_RMB_DeepTalk", RJWSettings.Allow_RMB_DeepTalk, true); Scribe_Values.Look(ref RJWSettings.Allow_RMB_DeepTalk, "Allow_RMB_DeepTalk", RJWSettings.Allow_RMB_DeepTalk, true); Scribe_Values.Look(ref RJWSettings.Disable_bestiality_pregnancy_relations, "Disable_bestiality_pregnancy_relations", RJWSettings.Disable_bestiality_pregnancy_relations, true); Scribe_Values.Look(ref RJWSettings.Disable_MeditationFocusDrain, "Disable_MeditationFocusDrain", RJWSettings.Disable_MeditationFocusDrain, true); Scribe_Values.Look(ref RJWSettings.Disable_RecreationDrain, "Disable_RecreationDrain", RJWSettings.Disable_RecreationDrain, true); Scribe_Values.Look(ref RJWSettings.GenderlessAsFuta, "GenderlessAsFuta", RJWSettings.GenderlessAsFuta, true); Scribe_Values.Look(ref RJWSettings.override_lovin, "override_lovin", RJWSettings.override_lovin, true); Scribe_Values.Look(ref RJWSettings.override_matin, "override_matin", RJWSettings.override_matin, true); Scribe_Values.Look(ref RJWSettings.matin_crossbreed, "matin_crossbreed", RJWSettings.matin_crossbreed, true); Scribe_Values.Look(ref RJWSettings.WildMode, "Wildmode", RJWSettings.WildMode, true); Scribe_Values.Look(ref RJWSettings.HippieMode, "Hippiemode", RJWSettings.HippieMode, true); Scribe_Values.Look(ref RJWSettings.override_RJW_designation_checks, "override_RJW_designation_checks", RJWSettings.override_RJW_designation_checks, true); Scribe_Values.Look(ref RJWSettings.override_control, "override_control", RJWSettings.override_control, true); Scribe_Values.Look(ref RJWSettings.DevMode, "DevMode", RJWSettings.DevMode, true); Scribe_Values.Look(ref RJWSettings.DebugLogJoinInBed, "DebugLogJoinInBed", RJWSettings.DebugLogJoinInBed, true); Scribe_Values.Look(ref RJWSettings.DebugRape, "DebugRape", RJWSettings.DebugRape, true); Scribe_Values.Look(ref RJWSettings.DebugInteraction, "DebugInteraction", RJWSettings.DebugInteraction, true); Scribe_Values.Look(ref RJWSettings.DebugNymph, "DebugNymph", RJWSettings.DebugNymph, true); } } }
jojo1541/rjw
1.3/Source/Settings/RJWDebugSettings.cs
C#
mit
10,395
using System; using UnityEngine; using Verse; namespace rjw { public class RJWHookupSettings : ModSettings { public static bool HookupsEnabled = true; public static bool QuickHookupsEnabled = 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 = true; 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()); if(HookupsEnabled) listingStandard.CheckboxLabeled("SettingQuickHookupsEnabled".Translate(), ref QuickHookupsEnabled, "SettingQuickHookupsEnabled_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 SexAppraiser.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"); Scribe_Values.Look(ref QuickHookupsEnabled, "SettingQuickHookupsEnabled"); Scribe_Values.Look(ref NoHookupsDuringWorkHours, "NoHookupsDuringWorkHours"); Scribe_Values.Look(ref ColonistsCanHookup, "SettingColonistsCanHookup"); Scribe_Values.Look(ref ColonistsCanHookupWithVisitor, "SettingColonistsCanHookupWithVisitor"); Scribe_Values.Look(ref VisitorsCanHookupWithColonists, "SettingVisitorsCanHookupWithColonists"); Scribe_Values.Look(ref VisitorsCanHookupWithVisitors, "SettingVisitorsCanHookupWithVisitors"); // Prisoner settings Scribe_Values.Look(ref CanHookupWithPrisoner, "SettingCanHookupWithPrisoner"); Scribe_Values.Look(ref PrisonersCanHookupWithNonPrisoner, "SettingPrisonersCanHookupWithNonPrisoner"); Scribe_Values.Look(ref PrisonersCanHookupWithPrisoner, "SettingPrisonersCanHookupWithPrisoner"); // Nympho settings //Scribe_Values.Look(ref NymphosCanPickAnyone, "SettingNymphosCanPickAnyone"); Scribe_Values.Look(ref NymphosCanCheat, "SettingNymphosCanCheat"); Scribe_Values.Look(ref NymphosCanHomewreck, "SettingNymphosCanHomewreck"); Scribe_Values.Look(ref NymphosCanHomewreckReverse, "SettingNymphosCanHomewreckReverse"); Scribe_Values.Look(ref HookupChanceForNonNymphos, "SettingHookupChanceForNonNymphos"); Scribe_Values.Look(ref MinimumFuckabilityToHookup, "SettingMinimumFuckabilityToHookup"); Scribe_Values.Look(ref MinimumAttractivenessToHookup, "SettingMinimumAttractivenessToHookup"); Scribe_Values.Look(ref MinimumRelationshipToHookup, "SettingMinimumRelationshipToHookup"); } } }
jojo1541/rjw
1.3/Source/Settings/RJWHookupSettings.cs
C#
mit
7,095
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 insect_anal_pregnancy_enabled = false; public static bool insect_oral_pregnancy_enabled = false; public static bool egg_pregnancy_implant_anyone = true; public static bool egg_pregnancy_fertilize_anyone = false; public static float egg_pregnancy_eggs_size = 1.0f; public static bool safer_mechanoid_pregnancy = false; public static bool mechanoid_pregnancy_enabled = true; public static bool use_parent_method = true; public static bool complex_interspecies = false; 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; public static bool phantasy_pregnancy = false; public static float normal_pregnancy_duration = 1.0f; public static float egg_pregnancy_duration = 1.0f; public static float max_num_momtraits_inherited = 3.0f; public static float max_num_poptraits_inherited = 3.0f; private static Vector2 scrollPosition; private static float height_modifier = 300f; public static void DoWindowContents(Rect inRect) { Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f); Rect viewRect = new Rect(0f, 30f, inRect.width - 16f, inRect.height + height_modifier); Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); Listing_Standard listingStandard = new Listing_Standard(); listingStandard.maxOneColumn = true; listingStandard.ColumnWidth = viewRect.width / 2.05f; listingStandard.Begin(viewRect); listingStandard.Gap(4f); listingStandard.CheckboxLabeled("RJWH_pregnancy".Translate(), ref humanlike_pregnancy_enabled, "RJWH_pregnancy_desc".Translate()); 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(5f); listingStandard.CheckboxLabeled("RJWI_analPregnancy".Translate(), ref insect_anal_pregnancy_enabled, "RJWI_analPregnancy_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("RJWI_oralPregnancy".Translate(), ref insect_oral_pregnancy_enabled, "RJWI_oralPregnancy_desc".Translate()); listingStandard.Gap(5f); listingStandard.Gap(5f); int eggs_size = (int)(egg_pregnancy_eggs_size * 100); listingStandard.Label("egg_pregnancy_eggs_size".Translate() + ": " + eggs_size + "%", -1f, "egg_pregnancy_eggs_size_desc".Translate()); egg_pregnancy_eggs_size = listingStandard.Slider(egg_pregnancy_eggs_size, 0.0f, 1.0f); 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.Gap(5f); listingStandard.Label("max_num_momtraits_inherited".Translate() + ": " + (int)(max_num_momtraits_inherited)); max_num_momtraits_inherited = listingStandard.Slider(max_num_momtraits_inherited, 0.0f, 9.0f); listingStandard.Gap(5f); listingStandard.Label("max_num_poptraits_inherited".Translate() + ": " + (int)(max_num_poptraits_inherited)); max_num_poptraits_inherited = listingStandard.Slider(max_num_poptraits_inherited, 0.0f, 9.0f); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("MechanoidImplanting".Translate(), ref mechanoid_pregnancy_enabled, "MechanoidImplanting_desc".Translate()); listingStandard.Gap(5f); if (mechanoid_pregnancy_enabled) { listingStandard.CheckboxLabeled("SaferMechanoidImplanting".Translate(), ref safer_mechanoid_pregnancy, "SaferMechanoidImplanting_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.Gap(10f); listingStandard.CheckboxLabeled("phantasy_pregnancy".Translate(), ref phantasy_pregnancy, "phantasy_pregnancy_desc".Translate()); listingStandard.Gap(5f); listingStandard.Label("normal_pregnancy_duration".Translate() + ": " + (int)(normal_pregnancy_duration * 100) + "%", -1f, "normal_pregnancy_duration_desc".Translate()); normal_pregnancy_duration = listingStandard.Slider(normal_pregnancy_duration, 0.05f, 2.0f); listingStandard.Gap(5f); listingStandard.Label("egg_pregnancy_duration".Translate() + ": " + (int)(egg_pregnancy_duration * 100) + "%", -1f, "egg_pregnancy_duration_desc".Translate()); egg_pregnancy_duration = listingStandard.Slider(egg_pregnancy_duration, 0.05f, 2.0f); listingStandard.Gap(5f); listingStandard.End(); viewRect = new Rect(viewRect.x, viewRect.y, viewRect.width, viewRect.height + listingStandard.CurHeight); Widgets.EndScrollView(); } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref humanlike_pregnancy_enabled, "humanlike_pregnancy_enabled", humanlike_pregnancy_enabled, true); Scribe_Values.Look(ref animal_pregnancy_enabled, "animal_enabled", animal_pregnancy_enabled, true); Scribe_Values.Look(ref bestial_pregnancy_enabled, "bestial_pregnancy_enabled", bestial_pregnancy_enabled, true); Scribe_Values.Look(ref insect_pregnancy_enabled, "insect_pregnancy_enabled", insect_pregnancy_enabled, true); Scribe_Values.Look(ref insect_anal_pregnancy_enabled, "insect_anal_pregnancy_enabled", insect_anal_pregnancy_enabled, true); Scribe_Values.Look(ref insect_oral_pregnancy_enabled, "insect_oral_pregnancy_enabled", insect_oral_pregnancy_enabled, true); Scribe_Values.Look(ref egg_pregnancy_implant_anyone, "egg_pregnancy_implant_anyone", egg_pregnancy_implant_anyone, true); Scribe_Values.Look(ref egg_pregnancy_fertilize_anyone, "egg_pregnancy_fertilize_anyone", egg_pregnancy_fertilize_anyone, true); Scribe_Values.Look(ref egg_pregnancy_eggs_size, "egg_pregnancy_eggs_size", egg_pregnancy_eggs_size, true); Scribe_Values.Look(ref mechanoid_pregnancy_enabled, "mechanoid_enabled", mechanoid_pregnancy_enabled, true); Scribe_Values.Look(ref safer_mechanoid_pregnancy, "safer_mechanoid_pregnancy", safer_mechanoid_pregnancy, true); Scribe_Values.Look(ref use_parent_method, "use_parent_method", use_parent_method, true); Scribe_Values.Look(ref humanlike_DNA_from_mother, "humanlike_DNA_from_mother", humanlike_DNA_from_mother, true); Scribe_Values.Look(ref bestial_DNA_from_mother, "bestial_DNA_from_mother", bestial_DNA_from_mother, true); Scribe_Values.Look(ref bestiality_DNA_inheritance, "bestiality_DNA_inheritance", bestiality_DNA_inheritance, true); Scribe_Values.Look(ref humanlike_impregnation_chance, "humanlike_impregnation_chance", humanlike_impregnation_chance, true); Scribe_Values.Look(ref animal_impregnation_chance, "animal_impregnation_chance", animal_impregnation_chance, true); Scribe_Values.Look(ref interspecies_impregnation_modifier, "interspecies_impregnation_chance", interspecies_impregnation_modifier, true); Scribe_Values.Look(ref complex_interspecies, "complex_interspecies", complex_interspecies, true); Scribe_Values.Look(ref fertility_endage_male, "RJW_fertility_endAge_male", fertility_endage_male, true); Scribe_Values.Look(ref fertility_endage_female_humanlike, "fertility_endage_female_humanlike", fertility_endage_female_humanlike, true); Scribe_Values.Look(ref fertility_endage_female_animal, "fertility_endage_female_animal", fertility_endage_female_animal, true); Scribe_Values.Look(ref phantasy_pregnancy, "phantasy_pregnancy", phantasy_pregnancy, true); Scribe_Values.Look(ref normal_pregnancy_duration, "normal_pregnancy_duration", normal_pregnancy_duration, true); Scribe_Values.Look(ref egg_pregnancy_duration, "egg_pregnancy_duration", egg_pregnancy_duration, true); Scribe_Values.Look(ref max_num_momtraits_inherited, "max_num_momtraits_inherited", max_num_momtraits_inherited, true); Scribe_Values.Look(ref max_num_poptraits_inherited, "max_num_poptraits_inherited", max_num_poptraits_inherited, true); } } }
jojo1541/rjw
1.3/Source/Settings/RJWPregnancySettings.cs
C#
mit
17,273
using System; using UnityEngine; using Verse; namespace rjw { public class RJWSettings : ModSettings { public static bool animal_on_animal_enabled = false; public static bool bestiality_enabled = false; public static bool necrophilia_enabled = false; private static bool overdrive = false; public static bool rape_enabled = false; public static bool designated_freewill = true; public static bool animal_CP_rape = false; public static bool visitor_CP_rape = false; public static bool colonist_CP_rape = false; public static bool rape_beating = false; public static bool gentle_rape_beating = false; public static bool rape_stripping = false; public static bool cum_filth = true; public static bool sounds_enabled = true; public static float sounds_sex_volume = 1.0f; public static float sounds_cum_volume = 1.0f; public static float sounds_voice_volume = 1.0f; public static float sounds_orgasm_volume = 1.0f; public static float sounds_animal_on_animal_volume = 0.5f; public static bool NymphTamed = false; public static bool NymphWild = true; public static bool NymphRaidEasy = false; public static bool NymphRaidHard = false; public static bool NymphRaidRP = false; public static bool NymphPermanentManhunter = false; public static bool NymphSappers = true; public static bool FemaleFuta = false; public static bool MaleTrap = false; 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 bool sex_age_legacymode = false; public static bool sexneed_fix = true; 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 int Animal_mating_cooldown = 0; public static float nonFutaWomenRaping_MaxVulnerability = 0.8f; public static float rapee_MinVulnerability_human = 1.2f; public static bool RPG_hero_control = false; public static bool RPG_hero_control_HC = false; public static bool RPG_hero_control_Ironman = false; public static bool submit_button_enabled = true; public static bool show_RJW_designation_box = false; public static ShowParts ShowRjwParts = ShowParts.Show; public static float maxDistanceCellsCasual = 100; public static float maxDistanceCellsRape = 100; public static float maxDistancePathCost = 1000; public static bool WildMode = false; public static bool HippieMode = false; public static bool override_RJW_designation_checks = false; public static bool override_control = false; public static bool override_lovin = true; public static bool override_matin = true; public static bool matin_crossbreed = false; public static bool GenderlessAsFuta = false; public static bool DevMode = false; public static bool DebugLogJoinInBed = false; public static bool DebugRape = false; public static bool DebugInteraction = false; public static bool DebugNymph = false; public static bool AddTrait_Rapist = true; public static bool AddTrait_Masocist = true; public static bool AddTrait_Nymphomaniac = true; public static bool AddTrait_Necrophiliac = true; public static bool AddTrait_Nerves = true; public static bool AddTrait_Zoophiliac = true; public static bool Allow_RMB_DeepTalk = false; public static bool Disable_bestiality_pregnancy_relations = false; public static bool Disable_MeditationFocusDrain = false; public static bool Disable_RecreationDrain = false; public static bool UseAdvancedAgeScaling = true; private static Vector2 scrollPosition; private static float height_modifier = 300f; public enum ShowParts { Extended, Show, Known, Hide }; public static void DoWindowContents(Rect inRect) { sexneed_decay_rate = Mathf.Clamp(sexneed_decay_rate, 0.0f, 10000.0f); nonFutaWomenRaping_MaxVulnerability = Mathf.Clamp(nonFutaWomenRaping_MaxVulnerability, 0.0f, 3.0f); rapee_MinVulnerability_human = Mathf.Clamp(rapee_MinVulnerability_human, 0.0f, 3.0f); //some cluster fuck code barely working //something like that: //inRect - label, close button //outRect - slider //viewRect - options //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 hidden options toggles Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier); //-16 for slider, height_modifier - additional height for options //Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier); //Log.Message("1 - " + inRect.width); //Log.Message("2 - " + outRect.width); //Log.Message("3 - " + viewRect.width); //GUI.Button(new Rect(10, 10, 200, 20), "Meet the flashing button"); Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); // scroll Listing_Standard listingStandard = new Listing_Standard(); listingStandard.maxOneColumn = true; listingStandard.ColumnWidth = viewRect.width / 2.05f; 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("bestiality_enabled".Translate(), ref bestiality_enabled, "bestiality_enabled_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("necrophilia_enabled".Translate(), ref necrophilia_enabled, "necrophilia_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(" " + "rape_stripping".Translate(), ref rape_stripping, "rape_stripping_desc".Translate()); listingStandard.Gap(3f); listingStandard.CheckboxLabeled(" " + "ColonistCanCP".Translate(), ref colonist_CP_rape, "ColonistCanCP_desc".Translate()); 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()); listingStandard.Gap(3f); listingStandard.CheckboxLabeled(" " + "GentlePrisonersBeating".Translate(), ref gentle_rape_beating, "GentlePrisonersBeating_desc".Translate()); } else { colonist_CP_rape = false; visitor_CP_rape = false; animal_CP_rape = false; rape_beating = false; } listingStandard.Gap(10f); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("cum_filth".Translate(), ref cum_filth, "cum_filth_desc".Translate()); listingStandard.Gap(5f); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("sounds_enabled".Translate(), ref sounds_enabled, "sounds_enabled_desc".Translate()); if (sounds_enabled) { listingStandard.Label("sounds_sex_volume".Translate() + ": " + Math.Round(sounds_sex_volume * 100f, 0) + "%", -1f, "sounds_sex_volume_desc".Translate()); sounds_sex_volume = listingStandard.Slider(sounds_sex_volume, 0f, 2f); listingStandard.Label("sounds_cum_volume".Translate() + ": " + Math.Round(sounds_cum_volume * 100f, 0) + "%", -1f, "sounds_cum_volume_desc".Translate()); sounds_cum_volume = listingStandard.Slider(sounds_cum_volume, 0f, 2f); listingStandard.Label("sounds_voice_volume".Translate() + ": " + Math.Round(sounds_voice_volume * 100f, 0) + "%", -1f, "sounds_voice_volume_desc".Translate()); sounds_voice_volume = listingStandard.Slider(sounds_voice_volume, 0f, 2f); listingStandard.Label("sounds_orgasm_volume".Translate() + ": " + Math.Round(sounds_orgasm_volume * 100f, 0) + "%", -1f, "sounds_orgasm_volume_desc".Translate()); sounds_orgasm_volume = listingStandard.Slider(sounds_orgasm_volume, 0f, 2f); listingStandard.Label("sounds_animal_on_animal_volume".Translate() + ": " + Math.Round(sounds_animal_on_animal_volume * 100f, 0) + "%", -1f, "sounds_animal_on_animal_volume_desc".Translate()); sounds_animal_on_animal_volume = listingStandard.Slider(sounds_animal_on_animal_volume, 0f, 2f); } listingStandard.Gap(10f); 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.Gap(10f); listingStandard.CheckboxLabeled("UseAdvancedAgeScaling".Translate(), ref UseAdvancedAgeScaling, "UseAdvancedAgeScaling_desc".Translate()); 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.Gap(5f); listingStandard.CheckboxLabeled("sexneed_fix_name".Translate(), ref sexneed_fix, "sexneed_fix_desc".Translate()); listingStandard.Gap(5f); listingStandard.Label("Animal_mating_cooldown".Translate() + ": " + Animal_mating_cooldown + "h", -1f, "Animal_mating_cooldown_desc".Translate()); Animal_mating_cooldown = (int)listingStandard.Slider(Animal_mating_cooldown, 0, 100); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("sex_age_legacymode".Translate(), ref sex_age_legacymode, "sex_age_legacymode_desc".Translate()); if (sex_age_legacymode) { 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, 999); } 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("NymphTamed".Translate(), ref NymphTamed, "NymphTamed_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("NymphWild".Translate(), ref NymphWild, "NymphWild_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("NymphRaidEasy".Translate(), ref NymphRaidEasy, "NymphRaidEasy_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("NymphRaidHard".Translate(), ref NymphRaidHard, "NymphRaidHard_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("NymphRaidRP".Translate(), ref NymphRaidRP, "NymphRaidRP_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("NymphPermanentManhunter".Translate(), ref NymphPermanentManhunter, "NymphPermanentManhunter_desc".Translate()); listingStandard.Gap(5f); listingStandard.CheckboxLabeled("NymphSappers".Translate(), ref NymphSappers, "NymphSappers_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()); 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.End(); Widgets.EndScrollView(); //height_modifier = listingStandard.CurHeight; } public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref animal_on_animal_enabled, "animal_on_animal_enabled", animal_on_animal_enabled, true); Scribe_Values.Look(ref bestiality_enabled, "bestiality_enabled", bestiality_enabled, true); Scribe_Values.Look(ref necrophilia_enabled, "necrophilia_enabled", necrophilia_enabled, true); Scribe_Values.Look(ref designated_freewill, "designated_freewill", designated_freewill, true); Scribe_Values.Look(ref rape_enabled, "rape_enabled", rape_enabled, true); Scribe_Values.Look(ref colonist_CP_rape, "colonist_CP_rape", colonist_CP_rape, true); Scribe_Values.Look(ref visitor_CP_rape, "visitor_CP_rape", visitor_CP_rape, true); Scribe_Values.Look(ref animal_CP_rape, "animal_CP_rape", animal_CP_rape, true); Scribe_Values.Look(ref rape_beating, "rape_beating", rape_beating, true); Scribe_Values.Look(ref gentle_rape_beating, "gentle_rape_beating", gentle_rape_beating, true); Scribe_Values.Look(ref rape_stripping, "rape_stripping", rape_stripping, true); Scribe_Values.Look(ref NymphTamed, "NymphTamed", NymphTamed, true); Scribe_Values.Look(ref NymphWild, "NymphWild", NymphWild, true); Scribe_Values.Look(ref NymphRaidEasy, "NymphRaidEasy", NymphRaidEasy, true); Scribe_Values.Look(ref NymphRaidHard, "NymphRaidHard", NymphRaidHard, true); Scribe_Values.Look(ref NymphRaidRP, "NymphRaidRP", NymphRaidRP, true); Scribe_Values.Look(ref NymphPermanentManhunter, "NymphPermanentManhunter", NymphPermanentManhunter, true); Scribe_Values.Look(ref NymphSappers, "NymphSappers", NymphSappers, true); Scribe_Values.Look(ref FemaleFuta, "FemaleFuta", FemaleFuta, true); Scribe_Values.Look(ref MaleTrap, "MaleTrap", MaleTrap, true); Scribe_Values.Look(ref sounds_enabled, "sounds_enabled", sounds_enabled, true); Scribe_Values.Look(ref sounds_sex_volume, "sounds_sexvolume", sounds_sex_volume, true); Scribe_Values.Look(ref sounds_cum_volume, "sounds_cumvolume", sounds_cum_volume, true); Scribe_Values.Look(ref sounds_voice_volume, "sounds_voicevolume", sounds_voice_volume, true); Scribe_Values.Look(ref sounds_orgasm_volume, "sounds_orgasmvolume", sounds_orgasm_volume, true); Scribe_Values.Look(ref sounds_animal_on_animal_volume, "sounds_animal_on_animalvolume", sounds_animal_on_animal_volume, true); Scribe_Values.Look(ref cum_filth, "cum_filth", cum_filth, true); Scribe_Values.Look(ref sex_age_legacymode, "sex_age_legacymode", sex_age_legacymode, true); Scribe_Values.Look(ref sexneed_fix, "sexneed_fix", sexneed_fix, true); Scribe_Values.Look(ref sex_minimum_age, "sex_minimum_age", sex_minimum_age, true); Scribe_Values.Look(ref sex_free_for_all_age, "sex_free_for_all", sex_free_for_all_age, true); Scribe_Values.Look(ref sexneed_decay_rate, "sexneed_decay_rate", sexneed_decay_rate, true); Scribe_Values.Look(ref Animal_mating_cooldown, "Animal_mating_cooldown", Animal_mating_cooldown, true); Scribe_Values.Look(ref nonFutaWomenRaping_MaxVulnerability, "nonFutaWomenRaping_MaxVulnerability", nonFutaWomenRaping_MaxVulnerability, true); Scribe_Values.Look(ref rapee_MinVulnerability_human, "rapee_MinVulnerability_human", rapee_MinVulnerability_human, true); Scribe_Values.Look(ref male_nymph_chance, "male_nymph_chance", male_nymph_chance, true); Scribe_Values.Look(ref futa_nymph_chance, "futa_nymph_chance", futa_nymph_chance, true); Scribe_Values.Look(ref futa_natives_chance, "futa_natives_chance", futa_natives_chance, true); Scribe_Values.Look(ref futa_spacers_chance, "futa_spacers_chance", futa_spacers_chance, true); Scribe_Values.Look(ref RPG_hero_control, "RPG_hero_control", RPG_hero_control, true); Scribe_Values.Look(ref RPG_hero_control_HC, "RPG_hero_control_HC", RPG_hero_control_HC, true); Scribe_Values.Look(ref RPG_hero_control_Ironman, "RPG_hero_control_Ironman", RPG_hero_control_Ironman, true); } } }
jojo1541/rjw
1.3/Source/Settings/RJWSettings.cs
C#
mit
19,318
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); } } }
jojo1541/rjw
1.3/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 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 comfort_prisoner_rape_mtbh_mul; // Updated public float whore_mtbh_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 = false; public static bool FapInBed = true; public static bool FapInBelts = true; public static bool FapInArmbinders = false; public static bool ShowForCP = true; public static bool ShowForBreeding = true; public static Clothing sex_wear = Clothing.Nude; public static RapeAlert rape_attempt_alert = RapeAlert.Humanlikes; public static RapeAlert rape_alert = RapeAlert.Humanlikes; public static Rjw_sexuality sexuality_distribution = Rjw_sexuality.Vanilla; public static AllowedSex Malesex = AllowedSex.All; public static AllowedSex FeMalesex = AllowedSex.All; public static int MaxQuirks = 1; public enum AllowedSex { All, Homo, Nohomo }; public enum Clothing { Nude, Headgear, Clothed }; public enum RapeAlert { Enabled, Colonists, Humanlikes, Silent, Disabled }; public enum Rjw_sexuality { Vanilla, RimJobWorld, 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.CheckboxLabeled("FapInBelts".Translate(), ref FapInBelts, "FapInBelts_desc".Translate()); listingStandard.CheckboxLabeled("FapInArmbinders".Translate(), ref FapInArmbinders, "FapInArmbinders_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)), new FloatMenuOption("AllowedSex.Homo".Translate(), (() => Malesex = AllowedSex.Homo)), new FloatMenuOption("AllowedSex.Nohomo".Translate(), (() => Malesex = AllowedSex.Nohomo)) })); } if (listingStandard.ButtonText("FeMalesex".Translate() + FeMalesex.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("AllowedSex.All".Translate(), (() => FeMalesex = AllowedSex.All)), new FloatMenuOption("AllowedSex.Homo".Translate(), (() => FeMalesex = AllowedSex.Homo)), new FloatMenuOption("AllowedSex.Nohomo".Translate(), (() => FeMalesex = AllowedSex.Nohomo)) })); } 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)), new FloatMenuOption("SexClothingHeadwear".Translate(), (() => sex_wear = Clothing.Headgear)), new FloatMenuOption("SexClothingFull".Translate(), (() => sex_wear = Clothing.Clothed)) })); } listingStandard.Gap(4f); if (listingStandard.ButtonText("RapeAttemptAlert".Translate() + rape_attempt_alert.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("RapeAttemptAlertAlways".Translate(), (() => rape_attempt_alert = RapeAlert.Enabled)), new FloatMenuOption("RapeAttemptAlertHumanlike".Translate(), (() => rape_attempt_alert = RapeAlert.Humanlikes)), new FloatMenuOption("RapeAttemptAlertColonist".Translate(), (() => rape_attempt_alert = RapeAlert.Colonists)), new FloatMenuOption("RapeAttemptAlertSilent".Translate(), (() => rape_attempt_alert = RapeAlert.Silent)), new FloatMenuOption("RapeAttemptAlertDisabled".Translate(), (() => rape_attempt_alert = RapeAlert.Disabled)) })); } if (listingStandard.ButtonText("RapeAlert".Translate() + rape_alert.ToString())) { Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>() { new FloatMenuOption("RapeAlertAlways".Translate(), (() => rape_alert = RapeAlert.Enabled)), new FloatMenuOption("RapeAlertHumanlike".Translate(), (() => rape_alert = RapeAlert.Humanlikes)), new FloatMenuOption("RapeAlertColonist".Translate(), (() => rape_alert = RapeAlert.Colonists)), new FloatMenuOption("RapeAlertSilent".Translate(), (() => rape_alert = RapeAlert.Silent)), new FloatMenuOption("RapeAlertDisabled".Translate(), (() => rape_alert = RapeAlert.Disabled)) })); } listingStandard.CheckboxLabeled("RapeAlertCP".Translate(), ref ShowForCP, "RapeAlertCP_desc".Translate()); listingStandard.CheckboxLabeled("RapeAlertBreeding".Translate(), ref ShowForBreeding, "RapeAlertBreeding_desc".Translate()); 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("Vanilla", () => sexuality_distribution = Rjw_sexuality.Vanilla), //new FloatMenuOption("RimJobWorld", () => sexuality_distribution = Rjw_sexuality.RimJobWorld), new FloatMenuOption("SYRIndividuality", () => sexuality_distribution = Rjw_sexuality.SYRIndividuality), new FloatMenuOption("Psychology", () => sexuality_distribution = Rjw_sexuality.Psychology) })); } 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.IndividualityIsActive && sexuality_distribution == Rjw_sexuality.SYRIndividuality) sexuality_distribution = Rjw_sexuality.Vanilla; else if (sexuality_distribution == Rjw_sexuality.SYRIndividuality) listingStandard.Label("SexualitySpreadIndividuality".Translate()); else if (!xxx.PsychologyIsActive && sexuality_distribution == Rjw_sexuality.Psychology) sexuality_distribution = Rjw_sexuality.Vanilla; else if (sexuality_distribution == Rjw_sexuality.Psychology) listingStandard.Label("SexualitySpreadPsychology".Translate()); else listingStandard.Label("SexualitySpreadVanilla".Translate()); } listingStandard.Label("MaxQuirks".Translate() + ": " + MaxQuirks, -1f, "MaxQuirks_desc".Translate()); MaxQuirks = (int)listingStandard.Slider(MaxQuirks, 0, 10); 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", vaginal, true); Scribe_Values.Look(ref anal, "anal_frequency", anal, true); Scribe_Values.Look(ref fellatio, "fellatio_frequency", fellatio, true); Scribe_Values.Look(ref cunnilingus, "cunnilingus_frequency", cunnilingus, true); Scribe_Values.Look(ref rimming, "rimming_frequency", rimming, true); Scribe_Values.Look(ref double_penetration, "double_penetration_frequency", double_penetration, true); Scribe_Values.Look(ref sixtynine, "sixtynine_frequency", sixtynine, true); Scribe_Values.Look(ref breastjob, "breastjob_frequency", breastjob, true); Scribe_Values.Look(ref handjob, "handjob_frequency", handjob, true); Scribe_Values.Look(ref footjob, "footjob_frequency", footjob, true); Scribe_Values.Look(ref fingering, "fingering_frequency", fingering, true); Scribe_Values.Look(ref fisting, "fisting_frequency", fisting, true); Scribe_Values.Look(ref mutual_masturbation, "mutual_masturbation_frequency", mutual_masturbation, true); Scribe_Values.Look(ref scissoring, "scissoring_frequency", scissoring, true); Scribe_Values.Look(ref asexual_ratio, "asexual_ratio", asexual_ratio, true); Scribe_Values.Look(ref pansexual_ratio, "pansexual_ratio", pansexual_ratio, true); Scribe_Values.Look(ref heterosexual_ratio, "heterosexual_ratio", heterosexual_ratio, true); Scribe_Values.Look(ref bisexual_ratio, "bisexual_ratio", bisexual_ratio, true); Scribe_Values.Look(ref homosexual_ratio, "homosexual_ratio", homosexual_ratio, true); Scribe_Values.Look(ref FapEverywhere, "FapEverywhere", FapEverywhere, true); Scribe_Values.Look(ref FapInBed, "FapInBed", FapInBed, true); Scribe_Values.Look(ref FapInBelts, "FapInBelts", FapInBelts, true); Scribe_Values.Look(ref FapInArmbinders, "FapInArmbinders", FapInArmbinders, true); Scribe_Values.Look(ref sex_wear, "sex_wear", sex_wear, true); Scribe_Values.Look(ref rape_attempt_alert, "rape_attempt_alert", rape_attempt_alert, true); Scribe_Values.Look(ref rape_alert, "rape_alert", rape_alert, true); Scribe_Values.Look(ref ShowForCP, "ShowForCP", ShowForCP, true); Scribe_Values.Look(ref ShowForBreeding, "ShowForBreeding", ShowForBreeding, true); Scribe_Values.Look(ref sexuality_distribution, "sexuality_distribution", sexuality_distribution, true); Scribe_Values.Look(ref Malesex, "Malesex", Malesex, true); Scribe_Values.Look(ref FeMalesex, "FeMalesex", FeMalesex, true); Scribe_Values.Look(ref MaxQuirks, "MaxQuirks", MaxQuirks, true); } } }
jojo1541/rjw
1.3/Source/Settings/RJWSexSettings.cs
C#
mit
16,193
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; } } }
jojo1541/rjw
1.3/Source/Settings/Settings.cs
C#
mit
2,007
using Verse; namespace rjw { public class config : Def { // TODO: Clean these. 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 comfort_prisoner_rape_mtbh_mul; } }
jojo1541/rjw
1.3/Source/Settings/config.cs
C#
mit
464
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) { //--ModLog.Message("ThinkNode_ChancePerHour_Bestiality:TryIssueJobPackage - error message" + e.Message); //--ModLog.Message("ThinkNode_ChancePerHour_Bestiality:TryIssueJobPackage - error stacktrace" + e.StackTrace); return ThinkResult.NoJob; ; } } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Bestiality.cs
C#
mit
2,560
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; ; } } } }
jojo1541/rjw
1.3/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) { 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.is_hornyorfrustrated(p); 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; } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Fappin.cs
C#
mit
1,200
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; } } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ChancePerHour_Necro.cs
C#
mit
2,480
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 SexAppraiser.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)) { var parts = pawn.GetGenitalsList(); // Much slower for female animals. animal_factor = (Genital_Helper.has_penis_fertile(pawn, parts) || Genital_Helper.has_penis_infertile(pawn, parts)) ? 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; ; } } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ChancePerHour_RapeCP.cs
C#
mit
2,879
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) // ModLog.Message("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; // Bestiality off if (!RJWSettings.bestiality_enabled) return false; // No free will while designated for rape. if (!RJWSettings.designated_freewill) if ((p.IsDesignatedComfort() || p.IsDesignatedBreeding())) return false; return true; } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ConditionalBestiality.cs
C#
mit
834
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) { //ModLog.Message("ThinkNode_ConditionalCanBreed " + p); //Rimworld of Magic polymorphed humanlikes also get animal think node //if (p.Faction != null && p.Faction.IsPlayer) // ModLog.Message("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; // Animal stuff disabled. if (!RJWSettings.bestiality_enabled && !RJWSettings.animal_on_animal_enabled) return false; //return p.IsDesignatedBreedingAnimal() || RJWSettings.WildMode; return p.IsDesignatedBreedingAnimal(); } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ConditionalCanBreed.cs
C#
mit
919
using Verse; using Verse.AI; using RimWorld; namespace rjw { public class ThinkNode_ConditionalCanRapeCP : ThinkNode_Conditional { protected override bool Satisfied(Pawn p) { //ModLog.Message("ThinkNode_ConditionalCanRapeCP " + pawn); 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 (!RJWSettings.designated_freewill) if ((p.IsDesignatedComfort() || p.IsDesignatedBreeding())) 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; // Animals cannot rape CP if (xxx.is_animal(p)) return false; // colonists(humans) cannot rape CP if the setting is disabled. if (!RJWSettings.colonist_CP_rape && p.IsColonist && xxx.is_human(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; } } }
jojo1541/rjw
1.3/Source/ThinkTreeNodes/ThinkNode_ConditionalCanRapeCP.cs
C#
mit
1,535