mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
sexage check Fertilin and FertilinDraingene
Fertilin and all subgenes are only active if pawn is old enough to have sex, 13 if rjw teensex is enabled else 18. Added a fertilindraingene which greatly increases fertilin burn, but gives a lot of metabolic efficiency Also moved a few files into subfolders.
This commit is contained in:
parent
2e1e74e0b1
commit
09157e923d
21 changed files with 166 additions and 81 deletions
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using Verse.AI;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class CompAbilityEffect_Seduce : CompAbilityEffect_WithDest
|
||||
{
|
||||
private new CompProperties_Seduce Props
|
||||
{
|
||||
get
|
||||
{
|
||||
return (CompProperties_Seduce)this.props;
|
||||
}
|
||||
}
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
base.Apply(target, dest);
|
||||
Pawn pawn = target.Thing as Pawn;
|
||||
Pawn pawn2 = this.parent.pawn;
|
||||
if (pawn != null && pawn2 != null && !pawn.Downed)
|
||||
{
|
||||
Job job = JobMaker.MakeJob(JobDefOf.rjw_genes_lifeforce_seduced, pawn2);
|
||||
job.mote = MoteMaker.MakeThoughtBubble(pawn, this.parent.def.iconPath, true);
|
||||
pawn.jobs.StopAll(false, true);
|
||||
pawn.jobs.StartJob(job, JobCondition.InterruptForced, null, false, true, null, null, false, false, null, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
|
||||
Pawn pawn = target.Pawn;
|
||||
if (pawn != null)
|
||||
{
|
||||
if (!xxx.can_be_fucked(pawn))
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
Messages.Message(pawn.Name + " is unable to have sex", pawn, MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (pawn.IsAnimal() && !RJWSettings.bestiality_enabled)
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
Messages.Message("bestiality is disabled", pawn, MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (pawn.Downed)
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
Messages.Message(pawn.Name + " is unable to move", pawn, MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return base.Valid(target, throwMessages);
|
||||
}
|
||||
|
||||
public override bool GizmoDisabled(out string reason)
|
||||
{
|
||||
reason = null;
|
||||
if (!RJWSettings.rape_enabled)
|
||||
{
|
||||
reason = "Rape is disabled";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue