Fix journal import

This commit is contained in:
felixlinker
2018-10-01 22:24:18 +01:00
parent e0766f4424
commit 90f03de3fe

View File

@@ -180,14 +180,15 @@ export function shipFromLoadoutJSON(json) {
hardpointArrayNum++; hardpointArrayNum++;
} }
} }
if (module.Slot.toLowerCase().search(/slot\d/) !== -1) { }
let internalSlotNum = 0; let internalSlotNum = 0;
let militarySlotNum = 1; let militarySlotNum = 1;
for (let i in shipTemplate.slots.internal) { for (let i in shipTemplate.slots.internal) {
if (!shipTemplate.slots.internal.hasOwnProperty(i)) { if (!shipTemplate.slots.internal.hasOwnProperty(i)) {
continue; continue;
} }
const isMilitary = isNaN(shipTemplate.slots.internal[i]) ? shipTemplate.slots.internal[i].name == 'military' : false; const isMilitary = isNaN(shipTemplate.slots.internal[i]) ? shipTemplate.slots.internal[i].name == 'Military' : false;
// The internal slot might be a standard or a military slot. Military slots have a different naming system // The internal slot might be a standard or a military slot. Military slots have a different naming system
let internalSlot = null; let internalSlot = null;
@@ -220,8 +221,6 @@ export function shipFromLoadoutJSON(json) {
modsToAdd.push({ coriolisMod: internal, json: internalSlot }); modsToAdd.push({ coriolisMod: internal, json: internalSlot });
} }
} }
}
}
for (const i of modsToAdd) { for (const i of modsToAdd) {
if (i.json.Engineering) { if (i.json.Engineering) {