From 174397c41caea437cb66a994544d75533b9d1de4 Mon Sep 17 00:00:00 2001 From: fourinone41 Date: Mon, 9 Oct 2023 05:24:15 -0400 Subject: [PATCH] fix import equip id --- js/kcEQDATA.js | 1 + js/simulator-ui/convert.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/js/kcEQDATA.js b/js/kcEQDATA.js index c430efc9..269befa6 100644 --- a/js/kcEQDATA.js +++ b/js/kcEQDATA.js @@ -5639,6 +5639,7 @@ var EQDATA = { nameJP: 'Mosquito TR Mk.33', added: '2022-09-11', type: TORPBOMBER, + aaResistShip: .6, TP: 8, AA: 5, ACC: 1, diff --git a/js/simulator-ui/convert.js b/js/simulator-ui/convert.js index 7a5bbe13..6ab2a360 100644 --- a/js/simulator-ui/convert.js +++ b/js/simulator-ui/convert.js @@ -129,6 +129,7 @@ window.CONVERT = { kc3ToSaveFleet: function(fleetNum) { if (!this._dataKC3) return; let fleetSave = { + version: this._SAVE_VERSION_CURRENT, type: 0, }; if (+fleetNum == 10) { @@ -214,7 +215,7 @@ window.CONVERT = { }; for (let id of eSlot[i]) { if (id <= 0) continue; - id = this._convertEquipId20221109(id); + if (COMMON.isShipIdAbyssal(ship_ke[i])) id = this._convertEquipId20221109(id); shipSave.equips.push({ mstId: id, rank: 0 }); } if (e_maxhps[i] == 'N/A') shipSave.isFaraway = true; @@ -231,6 +232,7 @@ window.CONVERT = { let f_maxhps = bdataFirst.api_f_maxhps; if (bdataFirst.api_maxhps) f_maxhps = bdataFirst.api_maxhps.slice(0 + +(bdataFirst.api_maxhps[0] == -1), 6 + +(bdataFirst.api_maxhps[0] == -1)); dataSave.fleetFMain = { + version: this._SAVE_VERSION_CURRENT, type: dataReplay.combined, ships: this.replayToSaveShipsF(dataReplay['fleet'+dataReplay.fleetnum],f_maxhps,bdataFirst.api_fParam), }; @@ -242,11 +244,11 @@ window.CONVERT = { } if (dataReplay.support1) { - dataSave.fleetFSupportN = { type: 0, ships: this.replayToSaveShipsF(dataReplay['fleet'+dataReplay.support1],null,null,true) }; + dataSave.fleetFSupportN = { version: this._SAVE_VERSION_CURRENT, type: 0, ships: this.replayToSaveShipsF(dataReplay['fleet'+dataReplay.support1],null,null,true) }; dataSave.useSupportN = true; } if (dataReplay.support2) { - dataSave.fleetFSupportB = { type: 0, ships: this.replayToSaveShipsF(dataReplay['fleet'+dataReplay.support2],null,null,true) }; + dataSave.fleetFSupportB = { version: this._SAVE_VERSION_CURRENT, type: 0, ships: this.replayToSaveShipsF(dataReplay['fleet'+dataReplay.support2],null,null,true) }; dataSave.useSupportB = true; } @@ -278,6 +280,7 @@ window.CONVERT = { for (let i=0; i= 7 ? CONST.SF : 0), ships: this.replayToSaveShipsE(info.api_ship_id,info.api_ship_lv,info.api_maxhps,info.api_Param,api_Slot), }; @@ -446,7 +449,7 @@ window.CONVERT = { if (!fleetNum) fleetNum = dataDb.f2 && Object.keys(dataDb.f2).length ? 11 : 1; let type = fleetNum > 10 ? fleetNum - 10 : 0; let fleetKey = fleetNum > 10 ? 'f1' : 'f'+fleetNum; - let fleetSave = { type: type }; + let fleetSave = { version: this._SAVE_VERSION_CURRENT, type: type }; fleetSave.ships = this.deckbuilderToSaveShips(dataDb[fleetKey]); if (fleetSave.ships.length >= 7) { fleetSave.type = CONST.SF; @@ -608,6 +611,7 @@ window.CONVERT = { let compsSave = []; for (let compNav of compsNav.entries) { let fleetSave = { + version: this._SAVE_VERSION_CURRENT, formation: +compNav.formation, type: 0, ships: this.kcnavToSaveShips(compNav.mainFleet || compNav.fleet),