From c6264444812fee9cdd27451c4df45023d957c435 Mon Sep 17 00:00:00 2001
From: Ed86 <email@email.com>
Date: Sat, 20 Jul 2019 21:25:00 +0300
Subject: [PATCH] fix for insect pregnancy generating jelly at current map
 instead of mother's

---
 .../Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Source/Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs b/Source/Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs
index f119ab2c..98569e84 100644
--- a/Source/Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs
+++ b/Source/Modules/Pregnancy/Hediffs/Hediff_InsectEggPregnancy.cs
@@ -267,7 +267,10 @@ namespace rjw
 				}
 				FilthMaker.MakeFilth(mother.Position, mother.Map, ThingDefOf.Filth_AmnioticFluid, mother.LabelIndefinite(), 5);
 				int howmuch = xxx.has_quirk(mother, "Incubator") ? Rand.Range(1, 3) * 2 : Rand.Range(1, 3);
-				DebugThingPlaceHelper.DebugSpawn(ThingDef.Named("InsectJelly"), mother.InteractionCell, howmuch, false);
+				//DebugThingPlaceHelper.DebugSpawn(ThingDef.Named("InsectJelly"), mother.InteractionCell, howmuch, false);
+				int i = 0;
+				while (i++ < howmuch)
+					GenSpawn.Spawn(ThingDefOf.InsectJelly, mother.InteractionCell, mother.Map);
 			}
 
 			mother.health.RemoveHediff(this);
-- 
GitLab