import { DArtifactSlotKey } from "../.." ; import { nameToKey , TextMapEN } from "../../TextMapUtil" ; import { dumpFile } from "../../Util" ; type ReliquaryExcelConfigData = { "EquipType" : DArtifactSlotKey ; "ShowPic" : string ; "RankLevel" : number ; "MainPropDepotId" : number ; "AppendPropDepotId" : number ; "SetId" : number ; "AddPropLevels" : number [ ] ; "BaseConvExp" : number ; "MaxLevel" : number ; "StoryId" : number ; "DestroyRule" : "DESTROY_RETURN_MATERIAL" ; "DestroyReturnMaterial" : number [ ] ; "DestroyReturnMaterialCount" : number [ ] ; "Id" : number ; "NameTextMapHash" : number ; "DescTextMapHash" : number ; "Icon" : string ; "ItemType" : string ; "Weight" : number ; "Rank" : number ; "GadgetId" : number ; } ; const artifactPiecesDataSrc = require ( '../../GenshinData/ExcelBinOutput/ReliquaryExcelConfigData.json' ) as ReliquaryExcelConfigData [ ] ; const artifactPiecesData = Object . fromEntries ( artifactPiecesDataSrc . map ( data => [ data . Id , data ] ) ) as Record < number , ReliquaryExcelConfigData > ; dumpFile ( `${ __dirname }/ReliquaryExcelConfigData_idmap_gen.json` , Object . fromEntries ( artifactPiecesDataSrc . map ( data => [ data . Id , [ data . SetId , nameToKey ( TextMapEN [ data . NameTextMapHash ] ) ] ] ) ) ) ; export default artifactPiecesData ;