mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Rescued Succubus Artifacts
This commit is contained in:
parent
51b988f18c
commit
eab2485787
12 changed files with 650 additions and 1 deletions
16
Common/Defs/IncidentsDefs/Incidents_LifeForce.xml
Normal file
16
Common/Defs/IncidentsDefs/Incidents_LifeForce.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Defs>
|
||||
<IncidentDef>
|
||||
<defName>SuccubusDreamVisit</defName>
|
||||
<label>dirty dreams</label>
|
||||
<category>Misc</category>
|
||||
<targetTags>
|
||||
<li>Map_PlayerHome</li>
|
||||
</targetTags>
|
||||
<workerClass>RJW_Genes.IncidentWorker_SuccubusDreamVisit</workerClass>
|
||||
<baseChance>1.0</baseChance>
|
||||
<minRefireDays>10</minRefireDays>
|
||||
<pointsScaleable>false</pointsScaleable>
|
||||
</IncidentDef>
|
||||
</Defs>
|
87
Common/Defs/PawnKindDefs/PawnKind_LifeForce.xml
Normal file
87
Common/Defs/PawnKindDefs/PawnKind_LifeForce.xml
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Defs>
|
||||
<PawnKindDef>
|
||||
<defName>rjw_genes_succubus</defName>
|
||||
<label>succubus</label>
|
||||
<combatPower>50</combatPower>
|
||||
<race>Human</race>
|
||||
<xenotypeSet>
|
||||
<xenotypeChances>
|
||||
<rjw_genes_succubus>999</rjw_genes_succubus>
|
||||
</xenotypeChances>
|
||||
</xenotypeSet>
|
||||
<acceptArrestChanceFactor>0.5</acceptArrestChanceFactor>
|
||||
<useFactionXenotypes>false</useFactionXenotypes>
|
||||
<minGenerationAge>18</minGenerationAge>
|
||||
<maxGenerationAge>27</maxGenerationAge>
|
||||
<itemQuality>Poor</itemQuality>
|
||||
<backstoryCryptosleepCommonality>0.0</backstoryCryptosleepCommonality>
|
||||
<isFighter>false</isFighter>
|
||||
<gearHealthRange>
|
||||
<min>0.3</min>
|
||||
<max>0.9</max>
|
||||
</gearHealthRange>
|
||||
<apparelIgnoreSeasons>true</apparelIgnoreSeasons>
|
||||
<apparelTags>
|
||||
<li>Tribal</li>
|
||||
</apparelTags>
|
||||
<apparelMoney>
|
||||
<min>0</min>
|
||||
<max>0</max>
|
||||
</apparelMoney>
|
||||
<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
|
||||
<techHediffsMoney>
|
||||
<min>0</min>
|
||||
<max>0</max>
|
||||
</techHediffsMoney>
|
||||
<techHediffsTags>
|
||||
<li>Poor</li>
|
||||
</techHediffsTags>
|
||||
<techHediffsChance>0.0</techHediffsChance>
|
||||
<initialWillRange>2~4</initialWillRange>
|
||||
<initialResistanceRange>28~44</initialResistanceRange>
|
||||
</PawnKindDef>
|
||||
|
||||
<PawnKindDef>
|
||||
<defName>rjw_genes_incubus</defName>
|
||||
<label>succubus</label>
|
||||
<combatPower>50</combatPower>
|
||||
<race>Human</race>
|
||||
<xenotypeSet>
|
||||
<xenotypeChances>
|
||||
<rjw_genes_incubus>999</rjw_genes_incubus>
|
||||
</xenotypeChances>
|
||||
</xenotypeSet>
|
||||
<acceptArrestChanceFactor>0.5</acceptArrestChanceFactor>
|
||||
<useFactionXenotypes>false</useFactionXenotypes>
|
||||
<minGenerationAge>18</minGenerationAge>
|
||||
<maxGenerationAge>27</maxGenerationAge>
|
||||
<itemQuality>Poor</itemQuality>
|
||||
<backstoryCryptosleepCommonality>0.0</backstoryCryptosleepCommonality>
|
||||
<isFighter>false</isFighter>
|
||||
<gearHealthRange>
|
||||
<min>0.3</min>
|
||||
<max>0.9</max>
|
||||
</gearHealthRange>
|
||||
<apparelIgnoreSeasons>true</apparelIgnoreSeasons>
|
||||
<apparelTags>
|
||||
<li>Tribal</li>
|
||||
</apparelTags>
|
||||
<apparelMoney>
|
||||
<min>0</min>
|
||||
<max>0</max>
|
||||
</apparelMoney>
|
||||
<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
|
||||
<techHediffsMoney>
|
||||
<min>0</min>
|
||||
<max>0</max>
|
||||
</techHediffsMoney>
|
||||
<techHediffsTags>
|
||||
<li>Poor</li>
|
||||
</techHediffsTags>
|
||||
<techHediffsChance>0.0</techHediffsChance>
|
||||
<initialWillRange>2~4</initialWillRange>
|
||||
<initialResistanceRange>28~44</initialResistanceRange>
|
||||
</PawnKindDef>
|
||||
</Defs>
|
36
Common/Patches/ThingDefs/RJW_Used_Condoms.xml
Normal file
36
Common/Patches/ThingDefs/RJW_Used_Condoms.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Patch>
|
||||
<!--
|
||||
DevNote:
|
||||
There used to be an issue with a Gene-Mod Called "Cum-Addiction Gene". That mod just overwrote the complete UsedCondom.xml and Sexperience Cum.xml
|
||||
This would lead to two types of failures:
|
||||
A) If this mod was before the other mod, changes were just overwritten
|
||||
B) If this mod was after, there was an issue in targetting the XML throwing a patch error
|
||||
Please if you write mods, do not just purge out XMLs. Thanks.
|
||||
|
||||
This patch was kindly provided by Infi over Discord.
|
||||
-->
|
||||
|
||||
<Operation Class="PatchOperationConditional">
|
||||
<xpath>Defs/ThingDef[defName="UsedCondom"]/ingestible/outcomeDoers</xpath>
|
||||
<nomatch Class="PatchOperationAdd">
|
||||
<xpath>/Defs/ThingDef[defName="UsedCondom"]/ingestible</xpath>
|
||||
<value>
|
||||
<outcomeDoers>
|
||||
<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
|
||||
<FertilinPerUnit>1</FertilinPerUnit>
|
||||
</li>
|
||||
</outcomeDoers>
|
||||
</value>
|
||||
</nomatch>
|
||||
<match Class="PatchOperationAdd">
|
||||
<xpath>Defs/ThingDef[defName="UsedCondom"]/ingestible/outcomeDoers</xpath>
|
||||
<value>
|
||||
<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
|
||||
<FertilinPerUnit>1</FertilinPerUnit>
|
||||
</li>
|
||||
</value>
|
||||
</match>
|
||||
</Operation>
|
||||
|
||||
</Patch>
|
42
Common/Patches/ThingDefs/Sexperience_Cum.xml
Normal file
42
Common/Patches/ThingDefs/Sexperience_Cum.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Patch>
|
||||
|
||||
<!--
|
||||
DevNote:
|
||||
There used to be an issue with a Gene-Mod Called "Cum-Addiction Gene". That mod just overwrote the
|
||||
complete UsedCondom.xml and Sexperience Cum.xml
|
||||
This would lead to two types of failures:
|
||||
A) If this mod was before the other mod, changes were just overwritten
|
||||
B) If this mod was after, there was an issue in targetting the XML throwing a patch error
|
||||
Please if you write mods, do not just purge out XMLs. Thanks.
|
||||
|
||||
This patch was kindly mirrored after Infis Patch of UsedCondoms.
|
||||
-->
|
||||
<Operation Class="PatchOperationFindMod">
|
||||
<mods>
|
||||
<li>RJW Sexperience</li>
|
||||
</mods>
|
||||
<match Class="PatchOperationConditional">
|
||||
<xpath>Defs/ThingDef[defName="GatheredCum"]/ingestible/outcomeDoers</xpath>
|
||||
<nomatch Class="PatchOperationAdd">
|
||||
<xpath>/Defs/ThingDef[defName="GatheredCum"]/ingestible</xpath>
|
||||
<value>
|
||||
<outcomeDoers>
|
||||
<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
|
||||
<FertilinPerUnit>1</FertilinPerUnit>
|
||||
</li>
|
||||
</outcomeDoers>
|
||||
</value>
|
||||
</nomatch>
|
||||
<match Class="PatchOperationAdd">
|
||||
<xpath>Defs/ThingDef[defName="GatheredCum"]/ingestible/outcomeDoers</xpath>
|
||||
<value>
|
||||
<li Class="RJW_Genes.IngestionOutcomeDoer_LifeForceOffset">
|
||||
<FertilinPerUnit>1</FertilinPerUnit>
|
||||
</li>
|
||||
</value>
|
||||
</match>
|
||||
</match>
|
||||
</Operation>
|
||||
|
||||
</Patch>
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Patch>
|
||||
<!-- Copied from Vanilla BingingDrug. live selfish till rape someone. In the future add others ways to obtain lifeforce. -->
|
||||
<Operation Class="PatchOperationAdd">
|
||||
<xpath>Defs/ThinkTreeDef[defName="MentalStateCritical"]/thinkRoot[@Class="ThinkNode_Tagger"]/subNodes</xpath>
|
||||
<value>
|
||||
<li Class="ThinkNode_ConditionalMentalState">
|
||||
<state>rjw_genes_lifeforce_randomrape</state>
|
||||
<subNodes>
|
||||
<li Class="ThinkNode_ConditionalNeedPercentageAbove">
|
||||
<need>Rest</need>
|
||||
<threshold>0.05</threshold>
|
||||
<invert>true</invert>
|
||||
<subNodes>
|
||||
<li Class="JobGiver_GetRest"/>
|
||||
</subNodes>
|
||||
</li>
|
||||
<li Class="ThinkNode_PrioritySorter">
|
||||
<minPriority>0.5</minPriority>
|
||||
<subNodes>
|
||||
<li Class="JobGiver_GetFood"/>
|
||||
<li Class="ThinkNode_Priority_GetJoy">
|
||||
<subNodes>
|
||||
<li Class="JobGiver_GetJoy"/>
|
||||
</subNodes>
|
||||
</li>
|
||||
</subNodes>
|
||||
</li>
|
||||
<li Class="rjw.JobGiver_RandomRape"/>
|
||||
<li Class="JobGiver_WanderColony" />
|
||||
</subNodes>
|
||||
</li>
|
||||
</value>
|
||||
</Operation>
|
||||
</Patch>
|
|
@ -0,0 +1,134 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
using Verse.AI.Group;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class IncidentWorker_SuccubusDreamVisit : IncidentWorker
|
||||
{
|
||||
//This incidint will only fire if there is a pawn asleep and sexneed is lower than 0.25
|
||||
protected override bool CanFireNowSub(IncidentParms parms)
|
||||
{
|
||||
if (!base.CanFireNowSub(parms))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Map map = (Map)parms.target;
|
||||
if (!map.mapTemperature.SeasonAcceptableFor(ThingDefOf.Human))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi && !RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned)
|
||||
{
|
||||
if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
protected override bool TryExecuteWorker(IncidentParms parms)
|
||||
{
|
||||
Map map = (Map)parms.target;
|
||||
List<Pawn> victims = ValidVictims(map).ToList();
|
||||
if (victims.NullOrEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Faction faction;
|
||||
if (!this.TryFindFormerFaction(out faction))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int pawn_amount = RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups ? Rand.Range(1, victims.Count) : 1;
|
||||
List<Pawn> new_sexdemons = new List<Pawn>();
|
||||
for (int i = 0; i < pawn_amount; i++)
|
||||
{
|
||||
Pawn victim = victims.RandomElement();
|
||||
IntVec3 loc = victim.Position;
|
||||
|
||||
PawnKindDef pawnKindDef;
|
||||
Gender gender;
|
||||
if (victim.gender == Gender.Male || !RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi)
|
||||
{
|
||||
|
||||
}
|
||||
if ((Rand.Bool && RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi) || !RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi)
|
||||
{
|
||||
pawnKindDef = PawnKindDef.Named("rjw_genes_succubus");
|
||||
gender = Gender.Female;
|
||||
}
|
||||
else
|
||||
{
|
||||
pawnKindDef = PawnKindDef.Named("rjw_genes_incubus");
|
||||
gender = Gender.Male;
|
||||
}
|
||||
|
||||
//Spawn succubus at pawn
|
||||
Pawn sexdemon = PawnGenerator.GeneratePawn(new PawnGenerationRequest(pawnKindDef, faction, PawnGenerationContext.NonPlayer, -1,
|
||||
false, false, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null,
|
||||
null, null, null, null, null, gender, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f,
|
||||
DevelopmentalStage.Adult, null, null, null, false));
|
||||
sexdemon.SetFaction(null, null);
|
||||
GenSpawn.Spawn(sexdemon, loc, map, WipeMode.Vanish);
|
||||
List<Pawn> sexdemons = new List<Pawn> { sexdemon };
|
||||
new_sexdemons.Add(sexdemon);
|
||||
|
||||
|
||||
LordMaker.MakeNewLord(Faction.OfPlayer, this.CreateLordJob(parms, sexdemon, victim), map, sexdemons);
|
||||
|
||||
//Make succubus rape victim.
|
||||
if (RJWSettings.rape_enabled)
|
||||
{
|
||||
//follow rjw rules
|
||||
if (SexAppraiser.would_fuck(sexdemon, victim) > 0f)
|
||||
{
|
||||
sexdemon.pather.StopDead();
|
||||
sexdemon.jobs.StopAll();
|
||||
Job newJob = JobMaker.MakeJob(xxx.RapeRandom, victim);
|
||||
sexdemon.jobs.StartJob(newJob, JobCondition.InterruptForced, null, false, true, null, null, false, false, null, false, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Find.LetterStack.ReceiveLetter("rjw_genes_sexdemon_visit_incident_label".Translate(), "rjw_genes_sexdemon_visit_incident_description".Translate(), RimWorld.LetterDefOf.PositiveEvent, new_sexdemons, null, null, null, null);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private IEnumerable<Pawn> ValidVictims(Map map)
|
||||
{
|
||||
foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned)
|
||||
{
|
||||
if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f)
|
||||
{
|
||||
yield return pawn;
|
||||
}
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
private bool TryFindFormerFaction(out Faction formerFaction)
|
||||
{
|
||||
return Find.FactionManager.TryGetRandomNonColonyHumanlikeFaction(out formerFaction, false, true, TechLevel.Undefined, false);
|
||||
}
|
||||
|
||||
protected virtual LordJob_SuccubusVisit CreateLordJob(IncidentParms parms, Pawn succubus, Pawn target)
|
||||
{
|
||||
return new LordJob_SuccubusVisit(target);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using Verse.AI.Group;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
namespace RJW_Genes
|
||||
{
|
||||
//Based on LordJob_VisitColony
|
||||
public class LordJob_SuccubusVisit : LordJob
|
||||
{
|
||||
public LordJob_SuccubusVisit() { }
|
||||
public LordJob_SuccubusVisit(Pawn target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
//
|
||||
//Stategraph has lordtoils which say what a pawn should be doing
|
||||
//Transitions say when active lordtoil for pawn should change
|
||||
//
|
||||
public override StateGraph CreateGraph()
|
||||
{
|
||||
StateGraph stateGraph = new StateGraph();
|
||||
|
||||
//Flirt
|
||||
LordToil_Flirt lordToil_Flirt = new LordToil_Flirt(this.target, 7f);
|
||||
stateGraph.AddToil(lordToil_Flirt);
|
||||
stateGraph.StartingToil = lordToil_Flirt;
|
||||
|
||||
//Leave
|
||||
LordToil_ExitMapRandom lordToil_ExitMapRandom = new LordToil_ExitMapRandom();
|
||||
stateGraph.AddToil(lordToil_ExitMapRandom);
|
||||
LordToil_ExitMapAndDefendSelf lordToil_ExitMapAndDefendSelf = new LordToil_ExitMapAndDefendSelf();
|
||||
stateGraph.AddToil(lordToil_ExitMapAndDefendSelf);
|
||||
|
||||
//Leave after some time
|
||||
Transition transition1 = new Transition(lordToil_Flirt, lordToil_ExitMapRandom, false, true);
|
||||
int tickLimit;
|
||||
if (this.durationTicks != null)
|
||||
{
|
||||
tickLimit = this.durationTicks.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
tickLimit = Rand.Range(60000, 180000); //~1-3 days
|
||||
}
|
||||
transition1.AddTrigger(new Trigger_TicksPassed(tickLimit));
|
||||
transition1.AddPreAction(new TransitionAction_Custom(new Action(this.SuccubiLeave))); //Join or leave colony
|
||||
stateGraph.AddTransition(transition1);
|
||||
|
||||
//If they become hostile
|
||||
Transition transition3 = new Transition(lordToil_Flirt, lordToil_ExitMapAndDefendSelf, false, true);
|
||||
transition3.AddSource(lordToil_ExitMapRandom); //Not sure what this does
|
||||
transition3.AddTrigger(new Trigger_BecamePlayerEnemy());
|
||||
transition3.AddTrigger(new Trigger_PawnKilled());
|
||||
transition3.AddPostAction(new TransitionAction_EndAllJobs());
|
||||
stateGraph.AddTransition(transition3, false);
|
||||
|
||||
Transition transition4 = new Transition(lordToil_ExitMapRandom, lordToil_ExitMapAndDefendSelf, false, true);
|
||||
transition4.AddSource(lordToil_Flirt); //Not sure what this does
|
||||
transition4.AddTrigger(new Trigger_PawnHarmed(1f, true, Faction.OfPlayer));
|
||||
stateGraph.AddTransition(transition4, false);
|
||||
|
||||
return stateGraph;
|
||||
}
|
||||
|
||||
//add toggleable gizmo to allow playes to have colonists sex the succubus into joining your colony
|
||||
//comfort pawn? cooldown?
|
||||
public override IEnumerable<Gizmo> GetPawnGizmos(Pawn p)
|
||||
{
|
||||
return base.GetPawnGizmos(p);
|
||||
}
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
Scribe_Values.Look<int?>(ref this.durationTicks, "durationTicks", null, false);
|
||||
Scribe_References.Look<Pawn>(ref this.target, "target", false);
|
||||
}
|
||||
|
||||
public void SuccubiLeave()
|
||||
{
|
||||
foreach (Pawn pawn in this.lord.ownedPawns)
|
||||
{
|
||||
if (colonyJoiners.Contains(pawn))
|
||||
{
|
||||
RecruitUtility.Recruit(pawn, Faction.OfPlayer);
|
||||
Find.LetterStack.ReceiveLetter("rjw_genes_succubus_joins_letter_label".Translate(), string.Format("rjw_genes_succubus_joins_letter_description".Translate(), xxx.get_pawnname(pawn)), RimWorld.LetterDefOf.PositiveEvent, pawn, null, null, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
Messages.Message("SuccubusLeaving".Translate(xxx.get_pawnname(pawn)), pawn, MessageTypeDefOf.NeutralEvent, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Pawn target;
|
||||
private int? durationTicks;
|
||||
public List<Pawn> colonyJoiners = new List<Pawn>();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw.Modules.Interactions;
|
||||
using rjw.Modules.Interactions.Internals.Implementation;
|
||||
using rjw.Modules.Interactions.Objects;
|
||||
using rjw;
|
||||
using rjw.Modules.Interactions.Enums;
|
||||
|
||||
//Modefied code based of RJW-AI code at https://gitgud.io/Ed86/rjw-ia/-/tree/master/
|
||||
namespace RJW_Genes
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
public class DomSuccubusTailCustomRequirementHandler : ICustomRequirementHandler
|
||||
{
|
||||
public string HandlerKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return "DomSuccubusTailCustomRequirementHandler";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static DomSuccubusTailCustomRequirementHandler()
|
||||
{
|
||||
Register();
|
||||
}
|
||||
public static void Register()
|
||||
{
|
||||
InteractionRequirementService.CustomRequirementHandlers.Add(new DomSuccubusTailCustomRequirementHandler());
|
||||
if (Prefs.DevMode)
|
||||
{
|
||||
Log.Message("DomSuccubusTailCustomRequirementHandler registered: ");
|
||||
}
|
||||
}
|
||||
|
||||
public bool FufillRequirements(InteractionWithExtension interaction, InteractionPawn dominant, InteractionPawn submissive)
|
||||
{
|
||||
if (GeneUtility.HasGeneNullCheck(dominant.Pawn, GeneDefOf.rjw_genes_succubus_tail))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using rjw;
|
||||
using rjw.Modules.Interactions.Contexts;
|
||||
using rjw.Modules.Interactions.Enums;
|
||||
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
|
||||
using rjw.Modules.Shared;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes.Interactions
|
||||
{
|
||||
//Summary//
|
||||
//Set custom preferences for pawn. Gets integrated into rjw by AddtoIPartPreferenceRule in First
|
||||
//Depending on the level of lifeforce increase the chance for using the mouth.
|
||||
public class GenesPartKindUsageRule : IPartPreferenceRule
|
||||
{
|
||||
public IEnumerable<Weighted<LewdablePartKind>> ModifiersForDominant(InteractionContext context)
|
||||
{
|
||||
Pawn pawn = context.Internals.Dominant.Pawn;
|
||||
Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType<Gene_LifeForce>();
|
||||
if (gene != null)
|
||||
{
|
||||
float weight = 2f;
|
||||
if (gene.Value < gene.MinLevelForAlert)
|
||||
{
|
||||
weight *= 10;
|
||||
}
|
||||
else if (gene.Value < gene.targetValue)
|
||||
{
|
||||
weight *= 2.5f;
|
||||
}
|
||||
if (pawn.genes.HasGene(GeneDefOf.rjw_genes_cum_eater))
|
||||
{
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
|
||||
}
|
||||
|
||||
if (pawn.genes.HasGene(GeneDefOf.rjw_genes_fertilin_absorber))
|
||||
{
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
|
||||
}
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
public IEnumerable<Weighted<LewdablePartKind>> ModifiersForSubmissive(InteractionContext context)
|
||||
{
|
||||
Pawn pawn = context.Internals.Dominant.Pawn;
|
||||
Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType<Gene_LifeForce>();
|
||||
if (gene != null)
|
||||
{
|
||||
float weight = 2f;
|
||||
if (gene.Value < gene.MinLevelForAlert)
|
||||
{
|
||||
weight *= 10;
|
||||
}
|
||||
else if (gene.Value < gene.targetValue)
|
||||
{
|
||||
weight *= 2.5f;
|
||||
}
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
|
||||
|
||||
if (pawn.genes.HasGene(GeneDefOf.rjw_genes_fertilin_absorber))
|
||||
{
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
|
||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
|
||||
}
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
using Verse;
|
||||
using rjw.Modules.Interactions;
|
||||
using rjw.Modules.Interactions.Internals.Implementation;
|
||||
using rjw.Modules.Interactions.Objects;
|
||||
|
||||
//Modified code based of RJW-AI code at https://gitgud.io/Ed86/rjw-ia/-/tree/master/
|
||||
namespace RJW_Genes
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
public class SubSuccubusTailCustomRequirementHandler : ICustomRequirementHandler
|
||||
{
|
||||
public string HandlerKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return "SubSuccubusTailCustomRequirementHandler";
|
||||
}
|
||||
}
|
||||
|
||||
static SubSuccubusTailCustomRequirementHandler()
|
||||
{
|
||||
Register();
|
||||
}
|
||||
public static void Register()
|
||||
{
|
||||
InteractionRequirementService.CustomRequirementHandlers.Add(new SubSuccubusTailCustomRequirementHandler());
|
||||
if (Prefs.DevMode)
|
||||
{
|
||||
Log.Message("SubSuccubusTailCustomRequirementHandler registered: ");
|
||||
}
|
||||
}
|
||||
|
||||
public bool FufillRequirements(InteractionWithExtension interaction, InteractionPawn dominant, InteractionPawn submissive)
|
||||
{
|
||||
if (GeneUtility.HasGeneNullCheck(submissive.Pawn, GeneDefOf.rjw_genes_succubus_tail))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -67,6 +67,11 @@
|
|||
<Compile Include="Genes\Breeding\Gene_FerventOvipositor.cs" />
|
||||
<Compile Include="Genes\Breeding\Gene_InsectIncubator.cs" />
|
||||
<Compile Include="Genes\Damage\Gene_Elasticity.cs" />
|
||||
<Compile Include="Genes\Life_Force\Events\SuccubusVisit\IncidentWorker_SuccubusVisit.cs" />
|
||||
<Compile Include="Genes\Life_Force\Events\SuccubusVisit\LordJob_SuccubusVisit.cs" />
|
||||
<Compile Include="Genes\Life_Force\Interactions\SuccubusTailjob\DomSuccubusTailCustomRequirementHandler.cs" />
|
||||
<Compile Include="Genes\Life_Force\Interactions\SuccubusTailjob\GenesPartKindUsageRule.cs" />
|
||||
<Compile Include="Genes\Life_Force\Interactions\SuccubusTailjob\SubSuccubusTailCustomRequirementHandler.cs" />
|
||||
<Compile Include="Genes\Patches\PatchLitteredBirth.cs" />
|
||||
<Compile Include="Common\Patches\PatchGetParents.cs" />
|
||||
<Compile Include="Common\Patches\PatchPregnancyHelper.cs" />
|
||||
|
|
|
@ -31,6 +31,20 @@ namespace RJW_Genes
|
|||
Math.Round((double)(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor * 100f), 0).ToString() + "%", -1f, "of fertilin gained (compared to human-baseline).");
|
||||
RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor = listing_Standard.Slider(RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, 0f, 3f);
|
||||
|
||||
listing_Standard.Gap(5f);
|
||||
listing_Standard.CheckboxLabeled("Sexdemon Visits", ref rjw_genes_sexdemon_visit, "If enabled, incubi and succubi can spawn in through an event.", 0f, 1f);
|
||||
if (rjw_genes_sexdemon_visit)
|
||||
{
|
||||
listing_Standard.Gap(3f);
|
||||
listing_Standard.CheckboxLabeled(" Size matters", ref rjw_genes_sexdemon_join_size_matters, "Incubi and succubi will consider size/tightness of partners genital for deciding if they want to join", 0f, 1f);
|
||||
listing_Standard.Gap(3f);
|
||||
listing_Standard.CheckboxLabeled(" Sexdemon groups", ref rjw_genes_sexdemon_visit_groups, "Multiple sexdemons can spawn during a event", 0f, 1f);
|
||||
listing_Standard.Gap(3f);
|
||||
listing_Standard.CheckboxLabeled(" Succubi", ref rjw_genes_sexdemon_visit_succubi, "Allow incubi to spawn through this even", 0f, 1f);
|
||||
listing_Standard.Gap(3f);
|
||||
listing_Standard.CheckboxLabeled(" Incubi", ref rjw_genes_sexdemon_visit_incubi, "Allow incubi to spawn through this even", 0f, 1f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -53,7 +67,12 @@ namespace RJW_Genes
|
|||
Scribe_Values.Look<float>(ref RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, "rjw_genes_fertilin_from_animals_factor", RJW_Genes_Settings.rjw_genes_fertilin_from_animals_factor, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_detailed_debug, "rjw_genes_detailed_debug", RJW_Genes_Settings.rjw_genes_detailed_debug, true);
|
||||
Scribe_Values.Look(ref regretStealingLovinThoughtDisabled, "regretStealingLovinThoughtDisabled", regretStealingLovinThoughtDisabled, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, "rjw_genes_generous_donor_cheatmode", RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, "rjw_genes_generous_donor_cheatmode", RJW_Genes_Settings.rjw_genes_generous_donor_cheatmode, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit, "rjw_genes_sexdemon_visit", RJW_Genes_Settings.rjw_genes_sexdemon_visit, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, "rjw_genes_sexdemon_join_size_matters", RJW_Genes_Settings.rjw_genes_sexdemon_join_size_matters, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, "rjw_genes_sexdemon_groups", RJW_Genes_Settings.rjw_genes_sexdemon_visit_groups, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, "rjw_genes_sexdemon_succubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_succubi, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, "rjw_genes_sexdemon_incubi", RJW_Genes_Settings.rjw_genes_sexdemon_visit_incubi, true);
|
||||
}
|
||||
|
||||
public static bool rjw_genes_detailed_debug = false;
|
||||
|
@ -62,6 +81,11 @@ namespace RJW_Genes
|
|||
public static int rjw_genes_evergrowth_ticks = 60000;
|
||||
public static bool regretStealingLovinThoughtDisabled = false;
|
||||
|
||||
public static bool rjw_genes_sexdemon_visit = true;
|
||||
public static bool rjw_genes_sexdemon_join_size_matters = true;
|
||||
public static bool rjw_genes_sexdemon_visit_groups = true;
|
||||
public static bool rjw_genes_sexdemon_visit_succubi = true;
|
||||
public static bool rjw_genes_sexdemon_visit_incubi = true;
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue