mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Damage dealt only shows enabled weapons
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* Add 'average' roll for blueprints
|
||||
* Update spacing for movement summary
|
||||
* Provide damage dealt statistics for both shields and hull
|
||||
* Damage dealt panel only shows enabled weapons
|
||||
|
||||
#2.2.10
|
||||
* Fix detailed export of module reinforcement packages
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class DamageDealt extends TranslatedComponent {
|
||||
|
||||
let weapons = [];
|
||||
for (let i = 0; i < ship.hardpoints.length; i++) {
|
||||
if (ship.hardpoints[i].m) {
|
||||
if (ship.hardpoints[i].m && ship.hardpoints[i].enabled) {
|
||||
const m = ship.hardpoints[i].m;
|
||||
if (m.getDamage() && m.grp !== 'po') {
|
||||
let dropoff = 1;
|
||||
@@ -162,8 +162,8 @@ export default class DamageDealt extends TranslatedComponent {
|
||||
}
|
||||
}
|
||||
}
|
||||
totals.effectivenessShields = totals.effectiveDpsShields / totalDps;
|
||||
totals.effectivenessHull = totals.effectiveDpsHull / totalDps;
|
||||
totals.effectivenessShields = totalDps == 0 ? 0 : totals.effectiveDpsShields / totalDps;
|
||||
totals.effectivenessHull = totalDps == 0 ? 0 : totals.effectiveDpsHull / totalDps;
|
||||
|
||||
return { weapons, totals };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user