Add debug action to remove eggs, auto-remove eggs on setting follicular or bleeding

This commit is contained in:
lutepickle 2023-05-04 07:54:58 -07:00
parent 802fbbe3ca
commit 8f1c2eceb3
3 changed files with 18 additions and 0 deletions

Binary file not shown.

View file

@ -10,7 +10,10 @@ namespace RJW_Menstruation
private static void SetFollicular(Pawn p) private static void SetFollicular(Pawn p)
{ {
foreach (HediffComp_Menstruation comp in p.GetMenstruationComps()) foreach (HediffComp_Menstruation comp in p.GetMenstruationComps())
{
comp.GoNextStage(HediffComp_Menstruation.Stage.Follicular); comp.GoNextStage(HediffComp_Menstruation.Stage.Follicular);
comp.RemoveAllEggs();
}
Messages.Message($"{p} is now follicular", p, MessageTypeDefOf.NeutralEvent, false); Messages.Message($"{p} is now follicular", p, MessageTypeDefOf.NeutralEvent, false);
} }
@ -34,7 +37,10 @@ namespace RJW_Menstruation
private static void SetBleeding(Pawn p) private static void SetBleeding(Pawn p)
{ {
foreach (HediffComp_Menstruation comp in p.GetMenstruationComps()) foreach (HediffComp_Menstruation comp in p.GetMenstruationComps())
{
comp.GoNextStage(HediffComp_Menstruation.Stage.Bleeding); comp.GoNextStage(HediffComp_Menstruation.Stage.Bleeding);
comp.RemoveAllEggs();
}
Messages.Message($"{p} is now bleeding", p, MessageTypeDefOf.NeutralEvent, false); Messages.Message($"{p} is now bleeding", p, MessageTypeDefOf.NeutralEvent, false);
} }
/* /*
@ -57,6 +63,13 @@ namespace RJW_Menstruation
comp.RemoveAllCums(); comp.RemoveAllCums();
Messages.Message($"All cum removed from {p}'s womb", p, MessageTypeDefOf.NeutralEvent, false); Messages.Message($"All cum removed from {p}'s womb", p, MessageTypeDefOf.NeutralEvent, false);
} }
[DebugAction("RJW Menstruation", "Remove all eggs from pawn's womb", false, false, actionType = DebugActionType.ToolMapForPawns, allowedGameStates = AllowedGameStates.Playing)]
private static void RemoveEggs(Pawn p)
{
foreach (HediffComp_Menstruation comp in p.GetMenstruationComps())
comp.RemoveAllEggs();
Messages.Message($"All eggs removed from {p}'s womb", p, MessageTypeDefOf.NeutralEvent, false);
}
[DebugAction("RJW Menstruation", "Add egg to pawn's next ovulation", false, false, actionType = DebugActionType.ToolMapForPawns, allowedGameStates = AllowedGameStates.Playing)] [DebugAction("RJW Menstruation", "Add egg to pawn's next ovulation", false, false, actionType = DebugActionType.ToolMapForPawns, allowedGameStates = AllowedGameStates.Playing)]
private static void AddEgg(Pawn p) private static void AddEgg(Pawn p)
{ {

View file

@ -1143,6 +1143,11 @@ namespace RJW_Menstruation
cums.Clear(); cums.Clear();
} }
public void RemoveAllEggs()
{
eggs.Clear();
}
/// <summary> /// <summary>
/// Fertilize eggs and return the result /// Fertilize eggs and return the result