ships.Function.distributorMetrics - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / distributorMetrics

Function: distributorMetrics()

distributorMetrics(input): DistributorMetrics

Defined in: src/ships/distributor.ts:122

Calculate SYS, ENG and WEP recharge at one set of pip allocations.

Parameters

input

DistributorInput

All three distributor capacities, their rated four-pip recharge rates and the pips to model.

Returns

DistributorMetrics

Capacity, rated recharge and actual recharge for each capacitor, plus the allocations used. Each omitted allocation defaults independently to 4; allocations are not required to sum to the six pips available in game so callers can compare independent scenarios in one result.

Throws

If a capacity or recharge is negative or non-finite, or a pip allocation is outside [0, 4] or non-finite.

Example

import { distributorMetrics } from '@elite-dangerous-almanac/core/ships/distributor';

distributorMetrics({
  systemsCapacity: 32,
  systemsRecharge: 3.2,
  enginesCapacity: 32,
  enginesRecharge: 3.2,
  weaponsCapacity: 48,
  weaponsRecharge: 4.8,
  systemsPips: 2,
  enginesPips: 2,
  weaponsPips: 2,
}).engines.rechargeRate; // -> 1.492… MJ/s
⚠️ **GitHub.com Fallback** ⚠️