From 7c71555384f48ec086a6ad23495a5e67938ea654 Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Wed, 2 Nov 2016 11:03:29 +0000 Subject: [PATCH] Added facing limit and range for fsdi --- src/app/components/InternalSlot.jsx | 2 ++ src/app/i18n/Language.jsx | 1 + src/app/i18n/en.js | 1 + src/app/shipyard/Module.js | 18 +++++++++++++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/app/components/InternalSlot.jsx b/src/app/components/InternalSlot.jsx index 9266c430..a1f8b4a1 100644 --- a/src/app/components/InternalSlot.jsx +++ b/src/app/components/InternalSlot.jsx @@ -40,7 +40,9 @@ export default class InternalSlot extends Slot { { m.cells ?
{translate('cells')}: {m.cells}
: null } { m.recharge ?
{translate('recharge')}: {m.recharge} MJ   {translate('total')}: {m.cells * m.recharge}{u.MJ}
: null } { m.repair ?
{translate('repair')}: {m.repair}
: null } + { m.getFacingLimit() ?
{translate('facinglimit')} {formats.f1(m.getFacingLimit())}°
: null } { m.getRange() ?
{translate('range')} {formats.f2(m.getRange())}{u.km}
: null } + { m.getRangeT() ?
{translate('ranget')} {formats.f1(m.getRangeT())}{u.s}
: null } { m.time ?
{translate('time')}: {formats.time(m.time)}
: null } { m.maximum ?
{translate('max')}: {(m.maximum)}
: null } { m.rangeLS ?
{translate('range')}: {m.rangeLS}{u.Ls}
: null } diff --git a/src/app/i18n/Language.jsx b/src/app/i18n/Language.jsx index fb4ea958..da82304f 100644 --- a/src/app/i18n/Language.jsx +++ b/src/app/i18n/Language.jsx @@ -66,6 +66,7 @@ export function getLanguage(langCode) { MW: {translate('MW')}, // Mega Watts (same as Mega Joules per second) ps: {translate('/s')}, // per second pm: {translate('/min')}, // per minute + s: {translate('secs')}, // Seconds T: {translate('T')}, // Metric Tons } }; diff --git a/src/app/i18n/en.js b/src/app/i18n/en.js index a0e86c82..7018e20c 100644 --- a/src/app/i18n/en.js +++ b/src/app/i18n/en.js @@ -115,6 +115,7 @@ export const terms = { pGen: 'Power generation', power: 'Power draw', range: 'Range', + ranget: 'Range', // Range in time (for FSD interdictor) regen: 'Regeneration rate', reload: 'Reload time', rof: 'Rate of fire', diff --git a/src/app/shipyard/Module.js b/src/app/shipyard/Module.js index dca61b1e..ca25fa76 100755 --- a/src/app/shipyard/Module.js +++ b/src/app/shipyard/Module.js @@ -259,13 +259,21 @@ export default class Module { } /** - * Get the range rate for this module, taking in to account modifications + * Get the range for this module, taking in to account modifications * @return {Number} the range rate of this module */ getRange() { return this._getModifiedValue('range'); } + /** + * Get the range (in terms of seconds, for FSDI) for this module, taking in to account modifications + * @return {Number} the range of this module + */ + getRangeT() { + return this._getModifiedValue('ranget'); + } + /** * Get the capture arc for this module, taking in to account modifications * @return {Number} the capture arc of this module @@ -471,4 +479,12 @@ export default class Module { getRoF() { return this._getModifiedValue('rof'); } + + /** + * Get the facing limit for this module, taking in to account modifications + * @return {Number} the facing limit for this module + */ + getFacingLimit() { + return this._getModifiedValue('facinglimit'); + } }