Small refactor of MultiplePregnancy birth code

This commit is contained in:
lutepickle 2024-05-18 22:51:59 -07:00
parent 16d17e01d7
commit b5bfec7498

View file

@ -87,14 +87,10 @@ namespace RJW_Menstruation
PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother);
Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>();
if (mother.Faction != null && !(mother.Faction?.IsPlayer ?? false) && sex_need != null)
{
sex_need.CurLevel = 1.0f;
}
if (mother.Faction != null)
{
if (mother.Faction != baby.Faction)
baby.SetFaction(mother.Faction);
if (!mother.Faction.IsPlayer && sex_need != null) sex_need.CurLevel = 1.0f;
if (mother.Faction != baby.Faction) baby.SetFaction(mother.Faction);
}
if (mother.IsSlaveOfColony)
{
@ -149,14 +145,10 @@ namespace RJW_Menstruation
PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother);
Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>();
if (mother.Faction != null && !(mother.Faction?.IsPlayer ?? false) && sex_need != null)
{
sex_need.CurLevel = 1.0f;
}
if (mother.Faction != null)
{
if (mother.Faction != baby.Faction)
baby.SetFaction(mother.Faction);
if (!mother.Faction.IsPlayer && sex_need != null) sex_need.CurLevel = 1.0f;
if (mother.Faction != baby.Faction) baby.SetFaction(mother.Faction);
}
Train(baby, mother);