public static bool Prefix(ref List <Pawn> __result, IncidentWorker_NeutralGroup __instance, IncidentParms parms)
        {
            Map         map  = (Map)parms.target;
            List <Pawn> list = PawnGroupMakerUtility.GeneratePawns(IncidentParmsUtility.GetDefaultPawnGroupMakerParms((PawnGroupKindDef)PawnGroupKindDefInfo.Invoke(__instance, new object[] { }), parms, ensureCanGenerateAtLeastOnePawn: true), warnOnZeroResults: false).ToList();

            foreach (Pawn item in list)
            {
                IntVec3 loc = CellFinderExtended.RandomClosewalkCellNear(parms.spawnCenter, map, item.kindDef, 5);
                GenSpawn.Spawn(item, loc, map);
            }
            __result = list;
            return(false);
        }
示例#2
0
 public static void OnGroupSpawned(IncidentWorker_NeutralGroup __instance, List <Pawn> __result)
 {
 }