public static bool CanLandInSpecificCell(IEnumerable <IThingHolder> pods, MapParent mapParent)
 {
     return(mapParent != null && mapParent.Spawned && mapParent.HasMap && (!mapParent.EnterCooldownBlocksEntering() || FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(new object[]
     {
         mapParent.EnterCooldownDaysLeft().ToString("0.#")
     }))));
 }
 public static FloatMenuAcceptanceReport CanVisit(Caravan caravan, MapParent escapeShip)
 {
     if (escapeShip == null || !escapeShip.Spawned || escapeShip.GetComponent <EscapeShipComp>() == null)
     {
         return(false);
     }
     if (escapeShip.EnterCooldownBlocksEntering())
     {
         return(FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(new object[]
         {
             escapeShip.EnterCooldownDaysLeft().ToString("0.#")
         })));
     }
     return(true);
 }
Пример #3
0
 public static FloatMenuAcceptanceReport CanEnter(Caravan caravan, MapParent mapParent)
 {
     if (mapParent == null || !mapParent.Spawned || !mapParent.HasMap)
     {
         return(false);
     }
     if (mapParent.EnterCooldownBlocksEntering())
     {
         return(FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(new object[]
         {
             mapParent.EnterCooldownDaysLeft().ToString("0.#")
         })));
     }
     return(true);
 }
Пример #4
0
 public static bool CanLandInSpecificCell(IEnumerable <IThingHolder> pods, MapParent mapParent)
 {
     if (mapParent == null || !mapParent.Spawned || !mapParent.HasMap)
     {
         return(false);
     }
     if (mapParent.EnterCooldownBlocksEntering())
     {
         return(FloatMenuAcceptanceReport.WithFailMessage("MessageEnterCooldownBlocksEntering".Translate(mapParent.EnterCooldownDaysLeft().ToString("0.#"))));
     }
     return(true);
 }