diff --git a/js/game.js b/js/game.js
index 618b7ee..035b4a8 100644
--- a/js/game.js
+++ b/js/game.js
@@ -407,8 +407,9 @@ var interval = setInterval(function() {
if (needCanvasUpdate){ resizeCanvas();
needCanvasUpdate = false;
}
- tmp.scrolled = document.getElementById('treeTab').scrollTop > 30
+ tmp.scrolled = document.getElementById('treeTab') && document.getElementById('treeTab').scrollTop > 30
updateTemp();
+ updateOther(diff);
gameLoop(diff)
fixNaNs()
adjustPopupTime(0.05)
diff --git a/js/technical/systemComponents.js b/js/technical/systemComponents.js
index 9331fdd..86f4166 100644
--- a/js/technical/systemComponents.js
+++ b/js/technical/systemComponents.js
@@ -106,7 +106,7 @@ var systemComponents = {
{{format(player.points)}}
{{modInfo.pointsName}}
-
({{format(getPointGen())}}/sec)
+
({{tmp.other.oompsMag != 0 ? format(tmp.other.oomps) + " OOM" + (tmp.other.oompsMag < 0 ? "^OOM" : tmp.other.oompsMag > 1 ? "^" + tmp.other.oompsMag : "") + "s" : format(getPointGen())}}/sec)
`
diff --git a/js/technical/temp.js b/js/technical/temp.js
index b94a7aa..6253290 100644
--- a/js/technical/temp.js
+++ b/js/technical/temp.js
@@ -38,6 +38,13 @@ function setupTemp() {
setupBarStyles(layer)
setupBuyables(layer)
}
+
+ tmp.other = {
+ screenWidth: window.innerWidth,
+ lastPoints: player.points || new Decimal(0),
+ oomps: new Decimal(0),
+ }
+
temp = tmp
}
@@ -94,7 +101,6 @@ function updateTemp() {
if (isFunction(text)) text = text()
tmp.displayThings.push(text)
}
-
}
function updateTempData(layerData, tmpData, funcsData) {
@@ -206,4 +212,40 @@ function setupBuyables(layer) {
}
}
}
+}
+
+function updateOther(diff) {
+ tmp.other.oompsMag = 0
+ if (player.points.lte(new Decimal(1e100))) return
+
+ var pp = new Decimal(player.points);
+ var lp = tmp.other.lastPoints || new Decimal(0);
+ if (pp.gt(lp)) {
+ if (pp.gte("10^^8")) {
+ pp = pp.slog(1e10)
+ lp = lp.slog(1e10)
+ tmp.other.oomps = pp.sub(lp).div(diff)
+ tmp.other.oompsMag = -1;
+ } else {
+ while (pp.div(lp).log(10).div(diff).gte("100") && tmp.other.oompsMag <= 5 && lp.gt(0)) {
+ pp = pp.log(10)
+ lp = lp.log(10)
+ tmp.other.oomps = pp.sub(lp).div(diff)
+ tmp.other.oompsMag++;
+ }
+ }
+ }
+
+ var screenWidth = window.innerWidth
+ var splitScreen = screenWidth >= 1024
+ if (player.splitMode === "disabled") splitScreen = false
+ if (player.splitMode === "enabled") splitScreen = true
+
+ tmp.other = {
+ screenWidth: screenWidth,
+ splitScreen: splitScreen,
+ lastPoints: player.points,
+ oomps: tmp.other.oomps,
+ oompsMag: tmp.other.oompsMag,
+ }
}
\ No newline at end of file
diff --git a/js/utils.js b/js/utils.js
index ffdd470..ae5db2f 100644
--- a/js/utils.js
+++ b/js/utils.js
@@ -283,6 +283,7 @@ function layerunlocked(layer) {
function keepGoing() {
player.keepGoing = true;
needCanvasUpdate = true;
+ goBack()
}
function toNumber(x) {
@@ -348,7 +349,6 @@ document.onkeydown = function (e) {
if (ctrlDown && hotkeys[key]) e.preventDefault()
if (hotkeys[key]) {
let k = hotkeys[key]
- console.log(tmp[k.layer].hotkeys)
if (player[k.layer].unlocked && tmp[k.layer].hotkeys[k.id].unlocked)
k.onPress()
}
diff --git a/js/utils/save.js b/js/utils/save.js
index e5095db..f8004cc 100644
--- a/js/utils/save.js
+++ b/js/utils/save.js
@@ -21,7 +21,7 @@ function startPlayerBase() {
showStory: true,
points: modInfo.initialStartPoints,
subtabs: {},
- lastSafeTab: (layoutInfo.showTree ? "none" : layoutInfo.startTab)
+ lastSafeTab: (readData(layoutInfo.showTree) ? "none" : layoutInfo.startTab)
};
}
function getStartPlayer() {