mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Remove extraneous functions
This commit is contained in:
@@ -91,7 +91,8 @@ export default class StandardSlot extends TranslatedComponent {
|
|||||||
<div className={'r'}>{formats.round(mass)}{units.T}</div>
|
<div className={'r'}>{formats.round(mass)}{units.T}</div>
|
||||||
<div/>
|
<div/>
|
||||||
<div className={'cb'}>
|
<div className={'cb'}>
|
||||||
{ m.getOptimalMass() ? <div className='l'>{translate('optimal mass')}: {formats.int(m.getOptimalMass())}{units.T}</div> : null }
|
{ m.getMinMass() ? <div className='l'>{translate('minimum mass')}: {formats.int(m.getMinMass())}{units.T}</div> : null }
|
||||||
|
{ m.getOptMass() ? <div className='l'>{translate('optimal mass')}: {formats.int(m.getOptMass())}{units.T}</div> : null }
|
||||||
{ m.getMaxMass() ? <div className='l'>{translate('max mass')}: {formats.int(m.getMaxMass())}{units.T}</div> : null }
|
{ m.getMaxMass() ? <div className='l'>{translate('max mass')}: {formats.int(m.getMaxMass())}{units.T}</div> : null }
|
||||||
{ m.getRange() ? <div className='l'>{translate('range')}: {formats.f2(m.getRange())}{units.km}</div> : null }
|
{ m.getRange() ? <div className='l'>{translate('range')}: {formats.f2(m.getRange())}{units.km}</div> : null }
|
||||||
{ m.time ? <div className='l'>{translate('time')}: {formats.time(m.time)}</div> : null }
|
{ m.time ? <div className='l'>{translate('time')}: {formats.time(m.time)}</div> : null }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import Module from './Module';
|
|||||||
*/
|
*/
|
||||||
export function jumpRange(mass, fsd, fuel) {
|
export function jumpRange(mass, fsd, fuel) {
|
||||||
let fsdMaxFuelPerJump = fsd instanceof Module ? fsd.getMaxFuelPerJump() : fsd.maxfuel;
|
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;
|
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) {
|
export function fastestRange(mass, fsd, fuel) {
|
||||||
let fsdMaxFuelPerJump = fsd instanceof Module ? fsd.getMaxFuelPerJump() : fsd.maxfuel;
|
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 fuelRemaining = fuel % fsdMaxFuelPerJump; // Fuel left after making N max jumps
|
||||||
let jumps = Math.floor(fuel / fsdMaxFuelPerJump);
|
let jumps = Math.floor(fuel / fsdMaxFuelPerJump);
|
||||||
mass += fuelRemaining;
|
mass += fuelRemaining;
|
||||||
|
|||||||
@@ -210,30 +210,6 @@ export default class Module {
|
|||||||
return this._getModifiedValue('eff');
|
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
|
* Get the maximum fuel per jump for this module, taking in to account modifications
|
||||||
* @return {Number} the maximum fuel per jump of this module
|
* @return {Number} the maximum fuel per jump of this module
|
||||||
|
|||||||
Reference in New Issue
Block a user