mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Enhance ship jump range function
This commit is contained in:
@@ -167,12 +167,14 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [jumpRange description]
|
* Calculate jump range using the installed FSD and the
|
||||||
* @param {number} mass [description]
|
* specified mass which can be more or less than ships actual mass
|
||||||
|
* @param {number} mass Mass in tons
|
||||||
|
* @param {number} fuel Fuel available in tons
|
||||||
* @return {number} Jump range in Light Years
|
* @return {number} Jump range in Light Years
|
||||||
*/
|
*/
|
||||||
Ship.prototype.jumpRangeWithMass = function (mass) {
|
Ship.prototype.jumpRangeWithMass = function (mass, fuel) {
|
||||||
return calcJumpRange(mass, this.common[2].c);
|
return calcJumpRange(mass, this.common[2].c, fuel);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user