Widget:YieldCalc: Difference between revisions
No edit summary Tag: Manual revert |
No edit summary |
||
Line 45: | Line 45: | ||
let H = C + G; // Add G to the actual amount of farms in the region | let H = C + G; // Add G to the actual amount of farms in the region | ||
let Z = Number(Math.floor(A*B+B*5* | let Z = Number(Math.floor(A*B+B*5*H+5+(A+5*H)*(E/100)+(H-1)*5+A)); // Resulting production of a single farm | ||
let Y = Z / 25; // Resulting food yield of that production of a single farm | let Y = Z / 25; // Resulting food yield of that production of a single farm | ||
let O = Z * C / 25; // Resulting food yield of that production of the entire region | let O = Z * C / 25; // Resulting food yield of that production of the entire region | ||
document.getElementById('outputvalue').innerText= | document.getElementById('outputvalue').innerText= Y; | ||
document.getElementById('outputvalueall').innerText= O; | document.getElementById('outputvalueall').innerText= O; | ||
} | } |
Revision as of 02:19, 25 October 2024
This widget is used to display and calculate the yield with the values submitted by the user.
Usage: {{#Widget:YieldCalc}}