コード例 #1
0
 public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
 {
     for (int i = 0; i < pods.Count; i++)
     {
         for (int j = 0; j < pods[i].innerContainer.Count; j++)
         {
             Pawn pawn = pods[i].innerContainer[j] as Pawn;
             if (pawn == null)
             {
                 continue;
             }
             if (pawn.RaceProps.Humanlike)
             {
                 GenGuest.AddPrisonerSoldThoughts(pawn);
             }
             else if (pawn.RaceProps.Animal && pawn.relations != null)
             {
                 Pawn firstDirectRelationPawn = pawn.relations.GetFirstDirectRelationPawn(PawnRelationDefOf.Bond);
                 if (firstDirectRelationPawn != null && firstDirectRelationPawn.needs.mood != null)
                 {
                     pawn.relations.RemoveDirectRelation(PawnRelationDefOf.Bond, firstDirectRelationPawn);
                     firstDirectRelationPawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.SoldMyBondedAnimalMood);
                 }
             }
         }
     }
     FactionGiftUtility.GiveGift(pods, settlement);
 }
コード例 #2
0
 public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
 {
     for (int i = 0; i < pods.Count; i++)
     {
         for (int j = 0; j < pods[i].innerContainer.Count; j++)
         {
             Pawn pawn = pods[i].innerContainer[j] as Pawn;
             if (pawn != null && pawn.RaceProps.Humanlike)
             {
                 GenGuest.AddPrisonerSoldThoughts(pawn);
             }
         }
     }
     FactionGiftUtility.GiveGift(pods, settlement);
 }