Пример #1
0
 void METParser(StringBuilder result, CommonInfo info, string[] args)
 {
     if (info.Vessel != null)
     {
         SplitDateTimeValue t = new SplitDateTimeValue(info.Vessel.missionTime);
         result.Append(KSPUtil.dateTimeFormatter.PrintTimeStampCompact(info.Vessel.missionTime, t.Days > 0, t.Years > 0));
     }
 }
Пример #2
0
 void PeriodParser(StringBuilder result, CommonInfo info, string[] args)
 {
     if (info.Orbit != null)
     {
         double             period = info.Orbit.period;
         SplitDateTimeValue t      = new SplitDateTimeValue(period);
         result.Append(KSPUtil.PrintTimeStampCompact(period, t.Days > 0, t.Years > 0));
     }
 }
Пример #3
0
 void METParser(StringBuilder result, CommonInfo info)
 {
     if (info.Vessel != null)
     {
         var t = new SplitDateTimeValue(info.Vessel.missionTime);
         if (t.Years > 0)
         {
             result.Append($"{t.Years + 1}y, {t.Days + 1}d, {t.Hours:D2}:{t.Minutes:D2}:{t.Seconds:D2}");
         }
         else
         if (t.Days > 0)
         {
             result.Append($"{t.Days + 1}d, {t.Hours:D2}:{t.Minutes:D2}:{t.Seconds:D2}");
         }
         else
         {
             result.Append($"{t.Hours:D2}:{t.Minutes:D2}:{t.Seconds:D2}");
         }
     }
 }
Пример #4
0
 void PeriodParser(StringBuilder result, CommonInfo info)
 {
     if (info.Orbit != null)
     {
         var period = info.Orbit.period;
         var t      = new SplitDateTimeValue(period);
         if (t.Years > 0)
         {
             result.Append($"{t.Years + 1}y, {t.Days + 1}d, {t.Hours:D2}:{t.Minutes:D2}:{t.Seconds:D2}");
         }
         else
         {
             if (t.Days > 0)
             {
                 result.Append($"{t.Days + 1}d, {t.Hours:D2}:{t.Minutes:D2}:{t.Seconds:D2}");
             }
             else
             {
                 result.Append($"{t.Hours:D2}:{t.Minutes:D2}:{t.Seconds:D2}");
             }
         }
     }
 }