public Tale_DoublePawnKilledBy(Pawn victim, DamageInfo dinfo) : base(victim, null)
 {
     if (dinfo.Instigator != null && dinfo.Instigator is Pawn)
     {
         this.secondPawnData = TaleData_Pawn.GenerateFrom((Pawn)dinfo.Instigator);
     }
 }
Exemple #2
0
 public Tale_SinglePawn(Pawn pawn)
 {
     pawnData = TaleData_Pawn.GenerateFrom(pawn);
     if (pawn.SpawnedOrAnyParentSpawned)
     {
         surroundings = TaleData_Surroundings.GenerateFrom(pawn.PositionHeld, pawn.MapHeld);
     }
 }
        public static TaleData_Pawn GenerateRandom()
        {
            PawnKindDef random = DefDatabase <PawnKindDef> .GetRandom();

            Faction faction = FactionUtility.DefaultFactionFrom(random.defaultFactionType);
            Pawn    pawn    = PawnGenerator.GeneratePawn(random, faction);

            return(TaleData_Pawn.GenerateFrom(pawn));
        }
Exemple #4
0
 public Tale_DoublePawn(Pawn firstPawn, Pawn secondPawn)
 {
     firstPawnData = TaleData_Pawn.GenerateFrom(firstPawn);
     if (secondPawn != null)
     {
         secondPawnData = TaleData_Pawn.GenerateFrom(secondPawn);
     }
     if (firstPawn.SpawnedOrAnyParentSpawned)
     {
         surroundings = TaleData_Surroundings.GenerateFrom(firstPawn.PositionHeld, firstPawn.MapHeld);
     }
 }