mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Letter on Queen Birth
This commit is contained in:
parent
1471eeea62
commit
2ad91a1076
1 changed files with 11 additions and 2 deletions
|
@ -50,8 +50,7 @@ namespace RJW_Genes
|
||||||
{
|
{
|
||||||
pawn.genes.SetXenotype(queenDef);
|
pawn.genes.SetXenotype(queenDef);
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a new queen with xenotype {queenDef.defName} ({hiveOffspringChanceDef.queenChance * 100}% chance,rolled {roll})");
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a new queen with xenotype {queenDef.defName} ({hiveOffspringChanceDef.queenChance * 100}% chance,rolled {roll})");
|
||||||
// TODO: Make a letter ? Letter doesn't show :(
|
MakeQueenBornLetter(pawn);
|
||||||
Find.LetterStack.ReceiveLetter("New Queen", "A new Queen was born! Make sure to adress inheritance before the new queen reaches adolesence.", LetterDefOf.BabyBirth, (LookTargets)(Thing)pawn);
|
|
||||||
}
|
}
|
||||||
// Case 2.b: New Drone born
|
// Case 2.b: New Drone born
|
||||||
else if (roll < hiveOffspringChanceDef.droneChance + hiveOffspringChanceDef.queenChance)
|
else if (roll < hiveOffspringChanceDef.droneChance + hiveOffspringChanceDef.queenChance)
|
||||||
|
@ -115,6 +114,16 @@ namespace RJW_Genes
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void MakeQueenBornLetter(Pawn bornQueen)
|
||||||
|
{
|
||||||
|
if (bornQueen == null) return;
|
||||||
|
|
||||||
|
var letter= LetterMaker.MakeLetter(
|
||||||
|
"New Queen", "A new Queen was born! Make sure to adress inheritance before the new queen reaches adolesence.", LetterDefOf.NeutralEvent, bornQueen
|
||||||
|
);
|
||||||
|
//letter.Start();
|
||||||
|
Find.LetterStack.ReceiveLetter(letter);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up if there is a Xenotype with Queen-Gene for the pawns parents.
|
/// Looks up if there is a Xenotype with Queen-Gene for the pawns parents.
|
||||||
|
|
Loading…
Reference in a new issue