public override bool TryExecute(IncidentParms parms) { ////Spawn a Dark Young //if (CthulhuUtility.IsCosmicHorrorsLoaded()) //{ // CthulhuUtility.SpawnPawnsOfCountAt(DefDatabase<PawnKindDef>.GetNamed("DarkYoung"), altar.Position, 1, Faction.OfPlayer); //} //else //{ // CthulhuUtility.SpawnPawnsOfCountAt(PawnKindDefOf.Megaspider, altar.Position, Rand.Range(1,2), Faction.OfPlayer); //} //Messages.Message("The Dark Young of Shub Niggurath coils out from under the sacrifice.", MessageSound.Benefit); //return true; IntVec3 intVec; //Find a drop spot if (!ShipChunkDropCellFinder.TryFindShipChunkDropCell(out intVec, Find.Map.Center, 999999)) { return(false); } //Spawn 1 Womb Between Worlds Building_WombBetweenWorlds thing = (Building_WombBetweenWorlds)ThingMaker.MakeThing(CultDefOfs.WombBetweenWorlds, null); thing.SetFaction(Faction.OfPlayer); GenPlace.TryPlaceThing(thing, intVec.RandomAdjacentCell8Way(), ThingPlaceMode.Near); MapComponent_SacrificeTracker.Get.lastLocation = intVec; Messages.Message(".", intVec, MessageSound.Benefit); return(true); }
protected override bool TryExecuteWorker(IncidentParms parms) { Map map = parms.target as Map; IntVec3 intVec; //Find a drop spot if (!CultUtility.TryFindDropCell(map.Center, map, 999999, out intVec)) { return(false); } //Spawn 1 Womb Between Worlds Building_WombBetweenWorlds thing = (Building_WombBetweenWorlds)ThingMaker.MakeThing(CultsDefOf.Cults_WombBetweenWorlds, null); thing.SetFaction(Faction.OfPlayer); GenPlace.TryPlaceThing(thing, intVec.RandomAdjacentCell8Way(), map, ThingPlaceMode.Near); map.GetComponent <MapComponent_SacrificeTracker>().lastLocation = intVec; //Messages.Message(".", intVec, MessageTypeDefOf.PositiveEvent); return(true); }