mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
1.5 update
This commit is contained in:
parent
7d9e399a47
commit
e6db43f31d
231 changed files with 95 additions and 6968 deletions
|
@ -1,52 +0,0 @@
|
|||
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;
|
||||
}
|
||||
//public static readonly StringListDef filter = DefDatabase<StringListDef>.GetNamed("DomSuccubusTailFilter");
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
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;
|
||||
}
|
||||
//public static readonly StringListDef filter = DefDatabase<StringListDef>.GetNamed("SubSuccubusTailFilter");
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue