You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// clamping allows between 0 and the height of the window minus the height of the box. also add one from the height of the box because it doesn't work correctly normally, idk why
139
139
//! this uses game but shouldn't with the tooltip refactor
document.getElementById("allTimeCookies").innerText=`All Time ${Handlers.CURRENTLY_CLICKED.getCurrentlyClicked().namePlural}: ${makeSlightlyImperfectFloatNice(this.totalCookies)}`;
670
670
document.getElementById("cookiesPerSecondStat").innerText=`${Handlers.CURRENTLY_CLICKED.getCurrentlyClicked().namePlural} Per Second: ${makeSlightlyImperfectFloatNice(this.cookiesPerSecond)}`;
671
-
document.getElementById("buildingsOwnedStat").innerText=`Buildings Owned: ${commaify(game.buildingsOwned)}`;// todo: should this be in Game? How should statistics actually work at all?
671
+
document.getElementById("buildingsOwnedStat").innerText=`Buildings Owned: ${commaify(Game.getInstance().buildingsOwned)}`;// todo: should this be in Game? How should statistics actually work at all?
document.getElementById("cookiesPerClickStat").innerText=`${Handlers.CURRENTLY_CLICKED.getCurrentlyClicked().namePlural} Per Click: ${this.cookiesPerClick}`;
@@ -518,7 +528,7 @@ function resizeEventListener() {
518
528
resizeEventListener();// since we do need certain elements like the middle text to have the correct size without having to resize the window, we call this now
Copy file name to clipboardExpand all lines: src/ts/upgrades.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
import{Building}from"./buildings.js";
2
2
import{clamp,commaify}from"./helper.js";
3
3
import{hideTooltip}from"./tooltip.js";
4
-
import{game,Game}from"./main.js";
4
+
import{Game}from"./main.js";
5
5
importClickerCookiefrom"./clickercookie.js";
6
6
import{Handlers}from"./handlers.js";
7
7
@@ -165,7 +165,7 @@ export class Upgrade {
165
165
tooltip.style.right="346px";
166
166
// clamping allows between 0 and the height of the window minus the height of the box. also add one from the height of the box because it doesn't work correctly normally, idk why
167
167
//! this uses game but shouldn't with the tooltip refactor
0 commit comments