DotNet.Ships.Class.ModuleStats - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
EliteDangerousAlmanac / Ships / ModuleStats
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:19
The sparse numeric stats one outfitting module carries.
No module family uses every stat, so this holds only the ones a record states. Reading a stat a module does not carry answers null rather than a default, which is what tells a calculation the module is not of the kind it wants.
The collection is immutable. With answers a new collection, which is how engineering builds a fitted module's effective stats without changing the catalogue record behind it.
staticreadonlyEmpty:ModuleStats
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:22
A module that states no stats at all.
Count:
int
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:29
How many stats this module states.
Entries:
IEnumerable<KeyValuePair<ModuleStat, double>>
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:79
The stats the module states, in no particular order.
The dictionary behind the collection is never handed out. A caller that reaches the stats of a catalogue module would otherwise be able to write to the record every other caller in the process reads.
Keys:
IEnumerable<ModuleStat>
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:88
The stats the module states, by key.
this[
ModuleStatstat]:double?
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:34
Reads one stat.
The stat to read.
Equals(
other):bool
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:97
bool
overrideEquals(obj):bool
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:112
object?
bool
staticFrom(values):ModuleStats
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:39
Builds a collection from the stats a caller already holds.
IEnumerable<KeyValuePair<ModuleStat, double>>?
The stats to hold. An absent collection makes an empty one.
The collection.
overrideGetHashCode():int
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:115
int
Has(
stat):bool
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:50
Whether the module states a stat.
The stat to look for.
bool
true when the module carries it.
With(
stat,value):ModuleStats
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:56
The same stats with one value set or replaced.
The stat to write.
double
The value it takes.
A new collection. This one is unchanged.
Without(
stat):ModuleStats
Defined in: dotnet/src/EliteDangerousAlmanac/Ships/ModuleStats.cs:65
The same stats with one value removed.
The stat to drop.
A new collection, or this one when the stat was already absent.