mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Refactor AddNewBaby a bit so enzygotic twins get registered for babies without a story. And a smidge more tolerant of null pawn generation
This commit is contained in:
parent
dab0913032
commit
df1455ece2
1 changed files with 16 additions and 17 deletions
|
@ -424,11 +424,16 @@ namespace RJW_Menstruation
|
||||||
for (int i = 0; i < division; i++)
|
for (int i = 0; i < division; i++)
|
||||||
{
|
{
|
||||||
Pawn baby = GenerateBaby(request, mother, father, parentTraits, traitSeed);
|
Pawn baby = GenerateBaby(request, mother, father, parentTraits, traitSeed);
|
||||||
|
if (baby == null) break;
|
||||||
if (division > 1)
|
if (division > 1)
|
||||||
{
|
{
|
||||||
if (i == 0 && baby.story != null)
|
if (i == 0) firstbaby = baby;
|
||||||
|
else enzygoticSiblings?.Add(baby, firstbaby);
|
||||||
|
|
||||||
|
if (baby.story == null) continue;
|
||||||
|
|
||||||
|
if (i == 0)
|
||||||
{
|
{
|
||||||
firstbaby = baby;
|
|
||||||
request.FixedGender = baby.gender;
|
request.FixedGender = baby.gender;
|
||||||
firstheadpath = (string)baby.story.GetMemberValue("headGraphicPath");
|
firstheadpath = (string)baby.story.GetMemberValue("headGraphicPath");
|
||||||
if (firstheadpath == null)
|
if (firstheadpath == null)
|
||||||
|
@ -445,25 +450,19 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (baby.story != null)
|
baby.story.hairDef = firstbaby.story.hairDef;
|
||||||
|
baby.story.hairColor = firstbaby.story.hairColor;
|
||||||
|
baby.story.bodyType = firstbaby.story.bodyType;
|
||||||
|
baby.story.crownType = firstbaby.story.crownType;
|
||||||
|
baby.story.SetMemberValue("headGraphicPath", firstheadpath);
|
||||||
|
|
||||||
|
if (Configurations.HARActivated && baby.IsHAR())
|
||||||
{
|
{
|
||||||
baby.story.hairDef = firstbaby.story.hairDef;
|
baby.SetHARCrown(firstHARcrown);
|
||||||
baby.story.hairColor = firstbaby.story.hairColor;
|
|
||||||
baby.story.bodyType = firstbaby.story.bodyType;
|
|
||||||
baby.story.crownType = firstbaby.story.crownType;
|
|
||||||
baby.story.SetMemberValue("headGraphicPath", firstheadpath);
|
|
||||||
|
|
||||||
if (Configurations.HARActivated && baby.IsHAR())
|
|
||||||
{
|
|
||||||
baby.SetHARCrown(firstHARcrown);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (firstbaby != null) enzygoticSiblings?.Add(baby, firstbaby);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
babies.Add(baby);
|
||||||
if (baby != null) babies.Add(baby);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue