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

EliteDangerousAlmanac / Ships / WeaponsCapacitor

Class: WeaponsCapacitor

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/WeaponsCapacitor.cs:52

The weapons capacitor's recharge and endurance at a chosen WEP-pip allocation.

Remarks

A distributor's catalogue recharge figure is its four-pip maximum, and the actual rate follows the same non-linear pip curve as the SYS capacitor. The endurance compares that rate with the weapons' sustained draw, so the magazine reloads are already folded in.

Reference implementation: EDCD/Coriolis, src/app/shipyard/Calculations.js. The algorithm is ported as fact rather than as code. See ATTRIBUTIONS.md for credit and licence terms.

Methods

Metrics()

static Metrics(input, weaponsPips?): WeaponsCapacitorMetrics

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/WeaponsCapacitor.cs:73

Calculates the WEP recharge and the time to drain while a weapon load fires continuously.

Parameters

input

WeaponsCapacitorInput

The distributor capacity, its rated four-pip recharge and the weapons' sustained draw.

weaponsPips

double = 4

The pips assigned to WEP, from zero through four. Fractional pips are accepted.

Returns

WeaponsCapacitorMetrics

The actual recharge, the net drain and the seconds until empty. The time to drain is infinite where the weapons draw no more than the actual recharge rate, and a draw against no capacity at all drains in no time.

Exceptions

ArgumentNullException

input is null.

ArgumentOutOfRangeException

A capacity, recharge rate or draw is negative or not finite, or the allocation is outside zero through four.

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