-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathAtmosphereComposition.cs
More file actions
51 lines (43 loc) · 2.06 KB
/
AtmosphereComposition.cs
File metadata and controls
51 lines (43 loc) · 2.06 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using Newtonsoft.Json;
using System;
using Utilities;
namespace EddiDataDefinitions
{
/// <summary> Atmosphere Composition </summary>
[ method: JsonConstructor]
public class AtmosphereComposition ( string edComposition, decimal percent = 0 )
: ResourceBasedLocalizedEDName<AtmosphereComposition>( edComposition, edComposition )
{
static AtmosphereComposition()
{
resourceManager = Properties.AtmosphereComposition.ResourceManager;
resourceManager.IgnoreCase = true;
missingEDNameHandler = (edname) => new AtmosphereComposition(edname, 0);
var Water = new AtmosphereComposition("water");
var Oxygen = new AtmosphereComposition("oxygen");
var CarbonDioxide = new AtmosphereComposition("carbondioxide");
var SulphurDioxide = new AtmosphereComposition("sulphurdioxide");
var Ammonia = new AtmosphereComposition("ammonia");
var Methane = new AtmosphereComposition("methane");
var Nitrogen = new AtmosphereComposition("nitrogen");
var Hydrogen = new AtmosphereComposition("hydrogen");
var Helium = new AtmosphereComposition("helium");
var Neon = new AtmosphereComposition("neon");
var Argon = new AtmosphereComposition("argon");
var Silicates = new AtmosphereComposition("silicates");
var Iron = new AtmosphereComposition("iron");
}
[PublicAPI, JsonIgnore, Obsolete("Please use localizedComposition or invariantComposition")]
public string composition => localizedName;
[PublicAPI, JsonProperty]
public decimal percent { get; set; } = percent; // Percent share of the atmosphere
// Not intended to be user facing
[JsonIgnore]
public string localizedComposition => localizedName;
[JsonIgnore]
public string invariantComposition => invariantName;
// dummy used to ensure that the static constructor has run
public AtmosphereComposition() : this("")
{ }
}
}