private Thing SpawnTunnels(int hiveCount, Map map) { IntVec3 loc; if (!InfestationCellFinder.TryFindCell(out loc, map)) { return(null); } Thing thing = GenSpawn.Spawn(ThingMaker.MakeThing(ThingDefOf.TunnelHiveSpawner, null), loc, map, WipeMode.FullRefund); for (int i = 0; i < hiveCount - 1; i++) { loc = CompSpawnerHives.FindChildHiveLocation(thing.Position, map, ThingDefOf.Hive, ThingDefOf.Hive.GetCompProperties <CompProperties_SpawnerHives>(), false, true); if (loc.IsValid) { thing = GenSpawn.Spawn(ThingMaker.MakeThing(ThingDefOf.TunnelHiveSpawner, null), loc, map, WipeMode.FullRefund); } } return(thing); }
static bool Prefix(CompSpawnerHives __instance, string __result) { __result = string.Empty; return(false); //override }