Esempio n. 1
0
        private static void TestForceKillx100()
        {
            int  num = 0;
            Pawn pawn;

            while (true)
            {
                if (num < 100)
                {
                    PawnKindDef random = DefDatabase <PawnKindDef> .GetRandom();

                    pawn = PawnGenerator.GeneratePawn(random, FactionUtility.DefaultFactionFrom(random.defaultFactionType));
                    GenSpawn.Spawn(pawn, CellFinderLoose.RandomCellWith((IntVec3 c) => c.Standable(Find.CurrentMap), Find.CurrentMap), Find.CurrentMap);
                    HealthUtility.DamageUntilDead(pawn);
                    if (!pawn.Dead)
                    {
                        break;
                    }
                    num++;
                    continue;
                }
                return;
            }
            Log.Error("Pawn died not die: " + pawn + " at " + pawn.Position);
        }
        private static void TestForceKillx100()
        {
            for (int i = 0; i < 100; i++)
            {
                PawnKindDef random = DefDatabase <PawnKindDef> .GetRandom();

                Pawn pawn = PawnGenerator.GeneratePawn(random, FactionUtility.DefaultFactionFrom(random.defaultFactionType));
                GenSpawn.Spawn(pawn, CellFinderLoose.RandomCellWith((IntVec3 c) => c.Standable(Find.CurrentMap), Find.CurrentMap), Find.CurrentMap);
                HealthUtility.DamageUntilDead(pawn);
                if (!pawn.Dead)
                {
                    Log.Error(string.Concat("Pawn died not die: ", pawn, " at ", pawn.Position));
                    break;
                }
            }
        }