import { nameToKey , TextMapEN } from "../../TextMapUtil" ; import { dumpFile } from "../../Util" ; type CookRecipeExcelConfigData = { "Id" : number ; "NameTextMapHash" : number ; "RankLevel" : number ; "Icon" : string ; "DescTextMapHash" : number ; "EffectDesc" : number [ ] ; "FoodType" : "COOK_FOOD_ATTACK" ; "CookMethod" : "COOK_METHOD_BOIL" ; "MaxProficiency" : number ; "QualityOutputVec" : { "Id" : number ; "Count" : number ; } [ ] ; "InputVec" : { "Id" : number ; "Count" : number ; } [ ] ; "QteParam" : string ; "QteQualityWeightVec" : number [ ] ; } ; const cookRecipeExcelConfigDataSrc = require ( '../../GenshinData/ExcelBinOutput/CookRecipeExcelConfigData.json' ) as CookRecipeExcelConfigData [ ] ; const cookRecipeExcelConfigData = Object . fromEntries ( cookRecipeExcelConfigDataSrc . map ( data => [ data . Id , data ] ) ) as { [ AvatarId ] : CookRecipeExcelConfigData ; } ; dumpFile ( `${ __dirname }/CookRecipeExcelConfigData_idmap_gen.json` , Object . fromEntries ( cookRecipeExcelConfigDataSrc . map ( data => [ data . Id , nameToKey ( TextMapEN [ data . NameTextMapHash ] ) ] ) ) ) ; export default cookRecipeExcelConfigData ;