/// <summary>Set Calendar type be a custom type with the supplied values</summary> /// <param name="CustomEpochYear">Year represented by UT 0</param> /// <param name="CustomEpochDayOfYear">DayOfYear represented by UT 0</param> /// <param name="CustomDaysPerYear">How many days per year in this calendar</param> /// <param name="CustomHoursPerDay">How many hours per day in this calendar</param> /// <param name="CustomMinutesPerHour">How many minutes per hour in this calendar</param> /// <param name="CustomSecondsPerMinute">How many seconds per minute in this calendar</param> static public void SetCustomCalendar(Int32 CustomEpochYear, Int32 CustomEpochDayOfYear, Int32 CustomDaysPerYear, Int32 CustomHoursPerDay, Int32 CustomMinutesPerHour, Int32 CustomSecondsPerMinute) { CalendarType = CalendarTypeEnum.Custom; EpochYear = CustomEpochYear; EpochDayOfYear = CustomEpochDayOfYear; SecondsPerMinute = CustomSecondsPerMinute; MinutesPerHour = CustomMinutesPerHour; HoursPerDay = CustomHoursPerDay; DaysPerYear = CustomDaysPerYear; }
/// <summary>Sets the Date Structure to be stock KSP</summary> static public void SetKSPStockCalendar() { CalendarType = CalendarTypeEnum.KSPStock; EpochYear = 1; EpochDayOfYear = 1; SecondsPerMinute = 60; MinutesPerHour = 60; HoursPerDay = GameSettings.KERBIN_TIME ? 6 : 24; DaysPerYear = GameSettings.KERBIN_TIME ? 426 : 365; }
/// <summary>Sets the Date Structure to be stock KSP</summary> static public void SetKSPStockCalendar() { CalendarType = CalendarTypeEnum.KSPStock; EpochYear = 1; EpochDayOfYear = 1; SecondsPerMinute = 60; MinutesPerHour = 60; HoursPerDay = KSPUtil.dateTimeFormatter.Day / 3600; // GameSettings.KERBIN_TIME ? 6 : 24; DaysPerYear = KSPUtil.dateTimeFormatter.Year / KSPUtil.dateTimeFormatter.Day; // GameSettings.KERBIN_TIME ? 426 : 365; }
/// <summary>Sets the Date Structure to be Earth based - With an epoch date supplied</summary> /// <param name="epochyear">year represented by UT0</param> /// <param name="epochmonth">month represented by UT0</param> /// <param name="epochday">day represented by UT0</param> static public void SetEarthCalendar(Int32 epochyear, Int32 epochmonth, Int32 epochday) { CalendarType = CalendarTypeEnum.Earth; CustomEpochEarth = new DateTime(epochyear, epochmonth, epochday); EpochYear = epochyear; EpochDayOfYear = CustomEpochEarth.DayOfYear; SecondsPerMinute = 60; MinutesPerHour = 60; HoursPerDay = 24; DaysPerYear = 365; }
/// <summary>Sets the Date Structure to be stock KSP</summary> public static void SetKSPStockCalendar() { CalendarType = CalendarTypeEnum.KSPStock; EpochYear = 1; EpochDayOfYear = 1; SecondsPerMinute = 60; MinutesPerHour = 60; //? ---------------- FIX ME ---------------- dsfaf //HoursPerDay = GameSettings.KERBIN_TIME ? 6 : 24; //DaysPerYear = GameSettings.KERBIN_TIME ? 426 : 365; HoursPerDay = true ? 6 : 24; DaysPerYear = true ? 426 : 365; }
/// <summary>Set Calendar type to be a custom type</summary> static public void SetCustomCalendar() { SetKSPStockCalendar(); CalendarType = CalendarTypeEnum.Custom; }