mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
No commits in common. "36064cb4b9ca30e610d36f640f2ba72a01acf270" and "06c1ade1189527c3dc4b03b22bfabc01b48328ff" have entirely different histories.
36064cb4b9
...
06c1ade118
8 changed files with 43 additions and 23 deletions
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,5 @@
|
||||||
using AnimalGenetics;
|
#if false
|
||||||
|
using AnimalGenetics;
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
@ -38,3 +39,4 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
public class Hediff_MultiplePregnancy : Hediff_BasePregnancy
|
public class Hediff_MultiplePregnancy : Hediff_BasePregnancy
|
||||||
{
|
{
|
||||||
protected Dictionary<Pawn, Pawn> enzygoticSiblings = new Dictionary<Pawn, Pawn>(); // Each pawn and who they split from
|
protected Dictionary<Pawn, Pawn> enzygoticSiblings; // Each pawn and who they split from
|
||||||
|
|
||||||
public override void DiscoverPregnancy()
|
public override void DiscoverPregnancy()
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
father = Trytogetfather(ref pawn);
|
father = Trytogetfather(ref pawn);
|
||||||
}
|
}
|
||||||
Initialize(pawn, father, SelectDnaGivingParent(pawn, father));
|
Initialize(pawn, father);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Pawn baby in babies)
|
foreach (Pawn baby in babies)
|
||||||
|
@ -356,7 +356,7 @@ namespace RJW_Menstruation
|
||||||
Scribe_Collections.Look(ref enzygoticSiblings, "enzygoticSiblings", keyLookMode: LookMode.Reference, valueLookMode: LookMode.Reference);
|
Scribe_Collections.Look(ref enzygoticSiblings, "enzygoticSiblings", keyLookMode: LookMode.Reference, valueLookMode: LookMode.Reference);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void GenerateBabies(DnaGivingParent _)
|
protected override void GenerateBabies()
|
||||||
{
|
{
|
||||||
AddNewBaby(pawn, father);
|
AddNewBaby(pawn, father);
|
||||||
}
|
}
|
||||||
|
@ -378,10 +378,31 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public bool AddNewBaby(Pawn mother, Pawn father)
|
public bool AddNewBaby(Pawn mother, Pawn father)
|
||||||
{
|
{
|
||||||
|
//float melanin;
|
||||||
string lastname;
|
string lastname;
|
||||||
if (xxx.is_human(mother)) lastname = NameTriple.FromString(mother.Name.ToStringFull).Last;
|
if (xxx.is_human(mother))
|
||||||
else if (xxx.is_human(father)) lastname = NameTriple.FromString(father.Name.ToStringFull).Last;
|
{
|
||||||
else lastname = "";
|
if (xxx.is_human(father))
|
||||||
|
{
|
||||||
|
//melanin = ChildRelationUtility.GetRandomChildSkinColor(father.story?.melanin ?? 0f, mother.story?.melanin ?? 0f);
|
||||||
|
//melanin = (mother.story?.melanin ?? 0f + father.story?.melanin ?? 0f) / 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//melanin = mother.story?.melanin ?? 0f;
|
||||||
|
}
|
||||||
|
lastname = NameTriple.FromString(mother.Name.ToStringFull).Last;
|
||||||
|
}
|
||||||
|
else if (xxx.is_human(father))
|
||||||
|
{
|
||||||
|
//melanin = father.story?.melanin ?? 0f;
|
||||||
|
lastname = NameTriple.FromString(father.Name.ToStringFull).Last;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//melanin = Rand.Range(0, 1.0f);
|
||||||
|
lastname = "";
|
||||||
|
}
|
||||||
|
|
||||||
PawnGenerationRequest request = new PawnGenerationRequest(
|
PawnGenerationRequest request = new PawnGenerationRequest(
|
||||||
developmentalStages: DevelopmentalStage.Newborn,
|
developmentalStages: DevelopmentalStage.Newborn,
|
||||||
|
@ -403,6 +424,7 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
int division = 1;
|
int division = 1;
|
||||||
Pawn firstbaby = null;
|
Pawn firstbaby = null;
|
||||||
|
//string firstheadpath = null;
|
||||||
int traitSeed = Rand.Int;
|
int traitSeed = Rand.Int;
|
||||||
List<Trait> parentTraits = GetInheritableTraits(mother, father);
|
List<Trait> parentTraits = GetInheritableTraits(mother, father);
|
||||||
while (Rand.Chance(Configurations.EnzygoticTwinsChance) && division < Configurations.MaxEnzygoticTwins) division++;
|
while (Rand.Chance(Configurations.EnzygoticTwinsChance) && division < Configurations.MaxEnzygoticTwins) division++;
|
||||||
|
@ -454,8 +476,8 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
if (baby.IsHAR())
|
if (baby.IsHAR())
|
||||||
HARCompatibility.CopyHARProperties(baby, firstbaby);
|
HARCompatibility.CopyHARProperties(baby, firstbaby);
|
||||||
if (Configurations.AnimalGeneticsActivated)
|
//if (Configurations.AnimalGeneticsActivated)
|
||||||
AnimalGeneticsCompatibility.CopyGenes(baby, firstbaby);
|
//AnimalGeneticsCompatibility.CopyGenes(baby, firstbaby);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
babies.Add(baby);
|
babies.Add(baby);
|
||||||
|
@ -467,9 +489,9 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public Pawn GenerateBaby(PawnGenerationRequest request, Pawn mother, Pawn father, List<Trait> parentTraits, int traitSeed)
|
public Pawn GenerateBaby(PawnGenerationRequest request, Pawn mother, Pawn father, List<Trait> parentTraits, int traitSeed)
|
||||||
{
|
{
|
||||||
if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PreConception(mother, father);
|
//if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PreConception(mother, father);
|
||||||
Pawn baby = PawnGenerator.GeneratePawn(request);
|
Pawn baby = PawnGenerator.GeneratePawn(request);
|
||||||
if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PostConception();
|
//if (Configurations.AnimalGeneticsActivated) AnimalGeneticsCompatibility.PostConception();
|
||||||
if (baby == null)
|
if (baby == null)
|
||||||
{
|
{
|
||||||
Log.Error("Baby not generated. Request: " + request.ToString());
|
Log.Error("Baby not generated. Request: " + request.ToString());
|
||||||
|
@ -755,6 +777,12 @@ namespace RJW_Menstruation
|
||||||
pawn.story.traits.allTraits = selectedTraits;
|
pawn.story.traits.allTraits = selectedTraits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Initialize(Pawn mother, Pawn dad)
|
||||||
|
{
|
||||||
|
enzygoticSiblings = new Dictionary<Pawn, Pawn>();
|
||||||
|
base.Initialize(mother, dad);
|
||||||
|
}
|
||||||
|
|
||||||
public string DueDate()
|
public string DueDate()
|
||||||
{
|
{
|
||||||
if (pawn.Tile == -1) return "";
|
if (pawn.Tile == -1) return "";
|
||||||
|
|
|
@ -72,7 +72,6 @@
|
||||||
<Compile Include="IngestionOutcomeDoers.cs" />
|
<Compile Include="IngestionOutcomeDoers.cs" />
|
||||||
<Compile Include="Patch\Biotech_Patch.cs" />
|
<Compile Include="Patch\Biotech_Patch.cs" />
|
||||||
<Compile Include="Patch\GC_Patch.cs" />
|
<Compile Include="Patch\GC_Patch.cs" />
|
||||||
<Compile Include="Patch\Gizmo_Patch.cs" />
|
|
||||||
<Compile Include="Recipe_Surgery.cs" />
|
<Compile Include="Recipe_Surgery.cs" />
|
||||||
<Compile Include="StatParts.cs" />
|
<Compile Include="StatParts.cs" />
|
||||||
<Compile Include="UI\Dialog_HybridCustom.cs" />
|
<Compile Include="UI\Dialog_HybridCustom.cs" />
|
||||||
|
@ -81,6 +80,7 @@
|
||||||
<Compile Include="HediffComps\HediffComp_Breast.cs" />
|
<Compile Include="HediffComps\HediffComp_Breast.cs" />
|
||||||
<Compile Include="Hediff_MultiplePregnancy.cs" />
|
<Compile Include="Hediff_MultiplePregnancy.cs" />
|
||||||
<Compile Include="JobDrivers.cs" />
|
<Compile Include="JobDrivers.cs" />
|
||||||
|
<Compile Include="Patch\GetGizmos.cs" />
|
||||||
<Compile Include="UI\Gizmo_Womb.cs" />
|
<Compile Include="UI\Gizmo_Womb.cs" />
|
||||||
<Compile Include="Patch\Harmony.cs" />
|
<Compile Include="Patch\Harmony.cs" />
|
||||||
<Compile Include="HediffComps\HediffComp_Menstruation.cs" />
|
<Compile Include="HediffComps\HediffComp_Menstruation.cs" />
|
||||||
|
@ -98,10 +98,6 @@
|
||||||
<HintPath>..\..\..\..\..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\AlienRace.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\AlienRace.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="AnimalGenetics">
|
|
||||||
<HintPath>..\..\..\..\..\..\..\..\workshop\content\294100\2830943477\1.4\Assemblies\AnimalGenetics.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Assembly-CSharp">
|
<Reference Include="Assembly-CSharp">
|
||||||
<HintPath>..\..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<identifier>RJW Menstruation</identifier>
|
<identifier>RJW Menstruation</identifier>
|
||||||
<version>1.0.8.3</version>
|
<version>1.0.8.2</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<incompatibleWith />
|
<incompatibleWith />
|
||||||
|
@ -11,7 +11,6 @@
|
||||||
<li>rim.job.world</li>
|
<li>rim.job.world</li>
|
||||||
<li>Abraxas.RJW.RaceSupport</li>
|
<li>Abraxas.RJW.RaceSupport</li>
|
||||||
<li>rjw.milk.humanoid</li>
|
<li>rjw.milk.humanoid</li>
|
||||||
<li>Mlie.AnimalGenetics</li>
|
|
||||||
</loadAfter>
|
</loadAfter>
|
||||||
<suggests>
|
<suggests>
|
||||||
</suggests>
|
</suggests>
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
Version 1.0.8.3
|
|
||||||
- Compatibility update for RJW 5.3.0.9
|
|
||||||
- Requires RJW 5.3.0.9
|
|
||||||
- Re-added support for Animal Genetics (Continued).
|
|
||||||
|
|
||||||
Version 1.0.8.2
|
Version 1.0.8.2
|
||||||
- Compatibility update for RJW 5.3.0.7
|
- Compatibility update for RJW 5.3.0.7
|
||||||
- Requires RJW 5.3.0.7
|
- Requires RJW 5.3.0.7
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue