eve-fit-engine 0.2.14 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/data/.build +1 -1
  2. package/data/manifest.json +1 -1
  3. package/dist/index.cjs +25 -0
  4. package/dist/index.d.cts +21 -1
  5. package/dist/index.d.ts +21 -1
  6. package/dist/index.js +23 -1
  7. package/dist/node.cjs +25 -0
  8. package/dist/node.d.cts +3 -2
  9. package/dist/node.d.ts +3 -2
  10. package/dist/node.js +23 -1
  11. package/package.json +2 -2
  12. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/attributes.json +0 -0
  13. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/categories.json +0 -0
  14. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/clone-grades.json +0 -0
  15. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/dbuff-collections.json +0 -0
  16. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/dynamic-attributes.json +0 -0
  17. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/effects.json +0 -0
  18. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/groups.json +0 -0
  19. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/market-groups.json +0 -0
  20. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/meta-groups.json +0 -0
  21. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/charges.json +0 -0
  22. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/drones.json +0 -0
  23. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/fighters.json +0 -0
  24. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/implants.json +0 -0
  25. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/modules.json +0 -0
  26. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/mutaplasmids.json +0 -0
  27. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/ships.json +0 -0
  28. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/skills.json +0 -0
  29. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/structure-modules.json +0 -0
  30. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/structures.json +0 -0
  31. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/subsystems.json +0 -0
  32. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/types/system-effects.json +0 -0
  33. /package/data/{vf0d86cc8112e → v5f9aed3c9d2c}/units.json +0 -0
package/data/.build CHANGED
@@ -1 +1 @@
1
- 3646012
1
+ 3654997
@@ -1 +1 @@
1
- {"version":"f0d86cc8112e","builtAt":"2026-10-24T09:23:26.065Z","totalBytes":8523799,"files":{"attributes.json":{"bytes":254999,"entries":1290},"units.json":{"bytes":3458,"entries":60},"effects.json":{"bytes":1604825,"entries":3427},"meta-groups.json":{"bytes":1108,"entries":13},"categories.json":{"bytes":1192,"entries":33},"groups.json":{"bytes":64079,"entries":964},"market-groups.json":{"bytes":198376,"entries":2114},"clone-grades.json":{"bytes":18709,"entries":4},"dbuff-collections.json":{"bytes":87816,"entries":277},"dynamic-attributes.json":{"bytes":153879,"entries":441},"types/ships.json":{"bytes":924132,"entries":424},"types/modules.json":{"bytes":2577668,"entries":4006},"types/charges.json":{"bytes":599961,"entries":1017},"types/drones.json":{"bytes":195403,"entries":154},"types/fighters.json":{"bytes":134873,"entries":94},"types/implants.json":{"bytes":580255,"entries":1338},"types/subsystems.json":{"bytes":36255,"entries":48},"types/skills.json":{"bytes":203604,"entries":512},"types/system-effects.json":{"bytes":38068,"entries":115},"types/structures.json":{"bytes":32031,"entries":18},"types/structure-modules.json":{"bytes":246957,"entries":356},"types/mutaplasmids.json":{"bytes":566151,"entries":2873}}}
1
+ {"version":"5f9aed3c9d2c","builtAt":"2026-10-28T11:11:24.274Z","totalBytes":8523799,"files":{"attributes.json":{"bytes":254999,"entries":1290},"units.json":{"bytes":3458,"entries":60},"effects.json":{"bytes":1604825,"entries":3427},"meta-groups.json":{"bytes":1108,"entries":13},"categories.json":{"bytes":1192,"entries":33},"groups.json":{"bytes":64079,"entries":964},"market-groups.json":{"bytes":198376,"entries":2114},"clone-grades.json":{"bytes":18709,"entries":4},"dbuff-collections.json":{"bytes":87816,"entries":277},"dynamic-attributes.json":{"bytes":153879,"entries":441},"types/ships.json":{"bytes":924132,"entries":424},"types/modules.json":{"bytes":2577668,"entries":4006},"types/charges.json":{"bytes":599961,"entries":1017},"types/drones.json":{"bytes":195403,"entries":154},"types/fighters.json":{"bytes":134873,"entries":94},"types/implants.json":{"bytes":580255,"entries":1338},"types/subsystems.json":{"bytes":36255,"entries":48},"types/skills.json":{"bytes":203604,"entries":512},"types/system-effects.json":{"bytes":38068,"entries":115},"types/structures.json":{"bytes":32031,"entries":18},"types/structure-modules.json":{"bytes":246957,"entries":356},"types/mutaplasmids.json":{"bytes":566151,"entries":2873}}}
package/dist/index.cjs CHANGED
@@ -713,8 +713,11 @@ function moduleAcceptsChargeType(mod, charge) {
713
713
  return true;
714
714
  }
715
715
  var ACTIVE_EFFECT_CATEGORIES = /* @__PURE__ */ new Set([1, 2, 3]);
716
+ var ONLINE_EFFECT_ID = 16;
717
+ var OVERLOAD_EFFECT_CATEGORY = 5;
716
718
  function isActivatableModule(mod, effects) {
717
719
  for (const e of mod.effects) {
720
+ if (e.id === ONLINE_EFFECT_ID) continue;
718
721
  const eff = effects.get(e.id);
719
722
  if (eff && eff.effectCategoryID !== void 0 && ACTIVE_EFFECT_CATEGORIES.has(eff.effectCategoryID)) {
720
723
  return true;
@@ -722,6 +725,25 @@ function isActivatableModule(mod, effects) {
722
725
  }
723
726
  return false;
724
727
  }
728
+ function isOverloadableModule(mod, effects) {
729
+ for (const e of mod.effects) {
730
+ if (effects.get(e.id)?.effectCategoryID === OVERLOAD_EFFECT_CATEGORY) return true;
731
+ }
732
+ return false;
733
+ }
734
+ function effectiveModuleState(mod, effects, state) {
735
+ if (state === "OFFLINE" || state === "ONLINE") return state;
736
+ if (!isActivatableModule(mod, effects)) return "ONLINE";
737
+ if (state === "OVERLOAD" && !isOverloadableModule(mod, effects)) return "ACTIVE";
738
+ return state;
739
+ }
740
+ function nextModuleState(mod, effects, state) {
741
+ const cur = effectiveModuleState(mod, effects, state);
742
+ if (!isActivatableModule(mod, effects)) return cur === "OFFLINE" ? "ONLINE" : "OFFLINE";
743
+ if (cur === "ONLINE") return "ACTIVE";
744
+ if (cur === "ACTIVE") return isOverloadableModule(mod, effects) ? "OVERLOAD" : "ONLINE";
745
+ return "ONLINE";
746
+ }
725
747
  var DEFAULT_OFFLINE_ACTIVATION_GROUPS = /* @__PURE__ */ new Set([
726
748
  330,
727
749
  4117
@@ -6559,6 +6581,7 @@ exports.disintegratorCyclesToFullSpool = disintegratorCyclesToFullSpool;
6559
6581
  exports.disintegratorSpoolBonus = disintegratorSpoolBonus;
6560
6582
  exports.ecmJamChance = ecmJamChance;
6561
6583
  exports.effectiveDps = effectiveDps;
6584
+ exports.effectiveModuleState = effectiveModuleState;
6562
6585
  exports.ehpUnderProfile = ehpUnderProfile;
6563
6586
  exports.formatDna = formatDna;
6564
6587
  exports.formatEft = formatEft;
@@ -6568,6 +6591,7 @@ exports.freeFitGroupSlotsFor = freeFitGroupSlotsFor;
6568
6591
  exports.freeHardpointsFor = freeHardpointsFor;
6569
6592
  exports.isActivatableModule = isActivatableModule;
6570
6593
  exports.isMissileLauncher = isMissileLauncher;
6594
+ exports.isOverloadableModule = isOverloadableModule;
6571
6595
  exports.isSmartBomb = isSmartBomb;
6572
6596
  exports.isTurretWeapon = isTurretWeapon;
6573
6597
  exports.marketGroupPlacement = marketGroupPlacement;
@@ -6576,6 +6600,7 @@ exports.maxTypeFittedFor = maxTypeFittedFor;
6576
6600
  exports.moduleAcceptsAnyCharge = moduleAcceptsAnyCharge;
6577
6601
  exports.moduleAcceptsCharge = moduleAcceptsCharge;
6578
6602
  exports.moduleAcceptsChargeType = moduleAcceptsChargeType;
6603
+ exports.nextModuleState = nextModuleState;
6579
6604
  exports.parseEft = parseEft;
6580
6605
  exports.peakRecharge = peakRecharge;
6581
6606
  exports.readCycleInfo = readCycleInfo;
package/dist/index.d.cts CHANGED
@@ -2257,6 +2257,25 @@ declare function moduleAcceptsChargeType(mod: SdeType, charge: SdeType): boolean
2257
2257
  declare function isActivatableModule(mod: SdeType, effects: Map<number, {
2258
2258
  effectCategoryID?: number;
2259
2259
  }>): boolean;
2260
+ /** True iff the module declares an overload (overheat) effect (cat 5). */
2261
+ declare function isOverloadableModule(mod: SdeType, effects: Map<number, {
2262
+ effectCategoryID?: number;
2263
+ }>): boolean;
2264
+ /**
2265
+ * State to SHOW/treat for a module: passive modules saved as ACTIVE/OVERLOAD
2266
+ * read as ONLINE, non-overloadable ones saved as OVERLOAD read as ACTIVE.
2267
+ * Display-only — stored data is not migrated.
2268
+ */
2269
+ declare function effectiveModuleState(mod: SdeType, effects: Map<number, {
2270
+ effectCategoryID?: number;
2271
+ }>, state: 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD'): 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD';
2272
+ /**
2273
+ * Next state on a plain click. Passive: ONLINE <-> OFFLINE. Activatable:
2274
+ * ONLINE -> ACTIVE -> (OVERLOAD if overloadable) -> ONLINE; OFFLINE -> ONLINE.
2275
+ */
2276
+ declare function nextModuleState(mod: SdeType, effects: Map<number, {
2277
+ effectCategoryID?: number;
2278
+ }>, state: 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD'): 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD';
2260
2279
  /**
2261
2280
  * Decide the default state a module should be in when newly fitted /
2262
2281
  * imported. Modules with at least one activation-class effect want to
@@ -2303,4 +2322,5 @@ declare function freeHardpointsFor(mod: SdeType, ship: SdeType, fittedHiModules:
2303
2322
  */
2304
2323
  declare function defaultModeTypeIDFor(ship: SdeType, dataset: FittingDataset): number | undefined;
2305
2324
 
2306
- export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, type BundleManifest, CATEGORY, type CapacitorReport, type ComputeFitOptions, type ComputedAttribute, type ComputedFit, DAMAGE_PROFILE_PRESETS, type DamageProfile, type DefenseLayerKind, type DerivedStats, type DroneComputed, type EftParseResult, type EwarKind, type FighterComputed, type Fit, type FitBooster, type FitCargo, FitContext, type FitDrone, type FitFighter, type FitImplant, type FitModule, type FitSubsystem, type FitVisibility, type FitWarning, type FittingDataset, type ItemKind, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, type LayerEhp, type LegacyEffectEntry, type MarketGroupPlacement, ModifiedAttribute, type ModifierAffliction, type ModifierOperation, type ModuleAttrSnapshot, type ModuleComputed, type ModuleState, type MutatorData, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, type OffenseReport, type ProjectedEffectReport, type ProjectedSource, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, type SdeAttribute, type SdeCategory, type SdeCloneGrade, type SdeDbuffCollection, type SdeDynamicAttribute, type SdeEffect, type SdeGroup, type SdeMarketGroup, type SdeMetaGroup, type SdeModifierInfo, type SdeType, type SdeUnit, type SkillCheckResult, type SkillProfile, type SkillRequirement, type SlotType, type StructureMeta, type StructureServiceModule, TARGET_PROFILE_PRESETS, type TankRates, type TargetProfile, type TypeBucket, WEAPON_EFFECT_KIND, type WeaponContribution, type WeaponEffectKind, type WeaponKind, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
2325
+ export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, CATEGORY, DAMAGE_PROFILE_PRESETS, FitContext, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, ModifiedAttribute, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, TARGET_PROFILE_PRESETS, WEAPON_EFFECT_KIND, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, effectiveModuleState, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isOverloadableModule, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, nextModuleState, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
2326
+ export type { BundleManifest, CapacitorReport, ComputeFitOptions, ComputedAttribute, ComputedFit, DamageProfile, DefenseLayerKind, DerivedStats, DroneComputed, EftParseResult, EwarKind, FighterComputed, Fit, FitBooster, FitCargo, FitDrone, FitFighter, FitImplant, FitModule, FitSubsystem, FitVisibility, FitWarning, FittingDataset, ItemKind, LayerEhp, LegacyEffectEntry, MarketGroupPlacement, ModifierAffliction, ModifierOperation, ModuleAttrSnapshot, ModuleComputed, ModuleState, MutatorData, OffenseReport, ProjectedEffectReport, ProjectedSource, SdeAttribute, SdeCategory, SdeCloneGrade, SdeDbuffCollection, SdeDynamicAttribute, SdeEffect, SdeGroup, SdeMarketGroup, SdeMetaGroup, SdeModifierInfo, SdeType, SdeUnit, SkillCheckResult, SkillProfile, SkillRequirement, SlotType, StructureMeta, StructureServiceModule, TankRates, TargetProfile, TypeBucket, WeaponContribution, WeaponEffectKind, WeaponKind };
package/dist/index.d.ts CHANGED
@@ -2257,6 +2257,25 @@ declare function moduleAcceptsChargeType(mod: SdeType, charge: SdeType): boolean
2257
2257
  declare function isActivatableModule(mod: SdeType, effects: Map<number, {
2258
2258
  effectCategoryID?: number;
2259
2259
  }>): boolean;
2260
+ /** True iff the module declares an overload (overheat) effect (cat 5). */
2261
+ declare function isOverloadableModule(mod: SdeType, effects: Map<number, {
2262
+ effectCategoryID?: number;
2263
+ }>): boolean;
2264
+ /**
2265
+ * State to SHOW/treat for a module: passive modules saved as ACTIVE/OVERLOAD
2266
+ * read as ONLINE, non-overloadable ones saved as OVERLOAD read as ACTIVE.
2267
+ * Display-only — stored data is not migrated.
2268
+ */
2269
+ declare function effectiveModuleState(mod: SdeType, effects: Map<number, {
2270
+ effectCategoryID?: number;
2271
+ }>, state: 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD'): 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD';
2272
+ /**
2273
+ * Next state on a plain click. Passive: ONLINE <-> OFFLINE. Activatable:
2274
+ * ONLINE -> ACTIVE -> (OVERLOAD if overloadable) -> ONLINE; OFFLINE -> ONLINE.
2275
+ */
2276
+ declare function nextModuleState(mod: SdeType, effects: Map<number, {
2277
+ effectCategoryID?: number;
2278
+ }>, state: 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD'): 'OFFLINE' | 'ONLINE' | 'ACTIVE' | 'OVERLOAD';
2260
2279
  /**
2261
2280
  * Decide the default state a module should be in when newly fitted /
2262
2281
  * imported. Modules with at least one activation-class effect want to
@@ -2303,4 +2322,5 @@ declare function freeHardpointsFor(mod: SdeType, ship: SdeType, fittedHiModules:
2303
2322
  */
2304
2323
  declare function defaultModeTypeIDFor(ship: SdeType, dataset: FittingDataset): number | undefined;
2305
2324
 
2306
- export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, type BundleManifest, CATEGORY, type CapacitorReport, type ComputeFitOptions, type ComputedAttribute, type ComputedFit, DAMAGE_PROFILE_PRESETS, type DamageProfile, type DefenseLayerKind, type DerivedStats, type DroneComputed, type EftParseResult, type EwarKind, type FighterComputed, type Fit, type FitBooster, type FitCargo, FitContext, type FitDrone, type FitFighter, type FitImplant, type FitModule, type FitSubsystem, type FitVisibility, type FitWarning, type FittingDataset, type ItemKind, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, type LayerEhp, type LegacyEffectEntry, type MarketGroupPlacement, ModifiedAttribute, type ModifierAffliction, type ModifierOperation, type ModuleAttrSnapshot, type ModuleComputed, type ModuleState, type MutatorData, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, type OffenseReport, type ProjectedEffectReport, type ProjectedSource, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, type SdeAttribute, type SdeCategory, type SdeCloneGrade, type SdeDbuffCollection, type SdeDynamicAttribute, type SdeEffect, type SdeGroup, type SdeMarketGroup, type SdeMetaGroup, type SdeModifierInfo, type SdeType, type SdeUnit, type SkillCheckResult, type SkillProfile, type SkillRequirement, type SlotType, type StructureMeta, type StructureServiceModule, TARGET_PROFILE_PRESETS, type TankRates, type TargetProfile, type TypeBucket, WEAPON_EFFECT_KIND, type WeaponContribution, type WeaponEffectKind, type WeaponKind, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
2325
+ export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, CATEGORY, DAMAGE_PROFILE_PRESETS, FitContext, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, ModifiedAttribute, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, TARGET_PROFILE_PRESETS, WEAPON_EFFECT_KIND, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, effectiveModuleState, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isOverloadableModule, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, nextModuleState, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
2326
+ export type { BundleManifest, CapacitorReport, ComputeFitOptions, ComputedAttribute, ComputedFit, DamageProfile, DefenseLayerKind, DerivedStats, DroneComputed, EftParseResult, EwarKind, FighterComputed, Fit, FitBooster, FitCargo, FitDrone, FitFighter, FitImplant, FitModule, FitSubsystem, FitVisibility, FitWarning, FittingDataset, ItemKind, LayerEhp, LegacyEffectEntry, MarketGroupPlacement, ModifierAffliction, ModifierOperation, ModuleAttrSnapshot, ModuleComputed, ModuleState, MutatorData, OffenseReport, ProjectedEffectReport, ProjectedSource, SdeAttribute, SdeCategory, SdeCloneGrade, SdeDbuffCollection, SdeDynamicAttribute, SdeEffect, SdeGroup, SdeMarketGroup, SdeMetaGroup, SdeModifierInfo, SdeType, SdeUnit, SkillCheckResult, SkillProfile, SkillRequirement, SlotType, StructureMeta, StructureServiceModule, TankRates, TargetProfile, TypeBucket, WeaponContribution, WeaponEffectKind, WeaponKind };
package/dist/index.js CHANGED
@@ -711,8 +711,11 @@ function moduleAcceptsChargeType(mod, charge) {
711
711
  return true;
712
712
  }
713
713
  var ACTIVE_EFFECT_CATEGORIES = /* @__PURE__ */ new Set([1, 2, 3]);
714
+ var ONLINE_EFFECT_ID = 16;
715
+ var OVERLOAD_EFFECT_CATEGORY = 5;
714
716
  function isActivatableModule(mod, effects) {
715
717
  for (const e of mod.effects) {
718
+ if (e.id === ONLINE_EFFECT_ID) continue;
716
719
  const eff = effects.get(e.id);
717
720
  if (eff && eff.effectCategoryID !== void 0 && ACTIVE_EFFECT_CATEGORIES.has(eff.effectCategoryID)) {
718
721
  return true;
@@ -720,6 +723,25 @@ function isActivatableModule(mod, effects) {
720
723
  }
721
724
  return false;
722
725
  }
726
+ function isOverloadableModule(mod, effects) {
727
+ for (const e of mod.effects) {
728
+ if (effects.get(e.id)?.effectCategoryID === OVERLOAD_EFFECT_CATEGORY) return true;
729
+ }
730
+ return false;
731
+ }
732
+ function effectiveModuleState(mod, effects, state) {
733
+ if (state === "OFFLINE" || state === "ONLINE") return state;
734
+ if (!isActivatableModule(mod, effects)) return "ONLINE";
735
+ if (state === "OVERLOAD" && !isOverloadableModule(mod, effects)) return "ACTIVE";
736
+ return state;
737
+ }
738
+ function nextModuleState(mod, effects, state) {
739
+ const cur = effectiveModuleState(mod, effects, state);
740
+ if (!isActivatableModule(mod, effects)) return cur === "OFFLINE" ? "ONLINE" : "OFFLINE";
741
+ if (cur === "ONLINE") return "ACTIVE";
742
+ if (cur === "ACTIVE") return isOverloadableModule(mod, effects) ? "OVERLOAD" : "ONLINE";
743
+ return "ONLINE";
744
+ }
723
745
  var DEFAULT_OFFLINE_ACTIVATION_GROUPS = /* @__PURE__ */ new Set([
724
746
  330,
725
747
  4117
@@ -6511,4 +6533,4 @@ var TARGET_PROFILE_PRESETS = [
6511
6533
  { name: "Keepstar", signatureRadius: 3e4, maxVelocity: 0, emResist: 0.7, thermalResist: 0.7, kineticResist: 0.7, explosiveResist: 0.7, isPreset: true }
6512
6534
  ];
6513
6535
 
6514
- export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, CATEGORY, DAMAGE_PROFILE_PRESETS, FitContext, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, ModifiedAttribute, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, TARGET_PROFILE_PRESETS, WEAPON_EFFECT_KIND, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
6536
+ export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, CATEGORY, DAMAGE_PROFILE_PRESETS, FitContext, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, ModifiedAttribute, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, TARGET_PROFILE_PRESETS, WEAPON_EFFECT_KIND, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, effectiveModuleState, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isOverloadableModule, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, nextModuleState, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
package/dist/node.cjs CHANGED
@@ -741,8 +741,11 @@ function moduleAcceptsChargeType(mod, charge) {
741
741
  return true;
742
742
  }
743
743
  var ACTIVE_EFFECT_CATEGORIES = /* @__PURE__ */ new Set([1, 2, 3]);
744
+ var ONLINE_EFFECT_ID = 16;
745
+ var OVERLOAD_EFFECT_CATEGORY = 5;
744
746
  function isActivatableModule(mod, effects) {
745
747
  for (const e of mod.effects) {
748
+ if (e.id === ONLINE_EFFECT_ID) continue;
746
749
  const eff = effects.get(e.id);
747
750
  if (eff && eff.effectCategoryID !== void 0 && ACTIVE_EFFECT_CATEGORIES.has(eff.effectCategoryID)) {
748
751
  return true;
@@ -750,6 +753,25 @@ function isActivatableModule(mod, effects) {
750
753
  }
751
754
  return false;
752
755
  }
756
+ function isOverloadableModule(mod, effects) {
757
+ for (const e of mod.effects) {
758
+ if (effects.get(e.id)?.effectCategoryID === OVERLOAD_EFFECT_CATEGORY) return true;
759
+ }
760
+ return false;
761
+ }
762
+ function effectiveModuleState(mod, effects, state) {
763
+ if (state === "OFFLINE" || state === "ONLINE") return state;
764
+ if (!isActivatableModule(mod, effects)) return "ONLINE";
765
+ if (state === "OVERLOAD" && !isOverloadableModule(mod, effects)) return "ACTIVE";
766
+ return state;
767
+ }
768
+ function nextModuleState(mod, effects, state) {
769
+ const cur = effectiveModuleState(mod, effects, state);
770
+ if (!isActivatableModule(mod, effects)) return cur === "OFFLINE" ? "ONLINE" : "OFFLINE";
771
+ if (cur === "ONLINE") return "ACTIVE";
772
+ if (cur === "ACTIVE") return isOverloadableModule(mod, effects) ? "OVERLOAD" : "ONLINE";
773
+ return "ONLINE";
774
+ }
753
775
  var DEFAULT_OFFLINE_ACTIVATION_GROUPS = /* @__PURE__ */ new Set([
754
776
  330,
755
777
  4117
@@ -6693,6 +6715,7 @@ exports.disintegratorCyclesToFullSpool = disintegratorCyclesToFullSpool;
6693
6715
  exports.disintegratorSpoolBonus = disintegratorSpoolBonus;
6694
6716
  exports.ecmJamChance = ecmJamChance;
6695
6717
  exports.effectiveDps = effectiveDps;
6718
+ exports.effectiveModuleState = effectiveModuleState;
6696
6719
  exports.ehpUnderProfile = ehpUnderProfile;
6697
6720
  exports.formatDna = formatDna;
6698
6721
  exports.formatEft = formatEft;
@@ -6702,6 +6725,7 @@ exports.freeFitGroupSlotsFor = freeFitGroupSlotsFor;
6702
6725
  exports.freeHardpointsFor = freeHardpointsFor;
6703
6726
  exports.isActivatableModule = isActivatableModule;
6704
6727
  exports.isMissileLauncher = isMissileLauncher;
6728
+ exports.isOverloadableModule = isOverloadableModule;
6705
6729
  exports.isSmartBomb = isSmartBomb;
6706
6730
  exports.isTurretWeapon = isTurretWeapon;
6707
6731
  exports.loadBundledDataset = loadBundledDataset;
@@ -6711,6 +6735,7 @@ exports.maxTypeFittedFor = maxTypeFittedFor;
6711
6735
  exports.moduleAcceptsAnyCharge = moduleAcceptsAnyCharge;
6712
6736
  exports.moduleAcceptsCharge = moduleAcceptsCharge;
6713
6737
  exports.moduleAcceptsChargeType = moduleAcceptsChargeType;
6738
+ exports.nextModuleState = nextModuleState;
6714
6739
  exports.parseEft = parseEft;
6715
6740
  exports.peakRecharge = peakRecharge;
6716
6741
  exports.readCycleInfo = readCycleInfo;
package/dist/node.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fit, ComputedFit, FittingDataset, SkillProfile, ComputeFitOptions } from './index.cjs';
2
- export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, BundleManifest, CATEGORY, CapacitorReport, ComputedAttribute, DAMAGE_PROFILE_PRESETS, DamageProfile, DefenseLayerKind, DerivedStats, DroneComputed, EftParseResult, EwarKind, FighterComputed, FitBooster, FitCargo, FitContext, FitDrone, FitFighter, FitImplant, FitModule, FitSubsystem, FitVisibility, FitWarning, ItemKind, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, LayerEhp, LegacyEffectEntry, MarketGroupPlacement, ModifiedAttribute, ModifierAffliction, ModifierOperation, ModuleAttrSnapshot, ModuleComputed, ModuleState, MutatorData, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, OffenseReport, ProjectedEffectReport, ProjectedSource, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, SdeAttribute, SdeCategory, SdeCloneGrade, SdeDbuffCollection, SdeDynamicAttribute, SdeEffect, SdeGroup, SdeMarketGroup, SdeMetaGroup, SdeModifierInfo, SdeType, SdeUnit, SkillCheckResult, SkillRequirement, SlotType, StructureMeta, StructureServiceModule, TARGET_PROFILE_PRESETS, TankRates, TargetProfile, TypeBucket, WEAPON_EFFECT_KIND, WeaponContribution, WeaponEffectKind, WeaponKind, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds } from './index.cjs';
2
+ export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, BundleManifest, CATEGORY, CapacitorReport, ComputedAttribute, DAMAGE_PROFILE_PRESETS, DamageProfile, DefenseLayerKind, DerivedStats, DroneComputed, EftParseResult, EwarKind, FighterComputed, FitBooster, FitCargo, FitContext, FitDrone, FitFighter, FitImplant, FitModule, FitSubsystem, FitVisibility, FitWarning, ItemKind, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, LayerEhp, LegacyEffectEntry, MarketGroupPlacement, ModifiedAttribute, ModifierAffliction, ModifierOperation, ModuleAttrSnapshot, ModuleComputed, ModuleState, MutatorData, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, OffenseReport, ProjectedEffectReport, ProjectedSource, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, SdeAttribute, SdeCategory, SdeCloneGrade, SdeDbuffCollection, SdeDynamicAttribute, SdeEffect, SdeGroup, SdeMarketGroup, SdeMetaGroup, SdeModifierInfo, SdeType, SdeUnit, SkillCheckResult, SkillRequirement, SlotType, StructureMeta, StructureServiceModule, TARGET_PROFILE_PRESETS, TankRates, TargetProfile, TypeBucket, WEAPON_EFFECT_KIND, WeaponContribution, WeaponEffectKind, WeaponKind, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, effectiveModuleState, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isOverloadableModule, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, nextModuleState, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds } from './index.cjs';
3
3
 
4
4
  /**
5
5
  * Absolute path to the bundled SDE directory shipped in this package
@@ -31,4 +31,5 @@ interface ComputeFromEftResult {
31
31
  */
32
32
  declare function computeFromEft(eft: string, options?: Partial<ComputeFitOptions>): Promise<ComputeFromEftResult>;
33
33
 
34
- export { BUNDLED_DATA_DIR, ComputeFitOptions, type ComputeFromEftResult, ComputedFit, Fit, FittingDataset, SkillProfile, buildAllVSkillProfile, computeFromEft, loadBundledDataset };
34
+ export { BUNDLED_DATA_DIR, ComputeFitOptions, ComputedFit, Fit, FittingDataset, SkillProfile, buildAllVSkillProfile, computeFromEft, loadBundledDataset };
35
+ export type { ComputeFromEftResult };
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fit, ComputedFit, FittingDataset, SkillProfile, ComputeFitOptions } from './index.js';
2
- export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, BundleManifest, CATEGORY, CapacitorReport, ComputedAttribute, DAMAGE_PROFILE_PRESETS, DamageProfile, DefenseLayerKind, DerivedStats, DroneComputed, EftParseResult, EwarKind, FighterComputed, FitBooster, FitCargo, FitContext, FitDrone, FitFighter, FitImplant, FitModule, FitSubsystem, FitVisibility, FitWarning, ItemKind, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, LayerEhp, LegacyEffectEntry, MarketGroupPlacement, ModifiedAttribute, ModifierAffliction, ModifierOperation, ModuleAttrSnapshot, ModuleComputed, ModuleState, MutatorData, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, OffenseReport, ProjectedEffectReport, ProjectedSource, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, SdeAttribute, SdeCategory, SdeCloneGrade, SdeDbuffCollection, SdeDynamicAttribute, SdeEffect, SdeGroup, SdeMarketGroup, SdeMetaGroup, SdeModifierInfo, SdeType, SdeUnit, SkillCheckResult, SkillRequirement, SlotType, StructureMeta, StructureServiceModule, TARGET_PROFILE_PRESETS, TankRates, TargetProfile, TypeBucket, WEAPON_EFFECT_KIND, WeaponContribution, WeaponEffectKind, WeaponKind, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds } from './index.js';
2
+ export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, BundleManifest, CATEGORY, CapacitorReport, ComputedAttribute, DAMAGE_PROFILE_PRESETS, DamageProfile, DefenseLayerKind, DerivedStats, DroneComputed, EftParseResult, EwarKind, FighterComputed, FitBooster, FitCargo, FitContext, FitDrone, FitFighter, FitImplant, FitModule, FitSubsystem, FitVisibility, FitWarning, ItemKind, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, LayerEhp, LegacyEffectEntry, MarketGroupPlacement, ModifiedAttribute, ModifierAffliction, ModifierOperation, ModuleAttrSnapshot, ModuleComputed, ModuleState, MutatorData, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, OffenseReport, ProjectedEffectReport, ProjectedSource, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, SdeAttribute, SdeCategory, SdeCloneGrade, SdeDbuffCollection, SdeDynamicAttribute, SdeEffect, SdeGroup, SdeMarketGroup, SdeMetaGroup, SdeModifierInfo, SdeType, SdeUnit, SkillCheckResult, SkillRequirement, SlotType, StructureMeta, StructureServiceModule, TARGET_PROFILE_PRESETS, TankRates, TargetProfile, TypeBucket, WEAPON_EFFECT_KIND, WeaponContribution, WeaponEffectKind, WeaponKind, applyOneModifier, applySkills, applySourceItem, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, effectiveModuleState, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isOverloadableModule, isSmartBomb, isTurretWeapon, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, nextModuleState, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds } from './index.js';
3
3
 
4
4
  /**
5
5
  * Absolute path to the bundled SDE directory shipped in this package
@@ -31,4 +31,5 @@ interface ComputeFromEftResult {
31
31
  */
32
32
  declare function computeFromEft(eft: string, options?: Partial<ComputeFitOptions>): Promise<ComputeFromEftResult>;
33
33
 
34
- export { BUNDLED_DATA_DIR, ComputeFitOptions, type ComputeFromEftResult, ComputedFit, Fit, FittingDataset, SkillProfile, buildAllVSkillProfile, computeFromEft, loadBundledDataset };
34
+ export { BUNDLED_DATA_DIR, ComputeFitOptions, ComputedFit, Fit, FittingDataset, SkillProfile, buildAllVSkillProfile, computeFromEft, loadBundledDataset };
35
+ export type { ComputeFromEftResult };
package/dist/node.js CHANGED
@@ -717,8 +717,11 @@ function moduleAcceptsChargeType(mod, charge) {
717
717
  return true;
718
718
  }
719
719
  var ACTIVE_EFFECT_CATEGORIES = /* @__PURE__ */ new Set([1, 2, 3]);
720
+ var ONLINE_EFFECT_ID = 16;
721
+ var OVERLOAD_EFFECT_CATEGORY = 5;
720
722
  function isActivatableModule(mod, effects) {
721
723
  for (const e of mod.effects) {
724
+ if (e.id === ONLINE_EFFECT_ID) continue;
722
725
  const eff = effects.get(e.id);
723
726
  if (eff && eff.effectCategoryID !== void 0 && ACTIVE_EFFECT_CATEGORIES.has(eff.effectCategoryID)) {
724
727
  return true;
@@ -726,6 +729,25 @@ function isActivatableModule(mod, effects) {
726
729
  }
727
730
  return false;
728
731
  }
732
+ function isOverloadableModule(mod, effects) {
733
+ for (const e of mod.effects) {
734
+ if (effects.get(e.id)?.effectCategoryID === OVERLOAD_EFFECT_CATEGORY) return true;
735
+ }
736
+ return false;
737
+ }
738
+ function effectiveModuleState(mod, effects, state) {
739
+ if (state === "OFFLINE" || state === "ONLINE") return state;
740
+ if (!isActivatableModule(mod, effects)) return "ONLINE";
741
+ if (state === "OVERLOAD" && !isOverloadableModule(mod, effects)) return "ACTIVE";
742
+ return state;
743
+ }
744
+ function nextModuleState(mod, effects, state) {
745
+ const cur = effectiveModuleState(mod, effects, state);
746
+ if (!isActivatableModule(mod, effects)) return cur === "OFFLINE" ? "ONLINE" : "OFFLINE";
747
+ if (cur === "ONLINE") return "ACTIVE";
748
+ if (cur === "ACTIVE") return isOverloadableModule(mod, effects) ? "OVERLOAD" : "ONLINE";
749
+ return "ONLINE";
750
+ }
729
751
  var DEFAULT_OFFLINE_ACTIVATION_GROUPS = /* @__PURE__ */ new Set([
730
752
  330,
731
753
  4117
@@ -6620,4 +6642,4 @@ async function computeFromEft(eft, options = {}) {
6620
6642
  return { fit, warnings, computed };
6621
6643
  }
6622
6644
 
6623
- export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, BUNDLED_DATA_DIR, CATEGORY, DAMAGE_PROFILE_PRESETS, FitContext, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, ModifiedAttribute, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, TARGET_PROFILE_PRESETS, WEAPON_EFFECT_KIND, applyOneModifier, applySkills, applySourceItem, buildAllVSkillProfile, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeFromEft, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isSmartBomb, isTurretWeapon, loadBundledDataset, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
6645
+ export { ACTIVATION_EFFECT_ID, ATTR, BOOSTER_SIDE_EFFECT_IDS, BUNDLED_DATA_DIR, CATEGORY, DAMAGE_PROFILE_PRESETS, FitContext, ItemState, LEGACY_EFFECT_IDS, LEGACY_HANDLED_EFFECT_IDS, ModifiedAttribute, OPERATION_BY_SDE_CODE, OUT_OF_SCOPE_EFFECT_IDS, REPAIR_EFFECT_AMOUNT_ATTR, REQUIRED_SKILL_PAIRS, SLOT_EFFECT_ID, SLOT_EFFECT_TO_SLOT_TYPE, STACKING_PENALTY_K, TARGET_PROFILE_PRESETS, WEAPON_EFFECT_KIND, applyOneModifier, applySkills, applySourceItem, buildAllVSkillProfile, buildNameIndex, canFitModuleOnShip, chargeGroupsForModule, checkSkills, classifyEwar, classifyWeapon, combineJamChances, combineMultiplicative, combinePenalized, combineUnstacked, computeCapacitor, computeFit, computeFromEft, computeLayerEhp, computeOffense, computeStructureMeta, computeT3CVariantCode, computeTank, computeTotalEhp, defaultModeTypeIDFor, defaultStateForModule, disintegratorCyclesToFullSpool, disintegratorSpoolBonus, ecmJamChance, effectiveDps, effectiveModuleState, ehpUnderProfile, formatDna, formatEft, formatMultibuy, formatTypeIds, freeFitGroupSlotsFor, freeHardpointsFor, isActivatableModule, isMissileLauncher, isOverloadableModule, isSmartBomb, isTurretWeapon, loadBundledDataset, marketGroupPlacement, maxGroupFittedFor, maxTypeFittedFor, moduleAcceptsAnyCharge, moduleAcceptsCharge, moduleAcceptsChargeType, nextModuleState, parseEft, peakRecharge, readCycleInfo, readDamageComponents, readRangeInfo, rechargeRateAt, shipGroupRestrictions, shipTypeRestrictions, typeFitsSlotType, verifyLegacyEffectIds };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-fit-engine",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Pyfa-parity EVE Online ship & structure fitting calculation engine. Inject an SDE dataset + a fit, get the full derived stat block (offense, defense, capacitor, navigation, targeting, fitting, projected, structure).",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",
@@ -67,7 +67,7 @@
67
67
  "devDependencies": {
68
68
  "@types/node": "^26.6.4",
69
69
  "adm-zip": "^0.6.1",
70
- "tsup": "^8.3.5",
70
+ "tsup": "^9.0.0",
71
71
  "tsx": "^4.23.15",
72
72
  "typescript": "^6.0.3"
73
73
  },