diff --git a/src/app/pages/ShipyardPage.jsx b/src/app/pages/ShipyardPage.jsx index 74404f45..1e74466f 100644 --- a/src/app/pages/ShipyardPage.jsx +++ b/src/app/pages/ShipyardPage.jsx @@ -25,6 +25,25 @@ function countInt(slot) { this.int[slot.maxClass - 1]++; // Subtract 1 since there is no Class 0 Internal compartment this.intCount++; this.maxCargo += crEligible ? ModuleUtils.findInternal('cr', slot.maxClass, 'E').cargo : 0; + + // if no eligiblity, then assume pce + let passSlotType = null; + let passSlotRating = null; + if (!slot.eligible || slot.eligible.pce) { + passSlotType = 'pce'; + passSlotRating = 'E'; + } else if (slot.eligible.pci) { + passSlotType = 'pci'; + passSlotRating = 'D'; + } else if (slot.eligible.pcm) { + passSlotType = 'pcm'; + passSlotRating = 'C'; + } else if (slot.eligible.pcq) { + passSlotType = 'pcq'; + passSlotRating = 'B'; + } + let passengerBay = passSlotType ? ModuleUtils.findInternal(passSlotType, slot.maxClass, passSlotRating) : null; + this.maxPassengers += passengerBay ? passengerBay.passengers : 0; } /** @@ -39,6 +58,7 @@ function shipSummary(shipId, shipData) { hpCount: 0, intCount: 0, maxCargo: 0, + maxPassengers: 0, hp: [0, 0, 0, 0, 0], // Utility, Small, Medium, Large, Huge int: [0, 0, 0, 0, 0, 0, 0, 0], // Sizes 1 - 8 standard: shipData.slots.standard, @@ -167,6 +187,7 @@ export default class ShipyardPage extends Page { {fInt(s.topBoost)} {fRound(s.maxJumpRange)} {fInt(s.maxCargo)} + {fInt(s.maxPassengers)} {s.standard[0]} {s.standard[1]} {s.standard[2]} @@ -307,7 +328,7 @@ export default class ShipyardPage extends Page { {translate('hrd')}   {translate('base')} - {translate('max')} + {translate('max')} @@ -324,6 +345,7 @@ export default class ShipyardPage extends Page { {translate('boost')} {translate('jump')} {translate('cargo')} + {translate('passengers')} {translate('core module classes')} {translate('hardpoints')} @@ -340,6 +362,7 @@ export default class ShipyardPage extends Page { {units['m/s']} {units.LY} {units.T} +   {'pp'} {'th'} {'fsd'}