public static bool Prefix(Pawn mother, Pawn father) { if (mother != null && PawnHelper.is_human(mother)) { bool motherInJail = mother.guest != null && mother.guest.IsPrisoner && mother.Faction != Faction.OfPlayer; bool amnestyOnMother = motherInJail && father != null && PawnHelper.is_human(father) && PawnHelper.is_kind(father); if (amnestyOnMother) { mother.SetFaction(Faction.OfPlayer, father); TaleRecorder.RecordTale(TaleDefOf.Recruited, new object[] { father, // recruiter mother //recruitee }); father.records.Increment(RecordDefOf.PrisonersRecruited); mother.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.RecruitedMe, father); } else if (motherInJail) { //will need to make babies belonging to us HeDiffPrisonerGivingBirth factionDiff = (HeDiffPrisonerGivingBirth)HediffMaker.MakeHediff(Constants.GivingBirth, mother, null); factionDiff.Faction = mother.Faction; mother.health.AddHediff(factionDiff); mother.SetFactionDirect(Faction.OfPlayer); } } return(true); }
public static void doClense(Pawn pawn, BodyPartRecord part) { PawnHelper.ClenseBad(pawn, HediffDefOf.ToxicBuildup); PawnHelper.ClenseBad(pawn, HediffDefOf.Carcinoma); PawnHelper.ClenseBad(pawn, AdeptusMechanicus_Patch.RadiationPoisioning); PawnHelper.ClenseBad(pawn, ImperialGuard.hediff_unConsciousness); PawnHelper.ClenseBad(pawn, ImperialGuard.hediff_TYPlague); }
//omg this is painful as hell on the poor children. public static void wakeUpCryBaby(Pawn pawn, BodyPartRecord part, GeneSeedHediffWithComps geneSeedAvailable) { if (pawn.Drafted && pawn.needs.rest.CurCategory <= RestCategory.Exhausted && geneSeedAvailable.Severity > .2f) //need to be a full + 1, shh~! its a super power { pawn.needs.rest.TickResting(Rand.Value); //war is basically rest for the wicked if (!PawnHelper.is_bloodlust(pawn)) { return; } //bloodravens love this cause of the red haze or whatever you wanna call it. pawn.skills.Learn(SkillDefOf.Melee, 1, true); } }
public static void Postfix(Pawn mother, Pawn father) { if (mother == null || !PawnHelper.is_human(mother)) { return; } var realFactionHeDiff = mother.health.hediffSet.GetHediffs <HeDiffPrisonerGivingBirth>().Where(x => true); //lz clone if (!realFactionHeDiff.Any()) { return; } foreach (HeDiffPrisonerGivingBirth heDiff in realFactionHeDiff) { if (heDiff.Faction != null) { mother.SetFactionDirect(heDiff.Faction); } mother.health.RemoveHediff(heDiff); } }
public static void doClense(Pawn pawn, BodyPartRecord part) { PawnHelper.ClenseBad(pawn, HediffDefOf.FoodPoisoning); }