mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 06:43:24 +00:00
Fix to jump range calculation / function
This commit is contained in:
@@ -153,7 +153,7 @@ angular.module('shipyard', ['ngLodash'])
|
|||||||
* @return {number} Distance in Light Years
|
* @return {number} Distance in Light Years
|
||||||
*/
|
*/
|
||||||
.value('calcJumpRange', function(mass, fsd, fuel) {
|
.value('calcJumpRange', function(mass, fsd, fuel) {
|
||||||
return Math.pow(Math.min(fuel || Infinity, fsd.maxfuel) / fsd.fuelmul, 1 / fsd.fuelpower ) * fsd.optmass / mass;
|
return Math.pow(Math.min(fuel === undefined? fsd.maxfuel : fuel, fsd.maxfuel) / fsd.fuelmul, 1 / fsd.fuelpower ) * fsd.optmass / mass;
|
||||||
})
|
})
|
||||||
/**
|
/**
|
||||||
* Calculate the a ships shield strength based on mass, shield generator and shield boosters used.
|
* Calculate the a ships shield strength based on mass, shield generator and shield boosters used.
|
||||||
|
|||||||
Reference in New Issue
Block a user