2
.vscode/settings.json
vendored
Normal file
2
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js
vendored
2
dist/CookieMonster.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js.map
vendored
2
dist/CookieMonster.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -27,11 +27,8 @@ export function Beautify(num, floats, forced) {
|
||||
if (num === 0) {
|
||||
return num.toString();
|
||||
} if (num > 0.001 && num < CMOptions.ScaleCutoff) {
|
||||
answer = num.toFixed(2);
|
||||
if (CMOptions.ScaleSeparator) answer = answer.toLocaleString('nl');
|
||||
for (let i = 0; i < 3; i++) {
|
||||
if (answer[answer.length - 1] === '0' || answer[answer.length - 1] === '.') answer = answer.slice(0, -1);
|
||||
}
|
||||
if (CMOptions.ScaleSeparator) answer = num.toLocaleString('nl');
|
||||
else answer = num.toLocaleString('en');
|
||||
return answer;
|
||||
} if (CMOptions.Scale === 4 && !forced || forced === 4) { // Scientific notation, 123456789 => 1.235E+8
|
||||
answer = num.toExponential(decimals).toString().replace('e', 'E');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CMOptions } from '../Config/VariablesAndData';
|
||||
import { Beautify } from './BeautifyAndFormatting/BeautifyFormatting';
|
||||
import UpdateBuildings from './BuildingsUpgrades/Buildings';
|
||||
import UpdateUpgrades from './BuildingsUpgrades/Upgrades';
|
||||
import { UpdateBotBar } from './InfoBars/BottomBar';
|
||||
@@ -42,4 +43,7 @@ export default function Draw() {
|
||||
|
||||
// Change menu refresh interval
|
||||
RefreshMenu();
|
||||
|
||||
// Replace Cookies counter because Orteil uses very weird code to "pad" it...
|
||||
l('cookies').innerHTML = l('cookies').innerHTML.replace(/.*(?=<br>)/i, Beautify(Game.cookies));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user