$(function(){
tabFlagMap["recipe"] = false;
tabFuncMap.recipe = function(){
var index = 1;
$.each(makerecipedata,function(key,map){
var tr = $("
");
$("#recipeTable tbody").append(tr);
var recipeName = $(""+map.NAME+" | ");
var productSplit = map["产出"].split(":");
var result = $(" | ");
//是否有隐藏产物的配方来源
if(hideProduct[map.ID]){
result.append("隐藏产物");
}else{
result.append(findMapTips(productSplit[0]).append("×"+productSplit[1]));
}
if($(findMapTips(productSplit[0])).html() == ""){
//console.log(productSplit);
}
var material = $(" | ");
tr.append($(""+map.INDEX+" | "));
tr.append(""+index+" | ");
tr.append(recipeName);
tr.append(result);
recipeName.append(""+map["PY"]+"");
tr.append(material);
if(downloadFile[curVersionIndex].hideItemMakeRecipe && map.IGNORE){
material.append("请从游戏中获取配方详细");
return;
}
var materialMap = {};
//整理材料,将相同材料堆叠
for(var i=1;i<=9;i++){
if(map["原料"+i] != "NA"){
var materialSplit = map["原料"+i].split(":");
var materialId = materialSplit[0];
var needNum = materialSplit[1];
materialMap[materialId] = Number(materialMap[materialId]?materialMap[materialId]:0) + Number(needNum);
}
}
for(var key in materialMap){
var materialDiv = $("");
material.append(materialDiv);
var materialId = key;
var needNum = materialMap[key];
if(map.ID >peifangLimitID){
if(needNum){
if(needNum>10){
var needStr = "";
for(var j=1;j配方名称首字母):",
"paginate": {
"first": "首页(W)",
"last": "末页(S)",
"next": "下一页(D)",
"previous": "上一页(A)"
},
},
// 默认按照索引排序,且隐藏索引列
"order": [[ 0, "asc" ]],
"columnDefs": [
{
"targets": [ 0 ],
"visible": false,
"searchable": false
},
]
});
$('#recipeTable th').css("text-align","center");
}
});