Skip to content
Snippets Groups Projects
Commit 210181f6 authored by Ed86's avatar Ed86
Browse files

fixes for CnP/BnC

parent 7e19d9fb
No related branches found
No related tags found
No related merge requests found
......@@ -503,22 +503,50 @@ namespace rjw
{
if (xxx.is_human(mother))
{
mother.health.AddHediff(HediffDef.Named("PostPregnancy"), null, null);
mother.health.AddHediff(HediffDef.Named("Lactating"), mother.RaceProps.body.AllParts.Find(x => x.def.defName == "Torso"), null);
mother.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("IGaveBirth"));
//BnC compatibility
if (DefDatabase<HediffDef>.GetNamedSilentFail("BnC_RJW_PostPregnancy") == null)
{
mother.health.AddHediff(HediffDef.Named("PostPregnancy"), null, null);
mother.health.AddHediff(HediffDef.Named("Lactating"), mother.RaceProps.body.AllParts.Find(x => x.def.defName == "Chest"), null);
}
if (xxx.is_human(baby))
if (mother.records.GetAsInt(xxx.CountOfBirthHuman) == 0 &&
mother.records.GetAsInt(xxx.CountOfBirthAnimal) == 0 &&
mother.records.GetAsInt(xxx.CountOfBirthInsect) == 0 )
{
mother.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("IGaveBirthFirstTime"));
}
else
{
mother.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("IGaveBirth"));
}
}
if (xxx.is_human(father))
{
father.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("PartnerGaveBirth"));
}
if (xxx.is_human(baby))
if (xxx.is_human(father))
{
father.needs.mood.thoughts.memories.TryGainMemory(ThoughtDef.Named("PartnerGaveBirth"));
}
if (xxx.is_human(baby))
{
Log.Message("Rewriting story of " + baby);
baby.story.childhood = BackstoryDatabase.allBackstories["NA_Childhood"];
Log.Message("[RJW]PostBirth:: Rewriting story of " + baby);
var disabledBaby = BackstoryDatabase.allBackstories["CustomBackstory_NA_Childhood_Disabled"];
if (disabledBaby != null)
{
baby.story.childhood = disabledBaby;
}
else
{
Log.Error("Couldn't find the required Backstory: CustomBackstory_NA_Childhood_Disabled!");
baby.story.childhood = null;
}
}
}
if (baby.playerSettings != null && mother.playerSettings != null)
{
baby.playerSettings.AreaRestriction = mother.playerSettings.AreaRestriction;
}
//spawn futa
bool isfuta = spawnfutachild(baby, mother, father);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment