Add builders as an expense.

This commit is contained in:
Josh Mudge 2017-10-30 21:38:43 -06:00
parent 79c338ea3c
commit a617164dab
1 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@ function loadsaved() {
var blocks = localStorage.blocks // Put this section in it's own function, pass the variables to the other functions when usevalues() is run. var blocks = localStorage.blocks // Put this section in it's own function, pass the variables to the other functions when usevalues() is run.
var soldiers = localStorage.soldiers var soldiers = localStorage.soldiers
var builders = localStorage.builders
var one = localStorage.one var one = localStorage.one
var hotel = localStorage.hotel var hotel = localStorage.hotel
var gov = localStorage.gov var gov = localStorage.gov
@ -24,6 +25,7 @@ function loadsaved() {
document.getElementById("blocks").value = blocks; document.getElementById("blocks").value = blocks;
document.getElementById("soldiers").value = soldiers; document.getElementById("soldiers").value = soldiers;
document.getElementById("builders").value = builders;
document.getElementById("one").value = one; document.getElementById("one").value = one;
document.getElementById("gov").value = hotel; document.getElementById("gov").value = hotel;
document.getElementById("gov").value = gov; document.getElementById("gov").value = gov;
@ -43,6 +45,7 @@ function loadsaved() {
function usesaved() { function usesaved() {
var blocks = localStorage.blocks var blocks = localStorage.blocks
var soldiers = localStorage.soldiers var soldiers = localStorage.soldiers
var builders = localStorage.builders
var one = localStorage.one var one = localStorage.one
var hotel = localStorage.hotel var hotel = localStorage.hotel
var gov = localStorage.gov var gov = localStorage.gov
@ -67,6 +70,7 @@ function calculate() {
var blocks = document.getElementById("blocks").value; var blocks = document.getElementById("blocks").value;
var soldiers = document.getElementById("soldiers").value; var soldiers = document.getElementById("soldiers").value;
var builders = document.getElementById("builders").value;
var one = document.getElementById("one").value; var one = document.getElementById("one").value;
var hotel = document.getElementById("hotel").value; var hotel = document.getElementById("hotel").value;
var govspecial = document.getElementById("govspecial").value; var govspecial = document.getElementById("govspecial").value;
@ -85,6 +89,7 @@ function calculate() {
localStorage.blocks = document.getElementById("blocks").value; localStorage.blocks = document.getElementById("blocks").value;
localStorage.soldiers = document.getElementById("soldiers").value; localStorage.soldiers = document.getElementById("soldiers").value;
localStorage.builders = document.getElementById("builders").value;
localStorage.one = document.getElementById("one").value; localStorage.one = document.getElementById("one").value;
localStorage.hotel = document.getElementById("hotel").value; localStorage.hotel = document.getElementById("hotel").value;
localStorage.govspecial = document.getElementById("govspecial").value; localStorage.govspecial = document.getElementById("govspecial").value;
@ -114,6 +119,8 @@ function calculate() {
console.log(gold) console.log(gold)
var gold = +gold - (soldiers * 50) // Note to self: Fix possibiliy of giving bonuses to negative incomes. var gold = +gold - (soldiers * 50) // Note to self: Fix possibiliy of giving bonuses to negative incomes.
console.log(gold) console.log(gold)
var gold = +gold - (builders * 50) // Note to self: Fix possibiliy of giving bonuses to negative incomes.
console.log(gold)
var infra = +infra / 1000 * 0.0025 var infra = +infra / 1000 * 0.0025
console.log(infra) console.log(infra)
var one = +one / 1000 * 0.01 var one = +one / 1000 * 0.01