|
|
|
@@ -569,6 +569,8 @@ function clickPopup(text, type, location) { |
|
|
|
direction = -150; |
|
|
|
} else if (type == "upgrade") { |
|
|
|
direction = -50; |
|
|
|
} else if (type == "info") { |
|
|
|
direction = 50; |
|
|
|
} |
|
|
|
|
|
|
|
direction *= Math.random() * 0.5 + 1; |
|
|
|
@@ -684,7 +686,7 @@ window.onload = function() { |
|
|
|
setTimeout(updateDisplay, 1000/updateRate); |
|
|
|
} |
|
|
|
|
|
|
|
function save() { |
|
|
|
function save(e) { |
|
|
|
let storage = window.localStorage; |
|
|
|
|
|
|
|
storage.setItem("save-version", "0.0.1"); |
|
|
|
@@ -694,6 +696,8 @@ function save() { |
|
|
|
storage.setItem("resources", JSON.stringify(resources)); |
|
|
|
|
|
|
|
storage.setItem("belongings", JSON.stringify(belongings)); |
|
|
|
|
|
|
|
clickPopup("Saved!", "upgrade", [e.clientX, e.clientY]); |
|
|
|
} |
|
|
|
|
|
|
|
function load() { |
|
|
|
|