|
|
|
@@ -28,6 +28,7 @@ const clickPowers = { |
|
|
|
clickVictim: "micro" |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let clickBonus = 0; |
|
|
|
let clickVictim = "micro"; |
|
|
|
|
|
|
|
@@ -38,6 +39,11 @@ let shiftHeld = false; |
|
|
|
|
|
|
|
let mouseTarget = undefined; |
|
|
|
|
|
|
|
let newsShowTimer; |
|
|
|
let newsRemoveTimer; |
|
|
|
|
|
|
|
const newsDelay = 8000; |
|
|
|
|
|
|
|
const state = { |
|
|
|
ownedUpgrades: ownedUpgrades, |
|
|
|
resources: resources, |
|
|
|
@@ -1067,7 +1073,7 @@ function doNews() { |
|
|
|
|
|
|
|
showNews(options[choice](state)); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
newsShowTimer = setTimeout(() => { |
|
|
|
doNews(); |
|
|
|
}, 8000); |
|
|
|
} |
|
|
|
@@ -1078,11 +1084,18 @@ function showNews(text) { |
|
|
|
|
|
|
|
div.classList.add("news-text"); |
|
|
|
|
|
|
|
div.addEventListener("click", () => { |
|
|
|
clearTimeout(newsShowTimer); |
|
|
|
clearTimeout(newsRemoveTimer); |
|
|
|
body.removeChild(div); |
|
|
|
doNews(); |
|
|
|
}); |
|
|
|
|
|
|
|
const body = document.querySelector("body"); |
|
|
|
|
|
|
|
body.appendChild(div); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
newsRemoveTimer = setTimeout(() => { |
|
|
|
body.removeChild(div); |
|
|
|
}, 8000); |
|
|
|
} |
|
|
|
|