Exemple #1
0
        public static FloatMenuAcceptanceReport CanVisit(IEnumerable <IThingHolder> pods, Site site)
        {
            FloatMenuAcceptanceReport result;

            if (site == null || !site.Spawned || !site.core.def.transportPodsCanLandAndGenerateMap)
            {
                result = false;
            }
            else if (!TransportPodsArrivalActionUtility.AnyNonDownedColonist(pods))
            {
                result = false;
            }
            else if (site.EnterCooldownBlocksEntering())
            {
                result = FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(new object[]
                {
                    site.EnterCooldownDaysLeft().ToString("0.#")
                }));
            }
            else
            {
                result = true;
            }
            return(result);
        }
 public static FloatMenuAcceptanceReport CanVisit(Caravan caravan, Site site)
 {
     if (site == null || !site.Spawned)
     {
         return(false);
     }
     if (site.EnterCooldownBlocksEntering())
     {
         return(FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(new object[]
         {
             site.EnterCooldownDaysLeft().ToString("0.#")
         })));
     }
     return(true);
 }
Exemple #3
0
 public static FloatMenuAcceptanceReport CanVisit(IEnumerable <IThingHolder> pods, Site site)
 {
     if (site == null || !site.Spawned)
     {
         return(false);
     }
     if (!TransportPodsArrivalActionUtility.AnyNonDownedColonist(pods))
     {
         return(false);
     }
     if (site.EnterCooldownBlocksEntering())
     {
         return(FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(site.EnterCooldownDaysLeft().ToString("0.#"))));
     }
     return(true);
 }