Widget:YieldCalc: Difference between revisions
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
<input type="number" id="regionYield"><br /> | <input type="number" id="regionYield"><br /> | ||
<input type="number" id="farmCount"><br /> | <input type="number" id="farmCount"><br /> | ||
<input type="number" id="percBonus"><br /><br /> | <input type="number" id="percBonus"><br /> | ||
<input type="checkbox" id="verseBonus"><br /> | |||
<input type="submit" value="Calculate" onClick="yieldScript()"> | <input type="submit" value="Calculate" onClick="yieldScript()"> | ||
</form> | </form> | ||
Line 35: | Line 36: | ||
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('verseBonus').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 01:22, 25 October 2024
This widget is used to display and calculate the yield with the values submitted by the user.
Usage: {{#Widget:YieldCalc}}