mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
No commits in common. "8d919739bfdb8e88b1d22a4263c64e2ceeb70e78" and "2bc113386120bc2a39cd47a74f204954a3cee557" have entirely different histories.
8d919739bf
...
2bc1133861
13 changed files with 4 additions and 116 deletions
Binary file not shown.
|
@ -226,19 +226,6 @@
|
||||||
</stages>
|
</stages>
|
||||||
</ThoughtDef>
|
</ThoughtDef>
|
||||||
|
|
||||||
<ThoughtDef MayRequire="Ludeon.Rimworld.Ideology">
|
|
||||||
<defName>EggRestorationReceived</defName>
|
|
||||||
<thoughtClass>Thought_Memory</thoughtClass>
|
|
||||||
<durationDays>4</durationDays>
|
|
||||||
<stackLimit>1</stackLimit>
|
|
||||||
<stages>
|
|
||||||
<li>
|
|
||||||
<label>egg restoration received</label>
|
|
||||||
<description>I can breed for a little longer now.</description>
|
|
||||||
<baseMoodEffect>2</baseMoodEffect>
|
|
||||||
</li>
|
|
||||||
</stages>
|
|
||||||
</ThoughtDef>
|
|
||||||
|
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
||||||
|
|
|
@ -136,7 +136,5 @@
|
||||||
<CustomHybrid_Tooltip>When {0} breed with {1}, {2} will be born at {3} chance. If both races have hybrid definitions for each other, the father's definition will be used.</CustomHybrid_Tooltip>
|
<CustomHybrid_Tooltip>When {0} breed with {1}, {2} will be born at {3} chance. If both races have hybrid definitions for each other, the father's definition will be used.</CustomHybrid_Tooltip>
|
||||||
|
|
||||||
<CannotNoEggs>No eggs</CannotNoEggs>
|
<CannotNoEggs>No eggs</CannotNoEggs>
|
||||||
<CannotNoWomb>Must have a womb</CannotNoWomb>
|
|
||||||
<EggRestorationCompleted>{PAWN_labelShort} has completed {PAWN_possessive} egg restoration cycle.</EggRestorationCompleted>
|
|
||||||
|
|
||||||
</LanguageData>
|
</LanguageData>
|
Binary file not shown.
|
@ -1,24 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Patch>
|
|
||||||
<Operation Class="PatchOperationFindMod">
|
|
||||||
<mods>
|
|
||||||
<li>Ideology</li>
|
|
||||||
</mods>
|
|
||||||
<match Class="PatchOperationAdd">
|
|
||||||
<xpath>/Defs/ThingDef[defName="BiosculpterPod"]/comps</xpath>
|
|
||||||
<value>
|
|
||||||
<li Class="RJW_Menstruation.CompProperties_BiosculpterPod_EggRestorationCycle">
|
|
||||||
<key>eggRestoration</key>
|
|
||||||
<label>egg restoration</label>
|
|
||||||
<description>Restore one year worth of eggs in each womb.</description>
|
|
||||||
<iconPath>Eggs/Egg</iconPath>
|
|
||||||
<durationDays>4</durationDays>
|
|
||||||
<!--Apparently the game is hardcoded to give the age reversal thought to anything with gainThoughtOnCompletion-->
|
|
||||||
<!--<gainThoughtOnCompletion>EggRestorationReceived</gainThoughtOnCompletion>-->
|
|
||||||
<operatingColor>(0.867, 0.373, 0.396)</operatingColor>
|
|
||||||
<yearsToRestore>1.0</yearsToRestore>
|
|
||||||
</li>
|
|
||||||
</value>
|
|
||||||
</match>
|
|
||||||
</Operation>
|
|
||||||
</Patch>
|
|
|
@ -1,27 +0,0 @@
|
||||||
using RimWorld;
|
|
||||||
using Verse;
|
|
||||||
|
|
||||||
namespace RJW_Menstruation
|
|
||||||
{
|
|
||||||
public class CompProperties_BiosculpterPod_EggRestorationCycle : CompProperties_BiosculpterPod_BaseCycle
|
|
||||||
{
|
|
||||||
public CompProperties_BiosculpterPod_EggRestorationCycle()
|
|
||||||
{
|
|
||||||
compClass = typeof(CompBiosculpterPod_EggRestorationCycle);
|
|
||||||
}
|
|
||||||
|
|
||||||
public float yearsToRestore;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CompBiosculpterPod_EggRestorationCycle : CompBiosculpterPod_Cycle
|
|
||||||
{
|
|
||||||
|
|
||||||
public override void CycleCompleted(Pawn occupant)
|
|
||||||
{
|
|
||||||
foreach (HediffComp_Menstruation comp in occupant.GetMenstruationComps())
|
|
||||||
comp.RestoreEggs(((CompProperties_BiosculpterPod_EggRestorationCycle)Props).yearsToRestore);
|
|
||||||
|
|
||||||
Messages.Message(Translations.EggRestorationCompleted(occupant.Named("PAWN")), occupant, MessageTypeDefOf.PositiveEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1792,16 +1792,6 @@ namespace RJW_Menstruation
|
||||||
crampPain = original.crampPain;
|
crampPain = original.crampPain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int EggsRestoredPerBiosculptor(float yearsWorth)
|
|
||||||
{
|
|
||||||
return Math.Max(1, (int)((float)RaceCyclesPerYear() * yearsWorth));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RestoreEggs(float yearsWorth)
|
|
||||||
{
|
|
||||||
ovarypower += EggsRestoredPerBiosculptor(yearsWorth);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Egg : IExposable
|
public class Egg : IExposable
|
||||||
{
|
{
|
||||||
public bool fertilized;
|
public bool fertilized;
|
||||||
|
|
|
@ -160,21 +160,6 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
if (xxx.is_human(mother)) TaleRecorder.RecordTale(TaleDefOf.GaveBirth, new object[] { mother, baby });
|
if (xxx.is_human(mother)) TaleRecorder.RecordTale(TaleDefOf.GaveBirth, new object[] { mother, baby });
|
||||||
|
|
||||||
if (ModsConfig.BiotechActive)
|
|
||||||
{
|
|
||||||
// Ugly, but it'll have to do
|
|
||||||
OutcomeChance bestOutcome = RitualOutcomeEffectDefOf.ChildBirth.outcomeChances.Find(chance => chance.positivityIndex == 1);
|
|
||||||
|
|
||||||
string label = bestOutcome.label;
|
|
||||||
string description = bestOutcome.description.Formatted(mother.Named("MOTHER"));
|
|
||||||
|
|
||||||
ChoiceLetter_BabyBirth choiceLetter_BabyBirth = (ChoiceLetter_BabyBirth)LetterMaker.MakeLetter(
|
|
||||||
label, description, LetterDefOf.BabyBirth, baby
|
|
||||||
);
|
|
||||||
choiceLetter_BabyBirth.Start();
|
|
||||||
Find.LetterStack.ReceiveLetter(choiceLetter_BabyBirth);
|
|
||||||
}
|
|
||||||
|
|
||||||
PostBirth(mother, father, baby);
|
PostBirth(mother, father, baby);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
@ -177,16 +176,4 @@ namespace RJW_Menstruation
|
||||||
return TryTerminatePregnancy_Patch.Transpiler(instructions);
|
return TryTerminatePregnancy_Patch.Transpiler(instructions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(CompBiosculpterPod), nameof(CompBiosculpterPod.CannotUseNowPawnCycleReason), new Type[] { typeof(Pawn), typeof(Pawn), typeof(CompBiosculpterPod_Cycle), typeof(bool) } )]
|
|
||||||
public class CannotUseNowPawnCycleReason_Patch
|
|
||||||
{
|
|
||||||
private const string eggRestorationKey = "eggRestoration";
|
|
||||||
public static void Postfix(ref string __result, Pawn biosculptee, CompBiosculpterPod_Cycle cycle)
|
|
||||||
{
|
|
||||||
if (__result != null) return;
|
|
||||||
if(cycle.Props.key == eggRestorationKey && !biosculptee.GetMenstruationComps().Any())
|
|
||||||
__result = Translations.CannotNoWomb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -61,7 +61,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Compatibility\AnimalGeneticsCompatibility.cs" />
|
<Compile Include="Compatibility\AnimalGeneticsCompatibility.cs" />
|
||||||
<Compile Include="Compatibility\HARCompatibility.cs" />
|
<Compile Include="Compatibility\HARCompatibility.cs" />
|
||||||
<Compile Include="CompBiosclupterPod_EggRestorationCycle.cs" />
|
|
||||||
<Compile Include="Configurations.cs" />
|
<Compile Include="Configurations.cs" />
|
||||||
<Compile Include="Cum.cs" />
|
<Compile Include="Cum.cs" />
|
||||||
<Compile Include="DebugActions.cs" />
|
<Compile Include="DebugActions.cs" />
|
||||||
|
|
|
@ -139,9 +139,6 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public static readonly string CannotNoEggs = "CannotNoEggs".Translate();
|
public static readonly string CannotNoEggs = "CannotNoEggs".Translate();
|
||||||
|
|
||||||
public static readonly string CannotNoWomb = "CannotNoWomb".Translate();
|
|
||||||
public static string EggRestorationCompleted(NamedArgument name) { return "EggRestorationCompleted".Translate(name); }
|
|
||||||
|
|
||||||
public static readonly string CustomHybrid_List_Title = "CustomHybrid_List_Title".Translate();
|
public static readonly string CustomHybrid_List_Title = "CustomHybrid_List_Title".Translate();
|
||||||
static public string CustomHybrid_Title(string label) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Title", label); }
|
static public string CustomHybrid_Title(string label) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Title", label); }
|
||||||
static public string CustomHybrid_Tooltip(string label, string breedee, string baby, string chance) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Tooltip", label, breedee, baby, chance); }
|
static public string CustomHybrid_Tooltip(string label, string breedee, string baby, string chance) { return TranslatorFormattedStringExtensions.Translate("CustomHybrid_Tooltip", label, breedee, baby, chance); }
|
||||||
|
|
|
@ -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.5</version>
|
<version>1.0.8.4</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<incompatibleWith />
|
<incompatibleWith />
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
Version 1.0.8.5
|
|
||||||
- Added biosculptor recipe to restore 1 year's worth of eggs.
|
|
||||||
- Babies born from multiple pregnancy will properly produce the prompt to name them.
|
|
||||||
|
|
||||||
Version 1.0.8.4
|
Version 1.0.8.4
|
||||||
- Fix Biotech xenotype inheritance for single-child pregnancies.
|
- Fix Biotech xenotype inheritance for single-child pregnancies.
|
||||||
- Fix error in Traditional Chinese translation.
|
- Fix error in Traditional Chinese translation.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue