Example #1
0
 public override void Destroy(DestroyMode mode = DestroyMode.Vanish)
 {
     if (!this.questTags.NullOrEmpty <string>())
     {
         bool         flag = false;
         List <Thing> list = base.Map.listerThings.ThingsOfDef(this.def);
         for (int i = 0; i < list.Count; i++)
         {
             Hive hive;
             if ((hive = (list[i] as Hive)) != null && hive != this && hive.CompDormant.Awake && !hive.questTags.NullOrEmpty <string>() && QuestUtility.AnyMatchingTags(hive.questTags, this.questTags))
             {
                 flag = true;
                 break;
             }
         }
         if (!flag)
         {
             QuestUtility.SendQuestTargetSignals(this.questTags, "AllHivesDestroyed");
         }
     }
     base.Destroy(mode);
 }