Example #1
0
 public override void Selected()
 {
     base.Selected();
     Blueprint.RecacheBuildables();
     if (!Blueprint.AvailableContents.Any())
     {
         Messages.Message("Fluffy.Blueprints.NothingAvailableInBlueprint".Translate(Blueprint.name),
                          MessageTypeDefOf.RejectInput);
     }
     else
     {
         var unavailable = Blueprint.contents.Except(Blueprint.AvailableContents).Select(bi => bi.BuildableDef.label).Distinct();
         if (unavailable.Any())
         {
             Messages.Message("Fluffy.Blueprints.XNotAvailableInBlueprint".Translate(Blueprint.name, string.Join(", ", unavailable.ToArray())), MessageTypeDefOf.CautionInput);
         }
     }
 }