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) {
|
if (num === 0) {
|
||||||
return num.toString();
|
return num.toString();
|
||||||
} if (num > 0.001 && num < CMOptions.ScaleCutoff) {
|
} if (num > 0.001 && num < CMOptions.ScaleCutoff) {
|
||||||
answer = num.toFixed(2);
|
if (CMOptions.ScaleSeparator) answer = num.toLocaleString('nl');
|
||||||
if (CMOptions.ScaleSeparator) answer = answer.toLocaleString('nl');
|
else answer = num.toLocaleString('en');
|
||||||
for (let i = 0; i < 3; i++) {
|
|
||||||
if (answer[answer.length - 1] === '0' || answer[answer.length - 1] === '.') answer = answer.slice(0, -1);
|
|
||||||
}
|
|
||||||
return answer;
|
return answer;
|
||||||
} if (CMOptions.Scale === 4 && !forced || forced === 4) { // Scientific notation, 123456789 => 1.235E+8
|
} if (CMOptions.Scale === 4 && !forced || forced === 4) { // Scientific notation, 123456789 => 1.235E+8
|
||||||
answer = num.toExponential(decimals).toString().replace('e', 'E');
|
answer = num.toExponential(decimals).toString().replace('e', 'E');
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { CMOptions } from '../Config/VariablesAndData';
|
import { CMOptions } from '../Config/VariablesAndData';
|
||||||
|
import { Beautify } from './BeautifyAndFormatting/BeautifyFormatting';
|
||||||
import UpdateBuildings from './BuildingsUpgrades/Buildings';
|
import UpdateBuildings from './BuildingsUpgrades/Buildings';
|
||||||
import UpdateUpgrades from './BuildingsUpgrades/Upgrades';
|
import UpdateUpgrades from './BuildingsUpgrades/Upgrades';
|
||||||
import { UpdateBotBar } from './InfoBars/BottomBar';
|
import { UpdateBotBar } from './InfoBars/BottomBar';
|
||||||
@@ -42,4 +43,7 @@ export default function Draw() {
|
|||||||
|
|
||||||
// Change menu refresh interval
|
// Change menu refresh interval
|
||||||
RefreshMenu();
|
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