DotNet.Ships.Class.BlueprintCosts - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Ships / BlueprintCosts

Class: BlueprintCosts

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/BlueprintCosts.cs:32

The blueprint cost catalogue: material shopping lists kept apart from blueprint mechanics, so a caller who only prices a recipe loads neither the mechanics nor a whole build.

Remarks

Its identifiers and grade sets are the craftable subset of BlueprintCatalogue. A fixed reward identity has mechanics but no ordinary craft route, and is absent here. Data comes from EDCD coriolis-data, with the Operations and Anti-Guardian recipes from the Inara registry and Frontier's update notes; see data/ships/SOURCES.md for provenance.

Properties

All

static All: IReadOnlyDictionary<string, IReadOnlyDictionary<int, IReadOnlyList<EngineeringMaterial>>>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/BlueprintCosts.cs:44

Every craftable blueprint's per-roll material recipes, keyed by Frontier symbol and then by grade. Lookups on the outer map ignore case.

MercCoinCosts

static MercCoinCosts: IReadOnlyDictionary<string, IReadOnlyDictionary<int, int>>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/BlueprintCosts.cs:57

The Merc Coin charged per roll by every blueprint that charges any, keyed by Frontier symbol and then by grade. Lookups on the outer map ignore case.

Remarks

A small subset of All's identifiers, in two shapes. Most are the bespoke grade 2 through 5 recipes that only a Mercenary article, bought already at grade 1, can be taken through. The others are ordinary engineering-menu recipes spanning grades 1 through 5 that bill the currency too. Every other blueprint is absent rather than zero.

Methods

Find()

static Find(blueprintSymbol): IReadOnlyDictionary<int, IReadOnlyList<EngineeringMaterial>>?

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/BlueprintCosts.cs:72

Finds all per-grade material recipes for one blueprint.

Parameters

blueprintSymbol

string?

The blueprint identifier, such as FSD_LongRange. Leading and trailing whitespace and case are ignored.

Returns

IReadOnlyDictionary<int, IReadOnlyList<EngineeringMaterial>>?

The grade-to-material-list map, or null when no ordinary craft cost is catalogued, a known fixed reward identity included.

Remarks

The material half only. Use FindGradeCost or FindClimbCost to get both halves of a cost together.

FindClimbCost()

static FindClimbCost(blueprintSymbol, grade, currentGrade?): BlueprintCost?

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/BlueprintCosts.cs:141

Computes the total cost of engineering a module up to a grade: every grade it still has to climb, each rolled the number of times it takes to complete, summed into one shopping list and one Merc Coin total.

Parameters

blueprintSymbol

string?

The blueprint identifier. Whitespace and case are ignored.

grade

int

The target grade, from 1 through 5.

currentGrade

int = 0

The completed grade, from 0 through 5, which defaults to 0 for an unengineered module. Only the grades above it are charged, so a completed grade at or above the target costs nothing.

Returns

BlueprintCost?

The summed materials and Merc Coin total, or null when no ordinary craft cost is catalogued for the blueprint and target grade. A blueprint that starts above grade 1 charges only the grades it defines.

Remarks

Grade N takes N rolls to fill its progress bar, and each roll costs that grade's recipe once, so the climb is weighted rather than a plain sum, for the materials and the Merc Coin alike. To price one grade's complete progression, set the completed grade to one below the target; use FindGradeCost for a single roll.

A Mercenary article is bought at grade 1 and its recipe defines grades 2 through 5, so pass 1 to price what an engineer can still add.

This is the blueprint cost alone. An experimental effect is a separate application costing materials only; fold its cost in with Engineering.SumMaterials.

Exceptions

ArgumentOutOfRangeException

grade is outside 1 through 5, or currentGrade is outside 0 through 5.

FindGradeCost()

static FindGradeCost(blueprintSymbol, grade): BlueprintCost?

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/BlueprintCosts.cs:85

Finds what one roll at one blueprint grade costs.

Parameters

blueprintSymbol

string?

The blueprint identifier. Whitespace and case are ignored.

grade

int

The grade, from 1 through 5.

Returns

BlueprintCost?

The materials one roll consumes and the Merc Coin it bills, or null when no ordinary craft cost is catalogued for that blueprint and grade.

Exceptions

ArgumentOutOfRangeException

grade is outside 1 through 5.

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