-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPropellantConfigBase.cs
More file actions
26 lines (22 loc) · 1.07 KB
/
PropellantConfigBase.cs
File metadata and controls
26 lines (22 loc) · 1.07 KB
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
using System.Collections.Generic;
namespace Ignition
{
public abstract class PropellantConfigBase
{
public virtual double ThrustMultiplier { get; protected set; } = 1;
public virtual double IspMultiplier { get; protected set; } = 1;
public virtual double IgnitionPotential { get; protected set; } = 1;
public virtual double TankDensity { get; protected set; } = -1;
public List<Propellant> Propellants { get; protected set; } = new List<Propellant>();
public PropellantConfigBase()
{
}
public PropellantConfigBase(ConfigNode node)
{
if (node.HasValue("ThrustMultiplier")) ThrustMultiplier = double.Parse(node.GetValue("ThrustMultiplier"));
if (node.HasValue("IspMultiplier")) IspMultiplier = double.Parse(node.GetValue("IspMultiplier"));
if (node.HasValue("IgnitionPotential")) IgnitionPotential = double.Parse(node.GetValue("IgnitionPotential"));
if (node.HasValue("TankDensity")) TankDensity = double.Parse(node.GetValue("TankDensity"));
}
}
}