Migrate ed-forge API change

This commit is contained in:
Felix Linker
2021-12-28 00:38:34 +01:00
parent 2438aa1f48
commit d406018f0b
2 changed files with 3 additions and 3 deletions

View File

@@ -166,7 +166,7 @@ export default class Slot extends TranslatedComponent {
*/
_getMaxClassLabel() {
const { m } = this.props;
let size = m.getSize();
let size = m.getSizeNum();
switch (true) {
case m.getSlot() === 'armour':
return '';

View File

@@ -52,13 +52,13 @@ function shipSummary(shipId) {
// Count Hardpoints by class
ship.getHardpoints(undefined, true).forEach(hardpoint => {
summary.hp[hardpoint.getSize()]++;
summary.hp[hardpoint.getSizeNum()]++;
summary.hpCount++;
});
// Count Internal Compartments by class
let maxCargo = 0, maxPassengers = 0;
ship.getInternals(undefined, true).forEach(internal => {
const size = String(internal.getSize());
const size = String(internal.getSizeNum());
summary.int[size]++;
summary.intCount++;