diff --git a/ChangeLog.md b/ChangeLog.md
index b617f0ba..62b69b9a 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,6 @@
#2.2.11
* Add help system and initial help file
+ * Make absolute damage visible
#2.2.10
* Fix detailed export of module reinforcement packages
diff --git a/src/app/components/HardpointSlot.jsx b/src/app/components/HardpointSlot.jsx
index f6232568..ef6f913f 100644
--- a/src/app/components/HardpointSlot.jsx
+++ b/src/app/components/HardpointSlot.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import Slot from './Slot';
import Persist from '../stores/Persist';
-import { DamageKinetic, DamageThermal, DamageExplosive, MountFixed, MountGimballed, MountTurret, ListModifications, Modified } from './SvgIcons';
+import { DamageAbsolute, DamageKinetic, DamageThermal, DamageExplosive, MountFixed, MountGimballed, MountTurret, ListModifications, Modified } from './SvgIcons';
import { Modifications } from 'coriolis-data/dist';
import { stopCtxPropagation } from '../utils/UtilityFunctions';
@@ -62,6 +62,7 @@ export default class HardpointSlot extends Slot {
{m.getDamageDist() && m.getDamageDist().K ? : ''}
{m.getDamageDist() && m.getDamageDist().T ? : ''}
{m.getDamageDist() && m.getDamageDist().E ? : ''}
+ {m.getDamageDist() && m.getDamageDist().A ? : ''}
{classRating} {translate(m.name || m.grp)}{ m.mods && Object.keys(m.mods).length > 0 ? : null }
diff --git a/src/app/components/OffenceSummary.jsx b/src/app/components/OffenceSummary.jsx
index 9123ce5b..1aac8b8c 100644
--- a/src/app/components/OffenceSummary.jsx
+++ b/src/app/components/OffenceSummary.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import cn from 'classnames';
import TranslatedComponent from './TranslatedComponent';
-import { DamageKinetic, DamageThermal, DamageExplosive } from './SvgIcons';
+import { DamageAbsolute, DamageKinetic, DamageThermal, DamageExplosive } from './SvgIcons';
/**
* Offence summary
@@ -34,30 +34,33 @@ export default class OffenceSummary extends TranslatedComponent {
- {translate('dps')}: {formats.f1(ship.totalDps)} |
+ {translate('dps')}: {formats.f1(ship.totalDps)} |
| {translate('damage by')} |
+ {formats.f1(ship.totalAbsDps)} |
{formats.f1(ship.totalExplDps)} |
{formats.f1(ship.totalKinDps)} |
{formats.f1(ship.totalThermDps)} |
- {translate('sdps')}: {formats.f1(ship.totalSDps)} |
+ {translate('sdps')}: {formats.f1(ship.totalSDps)} |
| {translate('damage by')} |
+ {formats.f1(ship.totalAbsSDps)} |
{formats.f1(ship.totalExplSDps)} |
{formats.f1(ship.totalKinSDps)} |
{formats.f1(ship.totalThermSDps)} |
- {translate('dpe')}: {formats.f1(ship.totalDpe)} |
+ {translate('dpe')}: {formats.f1(ship.totalDpe)} |
| {translate('damage by')} |
+ {formats.f1(ship.totalAbsDpe)} |
{formats.f1(ship.totalExplDpe)} |
{formats.f1(ship.totalKinDpe)} |
{formats.f1(ship.totalThermDpe)} |
diff --git a/src/app/components/SvgIcons.jsx b/src/app/components/SvgIcons.jsx
index 41db111a..34d84118 100644
--- a/src/app/components/SvgIcons.jsx
+++ b/src/app/components/SvgIcons.jsx
@@ -319,6 +319,24 @@ export class Warning extends SvgIcon {
}
}
+/**
+ * Absolute damage
+ */
+export class DamageAbsolute extends SvgIcon {
+ /**
+ * Overriden view box
+ * @return {String} view box
+ */
+ viewBox() { return '0 0 200 200'; }
+ /**
+ * Generate the SVG
+ * @return {React.Component} SVG Contents
+ */
+ svg() {
+ return ;
+ }
+}
+
/**
* Thermal damage
*/
diff --git a/src/app/shipyard/Ship.js b/src/app/shipyard/Ship.js
index 88ffb9b0..2d2e0f13 100755
--- a/src/app/shipyard/Ship.js
+++ b/src/app/shipyard/Ship.js
@@ -533,14 +533,17 @@ export default class Ship {
this.totalCost = this.m.incCost ? this.m.discountedCost : 0;
this.unladenMass = this.hullMass;
this.totalDpe = 0;
+ this.totalAbsDpe = 0;
this.totalExplDpe = 0;
this.totalKinDpe = 0;
this.totalThermDpe = 0;
this.totalDps = 0;
+ this.totalAbsDps = 0;
this.totalExplDps = 0;
this.totalKinDps = 0;
this.totalThermDps = 0;
this.totalSDps = 0;
+ this.totalAbsSDps = 0;
this.totalExplSDps = 0;
this.totalKinSDps = 0;
this.totalThermSDps = 0;
@@ -958,14 +961,17 @@ export default class Ship {
*/
recalculateDps() {
let totalDpe = 0;
+ let totalAbsDpe = 0;
let totalExplDpe = 0;
let totalKinDpe = 0;
let totalThermDpe = 0;
let totalDps = 0;
+ let totalAbsDps = 0;
let totalExplDps = 0;
let totalKinDps = 0;
let totalThermDps = 0;
let totalSDps = 0;
+ let totalAbsSDps = 0;
let totalExplSDps = 0;
let totalKinSDps = 0;
let totalThermSDps = 0;
@@ -981,6 +987,11 @@ export default class Ship {
totalDps += dps;
totalSDps += sdps;
if (slot.m.getDamageDist()) {
+ if (slot.m.getDamageDist().A) {
+ totalAbsDpe += dpe * slot.m.getDamageDist().A;
+ totalAbsDps += dps * slot.m.getDamageDist().A;
+ totalAbsSDps += sdps * slot.m.getDamageDist().A;
+ }
if (slot.m.getDamageDist().E) {
totalExplDpe += dpe * slot.m.getDamageDist().E;
totalExplDps += dps * slot.m.getDamageDist().E;
@@ -1001,14 +1012,17 @@ export default class Ship {
}
this.totalDpe = totalDpe;
+ this.totalAbsDpe = totalAbsDpe;
this.totalExplDpe = totalExplDpe;
this.totalKinDpe = totalKinDpe;
this.totalThermDpe = totalThermDpe;
this.totalDps = totalDps;
+ this.totalAbsDps = totalAbsDps;
this.totalExplDps = totalExplDps;
this.totalKinDps = totalKinDps;
this.totalThermDps = totalThermDps;
this.totalSDps = totalSDps;
+ this.totalAbsSDps = totalAbsSDps;
this.totalExplSDps = totalExplSDps;
this.totalKinSDps = totalKinSDps;
this.totalThermSDps = totalThermSDps;