DotNet.Materials.Class.MaterialCatalogue - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Materials / MaterialCatalogue

Class: MaterialCatalogue

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:34

The engineering-material catalogues and the lookups that search them.

Remarks

Elite Dangerous groups its engineering materials into three categories — raw, manufactured and encoded — and every material carries a MaterialGrade and sits in a MaterialLine.

Every lookup searches All by default. The by-key lookups take an optional second argument that narrows the search to a subset — one category's catalogue, or a list you filtered yourself. Passing All, or omitting the argument, answers from an index; every other list is scanned.

A catalogue loads from its shared data file on first use. The lists and the records in them are immutable, so one caller cannot change another caller's answers.

The data originates from EDCD FDevIDs, with Thargoid materials absent from that pinned source supplied by INARA. See data/materials/SOURCES.md for provenance and ATTRIBUTIONS.md for credit.

Properties

All

static All: IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:73

Every material across every category: raw, then manufactured, then encoded.

Encoded

static Encoded: IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:68

Every encoded material, in six lines of five grades.

Remarks

Every record has MaterialCategory.Encoded.

Manufactured

static Manufactured: IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:64

Every manufactured material, in ten lines of five grades.

Remarks

Every record has MaterialCategory.Manufactured.

Raw

static Raw: IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:60

Every raw material — the chemical elements, in seven lines of four grades.

Remarks

Every record has MaterialCategory.Raw.

Methods

ByGrade()

static ByGrade(grade): IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:127

Every material of one grade, across all three categories.

Parameters

grade

MaterialGrade

The grade to match. A grade no material carries matches nothing.

Returns

IReadOnlyList<Material>

The matches, in catalogue order.

FindByElementSymbol()

static FindByElementSymbol(elementSymbol, materials?): Material?

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:119

Finds a raw material by its chemical element symbol.

Parameters

elementSymbol

string?

The element symbol, such as Fe. Leading and trailing whitespace and case are ignored.

materials

IReadOnlyList<Material>? = null

The subset to search. Omit it to search every material.

Returns

Material?

The material, or null. Only raw materials carry an element symbol, so a manufactured or encoded subset never matches.

FindByName()

static FindByName(name, materials?): Material?

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:104

Finds a material by its display name.

Parameters

name

string?

The display name as the catalogue spells it, such as Grid Resistors. Leading and trailing whitespace and case are ignored.

materials

IReadOnlyList<Material>? = null

The subset to search. Omit it to search every material.

Returns

Material?

The material, or null when no material has that name.

FindBySymbol()

static FindBySymbol(symbol, materials?): Material?

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:92

Finds a material by its Frontier symbol, the id the player journal reports.

Parameters

symbol

string?

The internal symbol, such as GridResistors, or the lower-cased form the player journal reports. Leading and trailing whitespace and case are ignored.

materials

IReadOnlyList<Material>? = null

The subset to search. Omit it to search every material, which is also the only indexed path.

Returns

Material?

The material, or null when no material has that symbol.

Example

MaterialCatalogue.FindBySymbol("temperedalloys")?.Name; // "Tempered Alloys"

InCategory()

static InCategory(category): IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:166

Every material in one category, in catalogue order.

Parameters

category

MaterialCategory

The category to match.

Returns

IReadOnlyList<Material>

The category's own catalogue.

InCategory()

static InCategory(category): IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:181

Every material in one category, named as the data files spell it.

Parameters

category

string?

The category name: raw, manufactured or encoded.

Returns

IReadOnlyList<Material>

The matches, or an empty list when no category has that name.

Remarks

The same answer as the MaterialCategory overload, reached from a string. Leading and trailing whitespace and case are ignored.

InLine()

static InLine(line): IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:141

Every material in one line, in catalogue order.

Parameters

line

MaterialLine

The line to match.

Returns

IReadOnlyList<Material>

The matches, in catalogue order.

InLine()

static InLine(line): IReadOnlyList<Material>

Defined in: dotnet/src/EliteDangerousAlmanac/Materials/MaterialCatalogue.cs:160

Every material in one line, named as the game spells it.

Parameters

line

string?

The line name, such as Mechanical Components.

Returns

IReadOnlyList<Material>

The matches, or an empty list when no line has that name.

Remarks

The same answer as the MaterialLine overload, reached from a string — which is what you have when the line came from a dropdown or a saved filter. Leading and trailing whitespace and case are ignored.

⚠️ **GitHub.com Fallback** ⚠️