mirror of
https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
synced 2024-08-14 23:57:38 +00:00
replaced compinducelactation with hediffcomp; cleaner
todo: add abilitydef to hucow handler to begin inducing lactation; give lactation induction hediff to recipient pawn add thoughtdef w/ thoughtworker_hediff to give pawns thoughts on inducing lactation
This commit is contained in:
parent
1d6ecb3f95
commit
5b4b203d13
19 changed files with 233 additions and 70 deletions
|
@ -0,0 +1,28 @@
|
|||
using RimWorld;
|
||||
using RimWorld.Planet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace CRIALactation
|
||||
{
|
||||
public class CompAbilityEffect_BeginInducingLactation : CompAbilityEffect
|
||||
{
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
Pawn pawn = target.Pawn;
|
||||
|
||||
if (pawn == null) return false;
|
||||
if (!pawn.IsColonistPlayerControlled || !pawn.IsSlaveOfColony || !pawn.IsPrisonerOfColony) return false;
|
||||
if (LactationUtility.IsLactating(pawn)) return false;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -10,7 +10,20 @@ using UnityEngine;
|
|||
|
||||
namespace CRIALactation
|
||||
{
|
||||
public class CompInduceLactation : ThingComp
|
||||
public class CompLactation : ThingComp
|
||||
{
|
||||
public int lastHumanLactationIngestedTick = 0;
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_Values.Look<int>(ref this.lastHumanLactationIngestedTick, "lastHumanLactationIngestedTick", 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public class CompLactation : ThingComp
|
||||
{
|
||||
private readonly int OneDayInTicks = 60000;
|
||||
private int TicksSinceLastMassage = -60000;
|
||||
|
@ -124,4 +137,6 @@ namespace CRIALactation
|
|||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue