From d3891141896218dea24231d7ad892ac462fa575f Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Sat, 28 Jan 2017 20:40:58 +0000 Subject: [PATCH] Remove extraneous functions --- src/app/components/StandardSlot.jsx | 3 ++- src/app/shipyard/Calculations.js | 4 ++-- src/app/shipyard/Module.js | 24 ------------------------ 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/app/components/StandardSlot.jsx b/src/app/components/StandardSlot.jsx index d032fc00..f0e372fc 100644 --- a/src/app/components/StandardSlot.jsx +++ b/src/app/components/StandardSlot.jsx @@ -91,7 +91,8 @@ export default class StandardSlot extends TranslatedComponent {
{formats.round(mass)}{units.T}
- { m.getOptimalMass() ?
{translate('optimal mass')}: {formats.int(m.getOptimalMass())}{units.T}
: null } + { m.getMinMass() ?
{translate('minimum mass')}: {formats.int(m.getMinMass())}{units.T}
: null } + { m.getOptMass() ?
{translate('optimal mass')}: {formats.int(m.getOptMass())}{units.T}
: null } { m.getMaxMass() ?
{translate('max mass')}: {formats.int(m.getMaxMass())}{units.T}
: null } { m.getRange() ?
{translate('range')}: {formats.f2(m.getRange())}{units.km}
: null } { m.time ?
{translate('time')}: {formats.time(m.time)}
: null } diff --git a/src/app/shipyard/Calculations.js b/src/app/shipyard/Calculations.js index f9ab11e4..47b74b7f 100644 --- a/src/app/shipyard/Calculations.js +++ b/src/app/shipyard/Calculations.js @@ -10,7 +10,7 @@ import Module from './Module'; */ export function jumpRange(mass, fsd, fuel) { let fsdMaxFuelPerJump = fsd instanceof Module ? fsd.getMaxFuelPerJump() : fsd.maxfuel; - let fsdOptimalMass = fsd instanceof Module ? fsd.getOptimalMass() : fsd.optmass; + let fsdOptimalMass = fsd instanceof Module ? fsd.getOptMass() : fsd.optmass; return Math.pow(Math.min(fuel === undefined ? fsdMaxFuelPerJump : fuel, fsdMaxFuelPerJump) / fsd.fuelmul, 1 / fsd.fuelpower) * fsdOptimalMass / mass; } @@ -24,7 +24,7 @@ export function jumpRange(mass, fsd, fuel) { */ export function fastestRange(mass, fsd, fuel) { let fsdMaxFuelPerJump = fsd instanceof Module ? fsd.getMaxFuelPerJump() : fsd.maxfuel; - let fsdOptimalMass = fsd instanceof Module ? fsd.getOptimalMass() : fsd.optmass; + let fsdOptimalMass = fsd instanceof Module ? fsd.getOptMass() : fsd.optmass; let fuelRemaining = fuel % fsdMaxFuelPerJump; // Fuel left after making N max jumps let jumps = Math.floor(fuel / fsdMaxFuelPerJump); mass += fuelRemaining; diff --git a/src/app/shipyard/Module.js b/src/app/shipyard/Module.js index 930f4a3d..b47dec02 100755 --- a/src/app/shipyard/Module.js +++ b/src/app/shipyard/Module.js @@ -210,30 +210,6 @@ export default class Module { return this._getModifiedValue('eff'); } - /** - * Get the maximum mass of this module, taking in to account modifications - * @return {Number} the maximum mass of this module - */ - getMaxMass() { - return this._getModifiedValue('maxmass'); - } - - /** - * Get the optimal mass of this module, taking in to account modifications - * @return {Number} the optimal mass of this module - */ - getOptimalMass() { - return this._getModifiedValue('optmass'); - } - - /** - * Get the optimal multiplier of this module, taking in to account modifications - * @return {Number} the optimal multiplier of this module - */ - getOptimalMultiplier() { - return this._getModifiedValue('optmult'); - } - /** * Get the maximum fuel per jump for this module, taking in to account modifications * @return {Number} the maximum fuel per jump of this module