Widget:YieldCalc: Difference between revisions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 7: | Line 7: | ||
<form id="foodYieldForm"> | <form id="foodYieldForm"> | ||
<input type="number" id="cityProd"> cityProd<br /> | <input type="number" size="5 id="cityProd"> cityProd<br /> | ||
<input type="number" id="regiYield"> regiYield<br /> | <input type="number" size="5" id="regiYield"> regiYield<br /> | ||
<input type="number" id="farmCount"> farmCount<br /> | <input type="number" size="5" id="farmCount"> farmCount<br /> | ||
<input type="number" id="percBonus"> percBonus<br /> | <input type="number" size="5" id="percBonus"> percBonus<br /> | ||
<input type="submit" value="Calculate" onClick="yieldScript()"> | <input type="submit" value="Calculate" onClick="yieldScript()"> | ||
</form> | </form> | ||
Line 28: | Line 28: | ||
let E = Number(document.getElementById('percBonus').value); /* Total Percentage Bonus (e.g. 50% from a Plow) */ | let E = Number(document.getElementById('percBonus').value); /* Total Percentage Bonus (e.g. 50% from a Plow) */ | ||
let F = | let F = Number(document.getElementById('verse').value); /* Extra farm adjacency from religious verse (Boolean) */ | ||
let H = C + F; /* Add | let H = C + F; /* Add F to the actual amount of farms in the region */ | ||
document.getElementById('outputvalue').innerText= ( | document.getElementById('outputvalue').innerText= ( |
Revision as of 00:55, 25 October 2024
This widget is used to display and calculate the yield with the values submitted by the user.
Usage: {{#Widget:YieldCalc}}