private static void SpawnShrapnel(ThingDef def, int quantity, IntVec3 center, Map map, float angle, float distanceFactor) { for (int i = 0; i < quantity; i++) { IntVec3 intVec = SkyfallerShrapnelUtility.GenerateShrapnelLocation(center, angle, distanceFactor); if (SkyfallerShrapnelUtility.IsGoodShrapnelCell(intVec, map) && intVec.GetFirstThing(map, def) == null) { GenSpawn.Spawn(def, intVec, map); } } }
private static void ThrowShrapnelMotes(int count, IntVec3 center, Map map, float angle, float distanceFactor) { for (int i = 0; i < count; i++) { IntVec3 c = SkyfallerShrapnelUtility.GenerateShrapnelLocation(center, angle, distanceFactor); if (SkyfallerShrapnelUtility.IsGoodShrapnelCell(c, map)) { MoteMaker.ThrowDustPuff(c.ToVector3Shifted() + Gen.RandomHorizontalVector(0.5f), map, 2f); } } }