From f55448c0a8f824c66ec16853593d97728727b69a Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Tue, 1 Nov 2016 07:24:38 +0000 Subject: [PATCH] Ensure that fuel tank mass is displayed --- src/app/components/InternalSlot.jsx | 3 ++- src/app/components/StandardSlot.jsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/InternalSlot.jsx b/src/app/components/InternalSlot.jsx index e5771787..9266c430 100644 --- a/src/app/components/InternalSlot.jsx +++ b/src/app/components/InternalSlot.jsx @@ -24,10 +24,11 @@ export default class InternalSlot extends Slot { let { termtip, tooltip } = this.context; let validMods = Modifications.validity[m.grp] || []; + let mass = m.getMass() || m.cargo || m.fuel || 0; return
{classRating} {translate(m.name || m.grp)}
-
{formats.round1(m.getMass()) || m.cargo || m.fuel || 0}{u.T}
+
{formats.round1(mass)}{u.T}
{ m.getOptMass() ?
{translate('optimal mass')}: {formats.int(m.getOptMass())}{u.T}
: null } diff --git a/src/app/components/StandardSlot.jsx b/src/app/components/StandardSlot.jsx index 98771aca..154a9b19 100644 --- a/src/app/components/StandardSlot.jsx +++ b/src/app/components/StandardSlot.jsx @@ -46,6 +46,7 @@ export default class StandardSlot extends TranslatedComponent { let classRating = m.class + m.rating; let menu; let validMods = m == null ? [] : (Modifications.validity[m.grp] || []); + let mass = m.getMass() || m.cargo || m.fuel || 0; if (!selected) { // If not selected then sure that modifications flag is unset @@ -79,7 +80,7 @@ export default class StandardSlot extends TranslatedComponent {
{slot.maxClass}
{classRating} {translate(m.grp == 'bh' ? m.grp : m.name || m.grp)}
-
{formats.round1(m.getMass()) || m.fuel || 0}{units.T}
+
{formats.round1(mass)}{units.T}
{ m.grp == 'bh' && m.name ?
{translate(m.name)}
: null }