-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathManufacturer.cs
More file actions
69 lines (61 loc) · 3.02 KB
/
Manufacturer.cs
File metadata and controls
69 lines (61 loc) · 3.02 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using JetBrains.Annotations;
using System.Collections.Generic;
using System.Linq;
using Utilities;
namespace EddiDataDefinitions
{
public class Manufacturer
{
public static readonly Manufacturer CoreDynamics = new( "Core Dynamics", [ new Translation( "Core", "kɔɹ" ), new Translation( "Dynamics", "dəˈnamɪks" ) ] );
public static readonly Manufacturer FaulconDeLacy = new( "Faulcon DeLacy", [ new Translation( "Falcon", "ˈfælkən" ), new Translation( "DeLacy", "dᵻlˈæ.si" ) ] );
public static readonly Manufacturer Gutamaya = new( "Gutamaya", [ new Translation( "Gutamaya", "guːtəˈmaɪə" ) ] );
public static readonly Manufacturer KinematicArmaments = new( "Kinematic Armaments" );
public static readonly Manufacturer LakonSpaceways = new( "Lakon Spaceways", [ new Translation( "Lakon", "leɪkɒn" ), new Translation( "Spaceways", "speɪsweɪz" ) ] );
public static readonly Manufacturer Manticore = new( "Manticore" );
public static readonly Manufacturer Remlok = new( "Remlok" );
public static readonly Manufacturer SaudKruger = new( "Saud Kruger", [ new Translation( "Saud", "saʊd" ), new Translation( "Kruger", "ˈkruːɡə" ) ] );
public static readonly Manufacturer Supratech = new( "Supratech", [ new Translation( "Supratech", "su.pɹətɛk" ) ] );
public static readonly Manufacturer Takada = new( "Takada", [ new Translation( "Takada", "t.ækɑːdə" ) ] );
public static readonly Manufacturer ZorgonPeterson = new( "Zorgon Peterson" );
public static readonly List<Manufacturer> AllOfThem =
[
CoreDynamics,
FaulconDeLacy,
Gutamaya,
KinematicArmaments,
LakonSpaceways,
Manticore,
Remlok,
SaudKruger,
Supratech,
Takada,
ZorgonPeterson
];
[Utilities.PublicAPI( "The manufacturer name" )]
public string name { get; }
[Utilities.PublicAPI( "The phonetic name of the manufacturer, if it is known" ), UsedImplicitly]
public string phoneticname => SpokenManufacturer( name ) ?? name;
// Not intended to be user facing
public List<Translation> phoneticName { get; }
private Manufacturer ( string name, List<Translation> phoneticName = null )
{
this.name = name;
this.phoneticName = phoneticName;
}
public static string SpokenManufacturer(string manufacturer)
{
var phoneticmanufacturer = AllOfThem.FirstOrDefault(m => m.name == manufacturer)?.phoneticName;
if (phoneticmanufacturer != null)
{
var result = "";
foreach (var item in phoneticmanufacturer)
{
result += "<phoneme alphabet=\"ipa\" ph=\"" + item.to + "\">" + item.from + "</phoneme> ";
}
return result;
}
// Model isn't in the dictionary
return null;
}
}
}