Full IUpdatable & IUpdateRequest integration with padishar's simulation.
[VesselSimulator.git] / KerbalEngineer / Flight / Readouts / Vessel / Mass.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Project:  KerbalEngineer
// Author:      CYBUTEK
// License:     Attribution-NonCommercial-ShareAlike 3.0 Unported
 
#region Using Directives
 
using KerbalEngineer.Extensions;
using KerbalEngineer.Simulation;
 
#endregion
 
namespace KerbalEngineer.Flight.Readouts.Vessel
{
    public class Mass : ReadoutModule
    {
        public Mass()
        {
            this.Name = "Mass";
            this.Category = ReadoutCategory.Vessel;
        }
 
        public override void Update()
        {
            SimManager.RequestUpdate();
        }
 
        public override void Draw()
        {
            this.DrawLine(SimManager.LastStage.mass.ToMass(false) + " / " + SimManager.LastStage.totalMass.ToMass());
        }
 
        public override void Reset()
        {
            FlightEngineerCore.Instance.AddUpdatable(SimManager.Instance);
        }
    }
}