mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
@@ -51,6 +51,7 @@ export default class ShipSummaryTable extends TranslatedComponent {
|
||||
const canBoost = ship.canBoost(cargo, ship.fuelCapacity);
|
||||
const boostTooltip = canBoost ? 'TT_SUMMARY_BOOST' : canThrust ? 'TT_SUMMARY_BOOST_NONFUNCTIONAL' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL';
|
||||
const sgMetrics = Calc.shieldMetrics(ship, pips.sys || 2);
|
||||
const shipBoost = canBoost ? Calc.calcBoost(ship) : 'No Boost';
|
||||
const armourMetrics = Calc.armourMetrics(ship);
|
||||
let shieldColour = 'blue';
|
||||
if (shieldGenerator && shieldGenerator.m.grp === 'psg') {
|
||||
@@ -81,6 +82,7 @@ export default class ShipSummaryTable extends TranslatedComponent {
|
||||
<th onMouseEnter={termtip.bind(null, 'hull hardness', { cap: 0 })} onMouseLeave={hide} rowSpan={2}>{translate('hrd')}</th>
|
||||
<th rowSpan={2}>{translate('crew')}</th>
|
||||
<th onMouseEnter={termtip.bind(null, 'mass lock factor', { cap: 0 })} onMouseLeave={hide} rowSpan={2}>{translate('MLF')}</th>
|
||||
<th onMouseEnter={termtip.bind(null, 'TT_SUMMARY_BOOST_TIME', { cap: 0 })} onMouseLeave={hide} rowSpan={2}>{translate('boost time')}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th className='lft'>{translate('max')}</th>
|
||||
@@ -117,6 +119,7 @@ export default class ShipSummaryTable extends TranslatedComponent {
|
||||
<td>{int(ship.hardness)}</td>
|
||||
<td>{ship.crew}</td>
|
||||
<td>{ship.masslock}</td>
|
||||
<td>{shipBoost !== 'No Boost' ? formats.time(shipBoost) : 'No Boost'}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
"TT_SUMMARY_SPEED": "With full fuel tank and 4 pips to ENG",
|
||||
"TT_SUMMARY_SPEED_NONFUNCTIONAL": "Thrusters powered off or over maximum mass with full fuel and cargo loads",
|
||||
"TT_SUMMARY_BOOST": "With full fuel tank and 4 pips to ENG",
|
||||
"TT_SUMMARY_BOOST_TIME": "Time between each boost with 4 pips to ENG",
|
||||
"TT_SUMMARY_BOOST_NONFUNCTIONAL": "Power distributor not able to supply enough power to boost",
|
||||
"TT_SUMMARY_SHIELDS": "Raw shield strength, including boosters",
|
||||
"TT_SUMMARY_SHIELDS_SCB": "Raw shield strength, including boosters and SCBs",
|
||||
@@ -179,6 +180,7 @@
|
||||
"internal protection": "Internal protection",
|
||||
"external protection": "External protection",
|
||||
"engagement range": "Engagement range",
|
||||
"boost time": "Boost time",
|
||||
"total": "Total",
|
||||
"ammo": "Ammunition maximum",
|
||||
"boot": "Boot time",
|
||||
|
||||
@@ -452,6 +452,19 @@ export function shieldMetrics(ship, sys) {
|
||||
return shield;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate time from one boost to another
|
||||
* @return {number} Boost frequency in seconds
|
||||
* @param ship
|
||||
*/
|
||||
export function calcBoost(ship) {
|
||||
if (!ship.boostEnergy || !ship.standard[4] || !ship.standard[4].m) {
|
||||
return undefined;
|
||||
}
|
||||
return ship.boostEnergy / ship.standard[4].m.engrate;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculate armour metrics
|
||||
* @param {Object} ship The ship
|
||||
|
||||
Reference in New Issue
Block a user