Widget:Stew

var cookingStats = null; RLQ.push(function {  if (cookingCalcDiv = document.getElementById('cookingCalc')) {    // [0]: health, [1]: stamina, [2]:food, [3]: water    cookingStats = {        'Raw Meat/Fish': [0.55, 0.05, 0.75, 0.05, 0.01],        'Raw Prime Meat/Fish/Mutton': [1.2, 0.05, 1, 0.05, 0.01],        'Cooked/Jerky Meat/Fish': [0.55, 0.05, 1, 0.05, 0.01],        'Cooked/Jerky Prime Meat/Fish/Lamb Chop': [1.65, 0.05, 1.45, 0.05, 0.01],        'Amar/Azul/Tintoberry': [0.05, 0.05, 0.1875, 0.125, 0.01],        'Mejoberry': [0.05, 0.05, 0.2625, 0.175, 0.01],        'Narcoberry': [0.05, -0.5, 0.5, 0.05, 0.01],        'Stimberry': [0.05, 0.625, 0.1875, -1.25, 0.01],        'Seed': [0.05, 0.05, 0.05, 0.05, 0.01],        'Advanced Crops': [0.275, 0.05, 0.3, 2.5, 0.01],        'Rare Mushroom': [0.05, 5, 0.05, 0.05, 0.01],        'Rare Flower': [0.05, 0.05, 0.05, 0.05, 1],        'Egg': [4, 4, 4, 0.05, 0.3],        'Kibble': [0.05, 15, 11.25, -5, 0.05], 'Spoiled Meat': [-2.5, -1.5, 0.3125, 0.05, 0.01], 'Human Feces': [-0.625, -0.625, 0.5, -0.625, 0.01], 'Small Feces': [-0.25, -0.25, 0, -0.25, 0.01], 'Medium Feces': [-0.5, -0.5, 0.5, -0.5, 0.03], 'Large/Massive Feces': [-0.75, -0.75, 0.5, -0.75, 0.03], 'Cactus Sap': [0.05, 0.05, 0.1875, 0.125, 0.01], 'Soap': [-0.25, -0.25, 0.5, -0.25, 0.01], 'Organic Polymer': [-2.5, -2.5, 0.5, -2.5, 0.01], 'Giant Bee Honey': [1.6875, 1.0625, 2.25, 1.0625, 0.02] };   var tableRows = ''; var dropDownOptions = ''; for (var ing in cookingStats) { dropDownOptions += ' ' + ing + ' '; }   for (var i = 0; i < 8; i++) { tableRows += ' ' + dropDownOptions + '    '; }   cookingCalcDiv.innerHTML = ' ' + ' ';   for (var i = 0; i < 8; i++) { document.getElementById('cookingCalcIng' + i).selectedIndex = i;   } } });

function cookingCalcChangeKind(food) { document.getElementById('cookingR2').style.textDecoration = (food ? "" : "line-through"); document.getElementById('cookingR3').style.textDecoration = (food ? "line-through" : ""); }

function calcCooking { if (cookingStats) { var results = [1, 1, 1, 1, .1]; var ing = 0; var ingNr = 0; var ingEl = null; var ingNrEl = null; var csEl = document.getElementById('cookingCalcCraftingSpeed'); if (csEl != null) { var cs = csEl.value / 100.0; for (var i = 0; i < 8; i++) { ingEl = document.getElementById('cookingCalcIng' + i); ingNrEl = document.getElementById('cookingCalcIngNr' + i); if (ingEl != null && ingNrEl != null) { ing = ingEl.value; ingNr = ingNrEl.value; if (cookingStats[ing] != null) { for (var j = 0; j < 4; j++) { results[j] += ingNr * cookingStats[ing][j] * (cs * 1.5625 - 0.3125); }                       results[4] += ingNr * cookingStats[ing][4]; }               }            }        }        for (var j = 0; j < 5; j++) { var rEl = document.getElementById('cookingR' + j); if (rEl != null) { rEl.innerHTML = results[j].toFixed(2); }       }    } }