And while reviewing this post I realised that I didn't account for if you give away the baby or babies so you could either set it up in one of two ways first:
func _on_giveaway_pressed():
birthingMother.preg.unborn_baby = []
birthingMother.preg.baby_count = 0
birthingMother.metrics.birth += 1
birthingMother.preg.is_preg = false
birthingMother.preg.duration = 0
birthingMother.preg.ovulation_stage = 2
birthingMother.preg.ovulation_day = -5
birthingMother = null
get_node("birthpanel").hide()
That should just delete all of the mother's remaining children when you can't or don't want to keep them, but won't allow you to pass on one and keep a later child
func _on_giveaway_pressed():
birthingMother.preg.unborn_baby.erase(birthingMother.preg.unborn_baby[0])
birthingMother.preg.baby_count -= 1
if birthingMother.preg.baby_count > 0:
childbirth(birthingMother, birthingMother.preg.unborn_baby[0].id)
else:
birthingMother.metrics.birth += 1
birthingMother.preg.is_preg = false
birthingMother.preg.duration = 0
birthingMother.preg.ovulation_stage = 2
birthingMother.preg.ovulation_day = -5
birthingMother = null
get_node("birthpanel").hide()
That should remove the baby being shown, then reload the panel for the next baby, but requires you to manually pass on every child