DotNet.Equipment.Class.PersonalWeaponCatalogue - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
EliteDangerousAlmanac / Equipment / PersonalWeaponCatalogue
Defined in: dotnet/src/EliteDangerousAlmanac/Equipment/PersonalWeaponCatalogue.cs:21
The personal-weapon catalogue, its lookups, and what a weapon deals.
Every weapon carries all five grades, and a grade changes the damage one projectile deals and the modification slots the weapon has. Every other stat belongs to the weapon.
The catalogue loads from its shared data file on first use. Every record is immutable, so one caller cannot change another caller's answers.
staticAll:IReadOnlyList<PersonalWeapon>
Defined in: dotnet/src/EliteDangerousAlmanac/Equipment/PersonalWeaponCatalogue.cs:32
Every personal weapon Pioneer Supplies sells.
staticFindByName(name):PersonalWeapon?
Defined in: dotnet/src/EliteDangerousAlmanac/Equipment/PersonalWeaponCatalogue.cs:45
Finds a weapon by its display name.
string?
The display name, such as Karma P-15.
The weapon, or null for a name no weapon carries.
Case and surrounding whitespace are ignored. An absent name is a miss.
staticFindBySymbol(symbol):PersonalWeapon?
Defined in: dotnet/src/EliteDangerousAlmanac/Equipment/PersonalWeaponCatalogue.cs:38
Finds a weapon by its item symbol.
string?
The symbol, such as wpn_s_pistol_kinetic_sauto.
The weapon, or null for a symbol no weapon carries.
Case and surrounding whitespace are ignored. An absent symbol is a miss.
staticGrade(weapon,grade):PersonalWeaponGrade?
Defined in: dotnet/src/EliteDangerousAlmanac/Equipment/PersonalWeaponCatalogue.cs:54
Reads one weapon's stats at one grade.
The weapon.
int
The grade, from one through five.
The grade record, or null where the weapon has no such grade.
ArgumentNullException
The weapon is absent.
ArgumentOutOfRangeException
The grade is not one through five.
staticMetrics(weapon,grade,modifiers?,reloadSpeed?):PersonalWeaponMetrics?
Defined in: dotnet/src/EliteDangerousAlmanac/Equipment/PersonalWeaponCatalogue.cs:82
Computes what one weapon deals at one grade.
The weapon.
int
The grade, from one through five.
IReadOnlyList<PersonalModifier>? = null
The stat changes the fitted modifications make. A change naming a stat this calculation does not read is passed over.
bool = false
Whether the reload-speed modification is fitted, which is what decides between the two reload times the weapon publishes.
The figures, or null where the weapon has no such grade.
The magazine is held to whole rounds, the way a ship weapon's clip is, so a hand-built fraction cannot reach the reload cycle and give the two domains different answers.
ArgumentNullException
The weapon is absent.
ArgumentOutOfRangeException
The grade is not one through five.