DotNet.Astronomy.Class.SystemName - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
EliteDangerousAlmanac / Astronomy / SystemName
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:50
The written form of a procedural system name.
A procedural system name reads as Region LL-L m[N1-]N2, as in Synuefe EN-H d11-96 or Blae Eock KC-C d0. The region is the sector name, procedural or hand-written. The three letters and the first index state the boxel inside that region, the mass code states how large the boxel is, and the last index numbers the system inside it. The game leaves the first index and its hyphen out where it is zero.
This class reads and writes the text alone. SystemAddress holds the packed form the game identifies a system by.
staticCanonicalize(name):string?
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:201
Writes a system name in the game's own casing.
string?
The name in any casing, with any surrounding whitespace.
string?
The name as the game writes it, or null where it is not a system name.
A procedural region is re-cased by reading it through the grid, and a region the game names by hand by looking it up. A region neither answers is left as written, so reading a name stays apart from addressing one.
staticFormat(parts):string
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:167
Writes parts back out as a system name.
The parts to write.
string
The name, such as Synuefe EN-H d11-96.
The first index and its hyphen are left out where the index is zero, which is what the game does. The region is written as it is held, so a name read in lower case keeps its own region casing.
ArgumentNullException
The parts are absent.
ArgumentOutOfRangeException
A letter is outside zero through 25, or the size class is outside zero through seven.
staticIsProcedural(name,requireProceduralRegion?):bool
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:223
Reads whether a name is a well-formed procedural system name.
string?
The name in any casing, with any surrounding whitespace.
bool = false
Whether the region must itself be a procedural sector. Where it is true, a system inside a region the game names by hand, such as Pleiades Sector HR-W d1-79, is not one.
bool
true where the name reads as a procedural system name. A system the game names outright, such as Sol, is not one. An absent name is not one either.
staticParse(name):SystemNameParts?
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:99
Reads a procedural system name into its parts.
string?
The name in any casing, with any surrounding whitespace.
The parts, or null where the name is not a procedural system name. An absent name is a miss, so a caller hands over a field an import may not carry.
A region name carries digits of its own, as Col 285 Sector does, so the reading walks the ending backwards. The letters and the mass code come out as counts, and therefore write back in the game's own casing. The region comes out as written; Canonicalize re-cases that too.
staticToBoxelCode(l1,l2,l3,n1):int
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:68
Packs a boxel's letters and index into one base-26 code.
int
The first letter, zero through 25.
int
The second letter, zero through 25.
int
The third letter, zero through 25.
int
The number after the letters.
int
The packed code.
ArgumentOutOfRangeException
A letter is outside zero through 25, or the number is too large to pack exactly.
staticToBoxelLetters(boxelCode):BoxelLetters
Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/SystemName.cs:77
Takes the letters and the index back out of one boxel code.
int
The packed code, as the address decoder answers.
The three letters and the number after them.
ArgumentOutOfRangeException
The code is not one ToBoxelCode answers.