diff --git a/src/CelestialBody.cs b/src/CelestialBody.cs index b5d584b..ccc6b3b 100644 --- a/src/CelestialBody.cs +++ b/src/CelestialBody.cs @@ -110,6 +110,16 @@ public class CelestialBody /*: MonoBehaviour, ITargetable, IDiscoverable*/ public double rotationPeriod; public CelestialBodyScienceParams scienceValues; /// + /// Average duration in seconds between two successive "local apparent noons" (= time at which the sun is straight + /// overhead a geostationary observer). For Kerbin, this value is lightly greater than "rotationPeriod". Used to + /// perform correct Kerbin calendar calculations where the sun raises always at the same "time". + /// + public double solarDayLength; + /// + /// Wheter this celestial body has a valid solar day. + /// + public bool solarRotationPeriod; + /// /// The radius of this body's sphere of influence (measured from the center of the body), in meters. /// public double sphereOfInfluence; diff --git a/src/UTClock.cs b/src/UTClock.cs new file mode 100644 index 0000000..929d10e --- /dev/null +++ b/src/UTClock.cs @@ -0,0 +1,33 @@ +using System; +using UnityEngine; + +/// +/// Controls the date/time display at the bottom center of the space center. +/// Can be retrieved with UTClock utClock = GameObject.FindObjectOfType();. +/// +/// The actual text field containting the text is a private member of this behavior but +/// can be retrieved with ScreenSafeTextField textField = +/// utClock.gameObject.GetComponent();. +/// +[RequireComponent(typeof(ScreenSafeTextField))] +public class UTClock : MonoBehaviour +{ + /// + /// Whether to include seconds in the text field (false). + /// + public bool includeSeconds; + + /// + /// Whether to include hours and minutes in the text field (true). + /// + public bool includeTimeOfDay; + + public double Tdawn; + + /// + /// The button 'Warp to next Morning' to the right of the text field. + /// + public ScreenSafeUIButton warpToDaylight; + + public UTClock(); +}