Skip to content
Snippets Groups Projects
Commit 85bbeeea authored by Ed86's avatar Ed86
Browse files

set miscarry, abort, kill, to discard babies before removing pregnancy hediff

parent d5b1687d
No related branches found
No related tags found
No related merge requests found
......@@ -107,7 +107,7 @@ namespace rjw
//(debug->add heddif)
//init empty preg, instabirth, cause error during birthing
//Initialize(pawn, father);
//Initialize(pawn, Trytogetfather(ref pawn));
}
public override bool Visible => is_discovered;
......@@ -160,23 +160,30 @@ namespace rjw
public virtual void Miscarry()
{
if (!babies.NullOrEmpty())
foreach (Pawn baby in babies)
{
baby.Discard();
}
pawn.health?.RemoveHediff(this);
}
/// <summary>
/// Called on abortion (noy implemented yet)
/// </summary>
public virtual void Abort() { }
public virtual void Abort()
{
Miscarry();
}
/// <summary>
/// Mechanoids can remove pregnancy
/// </summary>
public virtual void Kill()
{
pawn.health?.RemoveHediff(this);
Miscarry();
}
[SyncMethod]
public Pawn partstospawn(Pawn baby, Pawn mother, Pawn dad)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment