mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Minor Comments and Refactoring - Letter for Mytosis Birth
This commit is contained in:
parent
8139991123
commit
63564a2761
9 changed files with 31 additions and 31 deletions
|
@ -20,8 +20,6 @@ namespace RJWLoveFeeding
|
|||
[HarmonyPostfix]
|
||||
public static void Postfix(ref bool __result, Pawn pawn, bool mustBeVisible)
|
||||
{
|
||||
|
||||
//Log.Message(xxx.get_pawnname(pawn) + " is in patch" + __result);
|
||||
bool isPregnant = __result;
|
||||
if (MultiPregnancy != null)
|
||||
{
|
||||
|
@ -31,7 +29,6 @@ namespace RJWLoveFeeding
|
|||
try
|
||||
{
|
||||
isPregnant = MultiplePregnancies.RJWMultiplePregnancy(isPregnant, pawn);
|
||||
//Log.Message(xxx.get_pawnname(pawn) + " is " + isPregnant);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -40,14 +37,11 @@ namespace RJWLoveFeeding
|
|||
}
|
||||
__result = isPregnant;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static bool RJWMultiplePregnancy(bool isPregnant, Pawn fucked)
|
||||
{
|
||||
|
||||
if ((fucked != null) && !xxx.is_animal(fucked))
|
||||
{
|
||||
|
||||
|
@ -59,18 +53,12 @@ namespace RJWLoveFeeding
|
|||
|
||||
if (setNoPreggo.NullOrEmpty())
|
||||
{
|
||||
//Log.Message("No other hediffs preventing pregnancy");
|
||||
Pawn_GeneTracker genes = fucked.genes;
|
||||
if (genes.HasActiveGene(RJW_Genes.GeneDefOf.RS_MultiPregnancy))
|
||||
{
|
||||
Log.Message(xxx.get_pawnname(fucked) + " has multipregnancy gene");
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Log.Message(xxx.get_pawnname(fucked) + " has NOT multipreg gene");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -57,7 +57,9 @@ namespace RJW_Genes
|
|||
{
|
||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug)
|
||||
{
|
||||
ModLog.Warning("Labor state for pawn " + __instance.pawn.NameShortColored + " (" + __instance.pawn.ThingID + ") is not null despite all checks passing for determining first instance of Hediff_Labor - this warning should never occur, and may indicate a bug in Hediff_LaborPushing of lingering labor state from a previous pregnancy");
|
||||
ModLog.Warning("Labor state for pawn " + __instance.pawn.NameShortColored + " (" + __instance.pawn.ThingID +
|
||||
") is not null despite all checks passing for determining first instance of Hediff_Labor - this warning should never occur, " +
|
||||
"and may indicate a bug in Hediff_LaborPushing of lingering labor state from a previous pregnancy");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -137,11 +139,15 @@ namespace RJW_Genes
|
|||
{
|
||||
ModLog.Message("Pawn " + __instance.pawn.NameShortColored + " (" + __instance.pawn.ThingID + ") is having random twins");
|
||||
}
|
||||
Find.LetterStack.ReceiveLetter("Twins!", __instance.pawn.NameShortColored + " is still in labor and is having twins!\n\nBe sure to gather your doctor and additional friends and family to ensure the other baby is also born healthy!", LetterDefOf.AnotherBaby, __instance.pawn);
|
||||
Find.LetterStack.ReceiveLetter("Twins!", __instance.pawn.NameShortColored + " is still in labor and is having twins!\n\n" +
|
||||
"Be sure to gather your doctor and additional friends and family to ensure the other baby is also born healthy!",
|
||||
LetterDefOf.AnotherBaby, __instance.pawn);
|
||||
return;
|
||||
}
|
||||
|
||||
Find.LetterStack.ReceiveLetter("Another baby!", __instance.pawn.NameShortColored + " is still in labor and is having another baby!\n\nBe sure to gather your doctor and additional friends and family to ensure the next baby is also born healthy!", LetterDefOf.AnotherBaby, __instance.pawn);
|
||||
Find.LetterStack.ReceiveLetter("Another baby!", __instance.pawn.NameShortColored + " is still in labor and is having another baby!\n\n" +
|
||||
"Be sure to gather your doctor and additional friends and family to ensure the next baby is also born healthy!",
|
||||
LetterDefOf.AnotherBaby, __instance.pawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue