mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Seduced ThoughtDef
This commit is contained in:
parent
ee1625306a
commit
34bb5d3b2c
13 changed files with 25 additions and 91 deletions
|
@ -1,18 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class HediffCompProperties_RemoveSubmit :HediffCompProperties
|
||||
{
|
||||
|
||||
public HediffCompProperties_RemoveSubmit()
|
||||
{
|
||||
this.compClass = typeof(HediffComp_RemoveSubmit);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class HediffComp_RemoveSubmit : HediffComp
|
||||
{
|
||||
public HediffCompProperties_RemoveSubmit Props
|
||||
{
|
||||
get
|
||||
{
|
||||
return (HediffCompProperties_RemoveSubmit)this.props;
|
||||
}
|
||||
}
|
||||
|
||||
public override void CompPostPostRemoved()
|
||||
{
|
||||
base.CompPostPostRemoved();
|
||||
HediffWithComps submitting = this.Pawn.health.hediffSet.GetFirstHediffOfDef(xxx.submitting) as HediffWithComps;
|
||||
submitting.CurStage.becomeVisible = false;
|
||||
if (submitting != null)
|
||||
{
|
||||
foreach (HediffComp comp in submitting.comps)
|
||||
{
|
||||
HediffComp_Disappears hediffComp = comp as HediffComp_Disappears;
|
||||
if (hediffComp != null)
|
||||
{
|
||||
hediffComp.ticksToDisappear = 1;
|
||||
//pawn.health.RemoveHediff(submitting);
|
||||
//removing the hediff directly gives an error, ArgementOutOrRange, making the remaining time 1 ticks should have the same effect without the error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -38,6 +38,7 @@ namespace RJW_Genes
|
|||
if(partner != null)
|
||||
{
|
||||
partner.drafter.Drafted = false;
|
||||
this.pawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.rjw_genes_seduced, partner, null);
|
||||
Job newJob = JobMaker.MakeJob(JobDefOf.sex_on_spot, pawn);
|
||||
partner.jobs.StartJob(newJob, JobCondition.InterruptForced, null, false, true, null, null, false, false, null, false, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue