/
SimModuleRCS.cs
40 lines (33 loc) · 1.16 KB
/
SimModuleRCS.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
38
39
40
#nullable enable
using System.Collections.Generic;
using MechJebLib.Utils;
namespace MechJebLib.Simulations.PartModules
{
public class SimModuleRCS : SimPartModule
{
private static readonly ObjectPool<SimModuleRCS> _pool = new ObjectPool<SimModuleRCS>(New, Clear);
public readonly List<SimPropellant> Propellants = new List<SimPropellant>();
public readonly Dictionary<int, SimFlowMode> PropellantFlowModes = new Dictionary<int, SimFlowMode>();
public readonly Dictionary<int, double> ResourceConsumptions = new Dictionary<int, double>();
public double G;
public double Isp;
public double Thrust;
public override void Dispose()
{
_pool.Release(this);
}
public static SimModuleRCS Borrow(SimPart part)
{
SimModuleRCS clamp = _pool.Borrow();
clamp.Part = part;
return clamp;
}
private static SimModuleRCS New()
{
return new SimModuleRCS();
}
private static void Clear(SimModuleRCS m)
{
}
}
}