Widget:YieldCalc: Difference between revisions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 29: | Line 29: | ||
let z = Math.floor(a*b+b*5*h+5+(a+5*h)*(e/100)+(h-1)*5+a); /* Food yield for a single farm in the region */ | let z = Math.floor(a*b+b*5*h+5+(a+5*h)*(e/100)+(h-1)*5+a); /* Food yield for a single farm in the region */ | ||
let y = z x c /* Food yield multiplied by the amount of farms in the region */ | let y = z x c; /* Food yield multiplied by the amount of farms in the region */ | ||
document.getElementById("foodYield").innerHTML = z; | document.getElementById("foodYield").innerHTML = z; |
Revision as of 21:29, 24 October 2024
This widget is used to display and calculate the yield with the values submitted by the user.
Usage: {{#Widget:YieldCalc}}