Skip to content

Commit

Permalink
Yes, the world screams, kiss me son of God
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseudonian committed Mar 9, 2024
1 parent b35ee8f commit ad8ea3a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion scripts/needsBundling.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { existsSync } = require('fs')
const { existsSync } = require('node:fs')

if (existsSync('dist')) {
console.log('Skipping, build output already exists!')
Expand Down
2 changes: 1 addition & 1 deletion scripts/transform.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { readFileSync, writeFileSync } = require('fs')
const { readFileSync, writeFileSync } = require('node:fs')

const SynergismCss = `${__dirname}/../Synergism.css`
// https://stackoverflow.com/a/41407246/15299271
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-last-updated.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { readFileSync, writeFileSync } = require('fs')
const { readFileSync, writeFileSync } = require('node:fs')

const currentDate = new Date()
const UTC =
Expand Down
12 changes: 6 additions & 6 deletions src/Reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,25 +210,25 @@ export const resetdetails = (input: resetNames) => {
export const updateAutoReset = (i: number) => {
let value = null
if (i === 1) {
value = parseFloat((DOMCacheGetOrSet('prestigeamount') as HTMLInputElement).value) || 0
value = Number.parseFloat((DOMCacheGetOrSet('prestigeamount') as HTMLInputElement).value) || 0
player.prestigeamount = Math.max(value, 0)
} else if (i === 2) {
value = parseFloat((DOMCacheGetOrSet('transcendamount') as HTMLInputElement).value) || 0
value = Number.parseFloat((DOMCacheGetOrSet('transcendamount') as HTMLInputElement).value) || 0
player.transcendamount = Math.max(value, 0)
} else if (i === 3) {
value = parseFloat((DOMCacheGetOrSet('reincarnationamount') as HTMLInputElement).value) || 0
value = Number.parseFloat((DOMCacheGetOrSet('reincarnationamount') as HTMLInputElement).value) || 0
player.reincarnationamount = Math.max(value, 0)
} else if (i === 4) {
value = Math.floor(parseFloat((DOMCacheGetOrSet('ascensionAmount') as HTMLInputElement).value)) || 1
value = Math.floor(Number.parseFloat((DOMCacheGetOrSet('ascensionAmount') as HTMLInputElement).value)) || 1
player.autoAscendThreshold = Math.max(value, 1)
} else if (i === 5) {
value = parseFloat((DOMCacheGetOrSet('autoAntSacrificeAmount') as HTMLInputElement).value) || 0
value = Number.parseFloat((DOMCacheGetOrSet('autoAntSacrificeAmount') as HTMLInputElement).value) || 0
player.autoAntSacTimer = Math.max(value, 0)
}
}

export const updateTesseractAutoBuyAmount = () => {
const value = Math.floor(parseFloat((DOMCacheGetOrSet('tesseractAmount') as HTMLInputElement).value)) || 0
const value = Math.floor(Number.parseFloat((DOMCacheGetOrSet('tesseractAmount') as HTMLInputElement).value)) || 0
player.tesseractAutoBuyerAmount = Math.max(value, 0)
}

Expand Down
10 changes: 5 additions & 5 deletions src/Toggles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,15 +705,15 @@ export const toggleCubeSubTab = (indexStr: string) => {
export const updateAutoChallenge = (i: number) => {
switch (i) {
case 1: {
const t = parseFloat((DOMCacheGetOrSet('startAutoChallengeTimerInput') as HTMLInputElement).value) || 0
const t = Number.parseFloat((DOMCacheGetOrSet('startAutoChallengeTimerInput') as HTMLInputElement).value) || 0
player.autoChallengeTimer.start = Math.max(t, 0)
DOMCacheGetOrSet('startTimerValue').innerHTML = i18next.t('challenges.timeStartSweep', {
time: format(player.autoChallengeTimer.start, 2, true)
})
return
}
case 2: {
const u = parseFloat((DOMCacheGetOrSet('exitAutoChallengeTimerInput') as HTMLInputElement).value) || 0
const u = Number.parseFloat((DOMCacheGetOrSet('exitAutoChallengeTimerInput') as HTMLInputElement).value) || 0
player.autoChallengeTimer.exit = Math.max(u, 0)

DOMCacheGetOrSet('exitTimerValue').innerHTML = i18next.t('challenges.timeExitChallenge', {
Expand All @@ -723,7 +723,7 @@ export const updateAutoChallenge = (i: number) => {
return
}
case 3: {
const v = parseFloat((DOMCacheGetOrSet('enterAutoChallengeTimerInput') as HTMLInputElement).value) || 0
const v = Number.parseFloat((DOMCacheGetOrSet('enterAutoChallengeTimerInput') as HTMLInputElement).value) || 0
player.autoChallengeTimer.enter = Math.max(v, 0)

DOMCacheGetOrSet('enterTimerValue').innerHTML = i18next.t('challenges.timeEnterChallenge', {
Expand Down Expand Up @@ -870,15 +870,15 @@ export const toggleautoopensCubes = (i: number) => {
export const updateRuneBlessingBuyAmount = (i: number) => {
switch (i) {
case 1: {
const t = Math.floor(parseFloat((DOMCacheGetOrSet('buyRuneBlessingInput') as HTMLInputElement).value)) || 1
const t = Math.floor(Number.parseFloat((DOMCacheGetOrSet('buyRuneBlessingInput') as HTMLInputElement).value)) || 1
player.runeBlessingBuyAmount = Math.max(t, 1)
DOMCacheGetOrSet('buyRuneBlessingToggle').innerHTML = i18next.t('runes.blessings.buyUpTo', {
amount: format(player.runeBlessingBuyAmount)
})
return
}
case 2: {
const u = Math.floor(parseFloat((DOMCacheGetOrSet('buyRuneSpiritInput') as HTMLInputElement).value)) || 1
const u = Math.floor(Number.parseFloat((DOMCacheGetOrSet('buyRuneSpiritInput') as HTMLInputElement).value)) || 1
player.runeSpiritBuyAmount = Math.max(u, 1)
DOMCacheGetOrSet('buyRuneSpiritToggleValue').innerHTML = i18next.t('runes.spirits.buyUpTo', {
amount: format(player.runeSpiritBuyAmount)
Expand Down
4 changes: 2 additions & 2 deletions src/singularity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ export const getLastUpgradeInfo = (
const handlePerks = (singularityCount: number) => {
const availablePerks: ISingularityPerkDisplayInfo[] = []
let singularityCountForNextPerk: number | null = null
let singularityCountForNextPerkUpgrade = Infinity
let singularityCountForNextPerkUpgrade = Number.POSITIVE_INFINITY
for (const perk of singularityPerks) {
const upgradeInfo = getLastUpgradeInfo(perk, singularityCount)
if (upgradeInfo.level > 0) {
Expand Down Expand Up @@ -2343,7 +2343,7 @@ const handlePerks = (singularityCount: number) => {
nextUnlockedId.style.display = 'none'
}
const countNext = DOMCacheGetOrSet('singualrityImproveNext')
if (singularityCountForNextPerkUpgrade < Infinity) {
if (singularityCountForNextPerkUpgrade < Number.POSITIVE_INFINITY) {
countNext.style.display = ''
countNext.innerHTML = i18next.t('singularity.perks.improvedIn', {
sing: singularityCountForNextPerkUpgrade
Expand Down
16 changes: 8 additions & 8 deletions src/types/Synergism.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type Decimal from 'break_infinity.js'
import { BlueberryUpgrade } from '../BlueberryUpgrades'
import type { BlueberryUpgrade } from '../BlueberryUpgrades'
import type { WowCubes, WowHypercubes, WowPlatonicCubes, WowTesseracts } from '../CubeExperimental'
import { HepteractCraft } from '../Hepteracts'
import { Category, ResetHistoryEntryUnion } from '../History'
import { OcteractUpgrade } from '../Octeracts'
import { IPlatBaseCost } from '../Platonic'
import type { HepteractCraft } from '../Hepteracts'
import type { Category, ResetHistoryEntryUnion } from '../History'
import type { OcteractUpgrade } from '../Octeracts'
import type { IPlatBaseCost } from '../Platonic'
import type { QuarkHandler } from '../Quark'
import { SingularityUpgrade } from '../singularity'
import { SingularityChallenge, singularityChallengeData } from '../SingularityChallenges'
import {
import type { SingularityUpgrade } from '../singularity'
import type { SingularityChallenge, singularityChallengeData } from '../SingularityChallenges'
import type {
AmbrosiaGenerationCache,
AmbrosiaLuckAdditiveMultCache,
AmbrosiaLuckCache,
Expand Down

0 comments on commit ad8ea3a

Please sign in to comment.