From feb79f8f6727c6097830aefc197a841c2942d165 Mon Sep 17 00:00:00 2001 From: IvarK Date: Tue, 22 Feb 2022 21:49:18 +0200 Subject: [PATCH 0001/1119] implement some payment shit --- javascripts/components/shop/shop-tab.js | 8 +------ javascripts/core/kong.js | 28 +++++++++++++++++++------ javascripts/core/secret-formula/tabs.js | 2 +- src/components/modals/StdStoreModal.vue | 12 +++++------ src/components/modals/StdStoreRow.vue | 2 +- 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/javascripts/components/shop/shop-tab.js b/javascripts/components/shop/shop-tab.js index 7742a4fcc..6a3d072f1 100644 --- a/javascripts/components/shop/shop-tab.js +++ b/javascripts/components/shop/shop-tab.js @@ -4,24 +4,18 @@ Vue.component("shop-tab", { data() { return { STD: 0, - kongEnabled: false, }; }, computed: { purchases() { return ShopPurchase.all; }, - buySTDText() { - return this.kongEnabled ? "Buy More" : "Play in Kongregate to buy STDs"; - } }, methods: { update() { this.STD = player.IAP.totalSTD - player.IAP.spentSTD; - this.kongEnabled = kong.enabled; }, showStore() { - if (!this.kongEnabled) return; Modal.shop.show(); }, buyTimeSkip() { @@ -40,7 +34,7 @@ Vue.component("shop-tab", {
You have {{ STD }} - +
diff --git a/javascripts/core/kong.js b/javascripts/core/kong.js index 2aee48ba0..eb30414cd 100644 --- a/javascripts/core/kong.js +++ b/javascripts/core/kong.js @@ -92,15 +92,31 @@ kong.purchaseLongerTimeSkip = function(cost) { simulateTime(3600 * 24); }; -kong.buyMoreSTD = function(STD, kreds) { - if (!kong.enabled) return; - kongregate.mtx.purchaseItems([`${kreds}worthofstd`], result => { - if (result.success) { - player.IAP.totalSTD += STD; - } +kong.buyMoreSTD = async STD => { + const res = await fetch("http://localhost:3000/purchase", { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ amount: STD }) }); + const data = await res.json(); + const windowReference = window.open( + data.url, + "antimatterDimensionsPurchase", + "popup" + ); + + const polling = setInterval(() => { + console.log(windowReference.location); + if (windowReference.closed) { + clearInterval(polling); + } + }, 1000); + }; + kong.updatePurchases = function() { if (!kong.enabled) return; try { diff --git a/javascripts/core/secret-formula/tabs.js b/javascripts/core/secret-formula/tabs.js index 7e3ce3a74..60b55e49b 100644 --- a/javascripts/core/secret-formula/tabs.js +++ b/javascripts/core/secret-formula/tabs.js @@ -477,7 +477,7 @@ GameDatabase.tabs = [ name: "Shop", newUIClass: "shop", hideAt: 2.4, - condition: () => kong.enabled || player.IAP.totalSTD > 0, + condition: () => true || player.IAP.totalSTD > 0, id: 10, hidable: true, subtabs: [ diff --git a/src/components/modals/StdStoreModal.vue b/src/components/modals/StdStoreModal.vue index d9b6709c6..ec07b7b9d 100644 --- a/src/components/modals/StdStoreModal.vue +++ b/src/components/modals/StdStoreModal.vue @@ -20,24 +20,24 @@ export default {
diff --git a/src/components/modals/StdStoreRow.vue b/src/components/modals/StdStoreRow.vue index 684982320..fae936628 100644 --- a/src/components/modals/StdStoreRow.vue +++ b/src/components/modals/StdStoreRow.vue @@ -29,7 +29,7 @@ export default { class="o-modal-store-btn" @click="purchase" > - {{ cost }} + {{ cost }} $ From e2c09a8734f53a32fec3e467a86a254c2c55c28c Mon Sep 17 00:00:00 2001 From: L4R5W Date: Sun, 27 Feb 2022 00:09:52 +0100 Subject: [PATCH 0002/1119] credits --- .../tabs/celestial-pelle/CreditsContainer.vue | 172 +++++++++++++----- 1 file changed, 130 insertions(+), 42 deletions(-) diff --git a/src/components/tabs/celestial-pelle/CreditsContainer.vue b/src/components/tabs/celestial-pelle/CreditsContainer.vue index 9ef5d4017..d0b34b0e8 100644 --- a/src/components/tabs/celestial-pelle/CreditsContainer.vue +++ b/src/components/tabs/celestial-pelle/CreditsContainer.vue @@ -36,52 +36,130 @@ export default { }" >

Antimatter Dimensions

-

These credits and the song are a WIP

+

Created by

Ivar "Hevipelle" Kerajärvi

-

Co-Developers

+ +

Technical Architect

+

Razenpok (Andrei Andreev)

+ +

Head Developer

+

SpectralFlame (Christopher Yip)

Omsi

-

Christopher "SpectralFlame" Yip

-

Andrei "Razenpok" Andreev

-

Dan "02C00000"

-

Android version created by

-

Jakub "kajfik" Kajfosz

-

Contributors

-

earth

-

Iker "IkerStream" de Aguirre

-

Patashu

-

Pichusuperlover

-

WaitingIdly

-

Game Designers

+ +

Developer

+

Dan

realrapidjazz

-

Game Designer here

-

Game Designer here

-

Discord Moderators

-

Discord mod here

-

Discord mod here

-

Discord mod here

-

Discord mod here

-

Discord mod here

-

Testers

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

Mobile Testers

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

tester here

-

+

earth

+

IkerStream

+

Pichusuperlover

+

Patashu

+

L4R5 (Lars Wolf)

+

Hira

+

Sparticle999

+ +

Modal Maker, Lady Taker, Pie Baker

+

earth

+ +

Android Developer

+

kajfik (Jakub Kajfosz)

+ +

Library Developer

+

Patashu

+ +

Design Consoltant

+

Pichusuperlover

+

Acamaeda

+ +

Web Tester

+
+

Aesis

+

Alexitato

+

Birb (Kelsey Black)

+

CaptainGalaxy (Ovidijus Točelis)

+

cubic frog

+

dankesehr

+

earth

+

Hira

+

Kael

+

Merp

+

Phoenix

+

Phillip Marshall

+

Reda Kotob

+

sirusi (Vinícius Oliveira Martins)

+

SpicyCrusader13

+

SzyszakS

+

Typh

+

Xemadus (Jonathan Gibson)

+

Zipi

+
+
+

Acamaeda

+

AFYINEE (Gabriel HADDAG)

+

Archa (Myresa)

+

Boo (Jean-Christophe Bourgault)

+

ChaoticHans

+

Dan

+

Davixx (Davide Fedele)

+

Empireus

+

IkerStream (Iker de Aguirre)

+

Lynn

+

Patashu

+

philipebreaker (Philipe)

+

Pichusuperlover

+

Saturnus

+

Spanosa (Jared K)

+

Storm

+

Tacitus

+

Vnge (Ben Parrish)

+

Young Woo Joo

+
+ +

Android Tester:

+
+

Archa (Myresa)

+

ChaoticHans

+

Vnge (Ben Parrish)

+

Rukimix

+

Anjinho01

+

HarrisL2

+

hen-ben (Henry Ellenberg)

+

Gaunter

+

Socks (Hannah Pocks)

+

Johanniklas (Jan-Niklas Petersen)

+

Razor

+

Barrin84

+

DarthDie (Briar Bowser)

+

Monoma (ARoman Ruiz)

+

Nani

+

Kirin Nijinski (Arthur)

+

about:blank

+

Epsilon (Coolguystorm)

+

Razvan Cercel

+
+
+

Hira

+

Hellbach (Asher Günther)

+

Buck

+

Valentine Clarissa Alanis Star Z

+

Porygon-Z

+

tragedt (Ethan Manninen)

+

SpicyCrusader13

+

Firecracker

+

opdollar (Zane Coole)

+

ImpossibleSalsa

+

kaislash (Lily)

+

Skunky (Lukas)

+

ZylaKat (Katherine Goforth-Harbin)

+

vanadium_void

+

Circle

+

PotatoTIAB

+

Pavlxiiv

+

Kirku (Fabian Makowski)

+

Tim Wong

+
+ +


Thank you so much for playing!

@@ -107,6 +185,16 @@ export default { text-shadow: 1px 1px 2px turquoise; } + .left { + width: 50%; + float: left; + } + + .right { + width: 50%; + overflow: hidden; + } + p { margin-top: 1rem; } From 7f0fae7af5bc49e1e59bf2463bf13dd3114c3c4f Mon Sep 17 00:00:00 2001 From: L4R5W Date: Sun, 27 Feb 2022 00:11:16 +0100 Subject: [PATCH 0003/1119] hide tooltips when faded out, delay NG popup --- javascripts/core/hotkeys.js | 1 + javascripts/core/storage/storage.js | 1 + .../antimatter-dimensions/AntimatterDimensionProgressBar.vue | 3 +++ .../antimatter-dimensions/ClassicAntimatterDimensionRow.vue | 3 +++ .../ClassicAntimatterDimensionsTabHeader.vue | 3 +++ .../antimatter-dimensions/ModernAntimatterDimensionRow.vue | 3 +++ src/components/tabs/celestial-pelle/NewGame.vue | 2 +- 7 files changed, 15 insertions(+), 1 deletion(-) diff --git a/javascripts/core/hotkeys.js b/javascripts/core/hotkeys.js index aa1617435..4bd43dcb9 100644 --- a/javascripts/core/hotkeys.js +++ b/javascripts/core/hotkeys.js @@ -137,6 +137,7 @@ export const shortcuts = [ keys: ["mod", "s"], type: "bind", function: () => { + if (Pelle.endState >= 4.5) return false; GameStorage.save(false, true); return false; }, diff --git a/javascripts/core/storage/storage.js b/javascripts/core/storage/storage.js index d852e3c60..d8ee698cb 100644 --- a/javascripts/core/storage/storage.js +++ b/javascripts/core/storage/storage.js @@ -133,6 +133,7 @@ export const GameStorage = { }, save(silent = false, manual = false) { + if (Pelle.endState >= 4.5) return; if (GlyphSelection.active || ui.$viewModel.modal.progressBar !== undefined) return; this.lastSaveTime = Date.now(); GameIntervals.save.restart(); diff --git a/src/components/tabs/antimatter-dimensions/AntimatterDimensionProgressBar.vue b/src/components/tabs/antimatter-dimensions/AntimatterDimensionProgressBar.vue index 045aa6952..2c28064a6 100644 --- a/src/components/tabs/antimatter-dimensions/AntimatterDimensionProgressBar.vue +++ b/src/components/tabs/antimatter-dimensions/AntimatterDimensionProgressBar.vue @@ -5,6 +5,7 @@ export default { name: "AntimatterDimensionProgressBar", data() { return { + isVisible: true, fill: 0, tooltip: "" }; @@ -22,6 +23,7 @@ export default { methods: { // eslint-disable-next-line complexity update() { + this.isVisible = !Pelle.endState >= 4.5; const setProgress = (current, goal, tooltip) => { this.fill = Math.clampMax(current.pLog10() / Decimal.log10(goal), 1); this.tooltip = tooltip; @@ -117,6 +119,7 @@ export default { class="c-progress-bar__fill" > diff --git a/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue b/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue index 3888f63bb..6e4782a71 100644 --- a/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue +++ b/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue @@ -14,6 +14,7 @@ export default { }, data() { return { + end: false, isUnlocked: false, isCapped: false, multiplier: new Decimal(0), @@ -50,6 +51,7 @@ export default { return this.isShown || this.isUnlocked || this.amount.gt(0); }, boughtTooltip() { + if (this.end) return ""; if (this.isCapped) return `Enslaved prevents the purchase of more than ${format(1)} 8th Antimatter Dimension`; if (this.isContinuumActive) return "Continuum produces all your Antimatter Dimensions"; return `Purchased ${quantifyInt("time", this.bought)}`; @@ -60,6 +62,7 @@ export default { }, methods: { update() { + this.end = Pelle.endState >= 4.5; const tier = this.tier; if (tier > DimBoost.maxDimensionsUnlockable) return; const dimension = AntimatterDimension(tier); diff --git a/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionsTabHeader.vue b/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionsTabHeader.vue index 89afc416f..d2537e79a 100644 --- a/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionsTabHeader.vue +++ b/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionsTabHeader.vue @@ -8,6 +8,7 @@ export default { }, data() { return { + end: false, isSacrificeUnlocked: false, isSacrificeAffordable: false, currentSacrifice: new Decimal(0), @@ -17,11 +18,13 @@ export default { }, computed: { sacrificeTooltip() { + if (this.end) return ""; return `Boosts 8th Antimatter Dimension by ${formatX(this.sacrificeBoost, 2, 2)}`; }, }, methods: { update() { + this.end = Pelle.endState >= 4.5; const isSacrificeUnlocked = Sacrifice.isVisible; this.isSacrificeUnlocked = isSacrificeUnlocked; if (!isSacrificeUnlocked) return; diff --git a/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue b/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue index 7f02e1a45..9ae2d4ee9 100644 --- a/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue +++ b/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue @@ -9,6 +9,7 @@ export default { }, data() { return { + end: false, isUnlocked: false, isCapped: false, multiplier: new Decimal(0), @@ -49,6 +50,7 @@ export default { return this.isShown || this.isUnlocked || this.amount.gt(0); }, boughtTooltip() { + if (this.end) return ""; if (this.isCapped) return `Enslaved prevents the purchase of more than ${format(1)} 8th Antimatter Dimension`; if (this.isContinuumActive) return "Continuum produces all your Antimatter Dimensions"; return `Purchased ${quantifyInt("time", this.bought)}`; @@ -59,6 +61,7 @@ export default { }, methods: { update() { + this.end = Pelle.endState >= 4.5; const tier = this.tier; if (tier > DimBoost.maxDimensionsUnlockable) return; const dimension = AntimatterDimension(tier); diff --git a/src/components/tabs/celestial-pelle/NewGame.vue b/src/components/tabs/celestial-pelle/NewGame.vue index ca5aaefef..06583c3bb 100644 --- a/src/components/tabs/celestial-pelle/NewGame.vue +++ b/src/components/tabs/celestial-pelle/NewGame.vue @@ -19,7 +19,7 @@ export default { update() { this.plusRecord = NG.plusRecord; this.minusRecord = NG.minusRecord; - this.visible = Pelle.endState > 13; + this.visible = Pelle.endState > 14.9; }, ngString(i) { if (!i) return ""; From c616bfcb86d7dbff82c5bc6d35cc65a3032cbc2a Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sun, 27 Feb 2022 16:59:54 +0800 Subject: [PATCH 0004/1119] Formalised class names --- .../tabs/celestial-pelle/CreditsContainer.vue | 12 ++++++------ src/components/tabs/celestial-pelle/NewGame.vue | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/tabs/celestial-pelle/CreditsContainer.vue b/src/components/tabs/celestial-pelle/CreditsContainer.vue index d0b34b0e8..3d64b5733 100644 --- a/src/components/tabs/celestial-pelle/CreditsContainer.vue +++ b/src/components/tabs/celestial-pelle/CreditsContainer.vue @@ -72,7 +72,7 @@ export default {

Acamaeda

Web Tester

-
+

Aesis

Alexitato

Birb (Kelsey Black)

@@ -93,7 +93,7 @@ export default {

Xemadus (Jonathan Gibson)

Zipi

-
+

Acamaeda

AFYINEE (Gabriel HADDAG)

Archa (Myresa)

@@ -116,7 +116,7 @@ export default {

Android Tester:

-
+

Archa (Myresa)

ChaoticHans

Vnge (Ben Parrish)

@@ -137,7 +137,7 @@ export default {

Epsilon (Coolguystorm)

Razvan Cercel

-
+

Hira

Hellbach (Asher Günther)

Buck

@@ -185,12 +185,12 @@ export default { text-shadow: 1px 1px 2px turquoise; } - .left { + .l-credits--left { width: 50%; float: left; } - .right { + .l-credits--right { width: 50%; overflow: hidden; } diff --git a/src/components/tabs/celestial-pelle/NewGame.vue b/src/components/tabs/celestial-pelle/NewGame.vue index 06583c3bb..db0f0e542 100644 --- a/src/components/tabs/celestial-pelle/NewGame.vue +++ b/src/components/tabs/celestial-pelle/NewGame.vue @@ -5,6 +5,7 @@ export default { return { plusRecord: 0, minusRecord: 0, + opacity: 0, visible: false }; }, @@ -20,6 +21,7 @@ export default { this.plusRecord = NG.plusRecord; this.minusRecord = NG.minusRecord; this.visible = Pelle.endState > 14.9; + this.opacity = (Pelle.endState - 14.9) * 2; }, ngString(i) { if (!i) return ""; @@ -35,7 +37,7 @@ export default { @@ -487,11 +491,11 @@ const people = [ transform: translateY(100%); } -h1 { +.c-credits-header { color: yellow; } -h2 { +.c-credits-section { margin-top: 10rem; margin-bottom: 2rem; color: white; @@ -536,15 +540,18 @@ h2 { 90% { transform: rotate(73deg); } 100% { transform: rotate(61deg); } } + @keyframes a-effarig-credits { 0% { opacity: 0.8; text-shadow: 0 0 3rem; } 50% { opacity: 1; text-shadow: 0 0 4rem, 0 0 4rem; } 100% { opacity: 0.8; text-shadow: 0 0 3rem; } } + @keyframes a-enslaved-credits { 0% { transform: translateX(-50%) rotate(0); } 100% { transform: translateX(-50%) rotate(360deg); } } + /* We unfortunately have to do it this way, because due to how the benzene unicode symbol works, 0 and 120deg aren't perfectly the same. */ @keyframes a-v-credits { @@ -556,11 +563,13 @@ perfectly the same. */ 83.33% { transform: translateX(-50%) rotate(300deg) scale(1.2); } 100% { transform: translateX(-50%) rotate(360deg) scale(0.8); } } + @keyframes a-ra-credits { 0% { opacity: 0.1; transform: translateX(-50%) scale(0.2); } 50% { opacity: 0.4; transform: translateX(-50%) scale(0.9); } 100% { opacity: 0.1; transform: translateX(-50%) scale(0.2); } } + @keyframes a-laitela-credits { 0% { transform: translate(-50%, 30%); } 25% { transform: translate(-50%, -20%); } @@ -568,6 +577,7 @@ perfectly the same. */ 75% { transform: translate(0%, 30%); } 100% { transform: translate(-50%, 30%); } } + @keyframes a-pelle-credits { 0% { transform: translateX(-50%) rotate3d(0, 1, 0, 0) scaleY(1); } 25% { transform: translateX(-50%) rotate3d(0, 1, 0, 90deg) scaleY(1.3); } diff --git a/src/components/tabs/celestial-pelle/NewGame.vue b/src/components/tabs/celestial-pelle/NewGame.vue index 439de6ee5..ff651716a 100644 --- a/src/components/tabs/celestial-pelle/NewGame.vue +++ b/src/components/tabs/celestial-pelle/NewGame.vue @@ -82,7 +82,7 @@ export default { flex-direction: column; } -button { +.c-new-game-button { margin-top: 1rem; padding: 1rem; font-family: Typewriter; From 212e22495b8b7a7962444006699ee4d3796474d3 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:20:14 +0800 Subject: [PATCH 0055/1119] DataBase it better --- javascripts/core/secret-formula/credits.js | 326 +++++++++++++++++ javascripts/core/secret-formula/index.js | 2 + .../tabs/celestial-pelle/CreditsContainer.vue | 339 +----------------- 3 files changed, 336 insertions(+), 331 deletions(-) create mode 100644 javascripts/core/secret-formula/credits.js diff --git a/javascripts/core/secret-formula/credits.js b/javascripts/core/secret-formula/credits.js new file mode 100644 index 000000000..032560d0e --- /dev/null +++ b/javascripts/core/secret-formula/credits.js @@ -0,0 +1,326 @@ +import { GameDatabase } from "./game-database.js"; + +GameDatabase.credits = { + // Must be placed in the order it is desired they appear in the credits + roles: { + 1: "Creator", + 2: "Technical Architect", + 3: "Lead Developer", + 4: "Android Developer", + 5: "Library Developer", + 6: "Developer", + 7: "Lead Design Consultant", + 8: "Design Consultant", + 9: "Modal Maker, Lady Taker, Pie Baker", + 10: "Lurker Tester", + 11: "Web Tester", + 12: "Android Tester" + }, + + // Each person must have a name and at least one role (the index of the desired role in roles). They can also have a + // second name, which will appear in parentheses besides their first. + people: [ + { + name: "Hevipelle", + name2: "Ivar Kerajärvi", + roles: 1 + }, { + name: "Razenpok", + name2: "Andrei Andreev", + roles: 2 + }, { + name: "Omsi", + roles: 3 + }, { + name: "SpectralFlame", + name2: "Christopher Yip", + roles: 3 + }, { + name: "WaitingIdly", + roles: [3, 6, 8, 11, 12] + }, { + name: "kajfik", + name2: "Jakub Kajfosz", + roles: 4 + }, { + name: "Patashu", + roles: [5, 6, 11] + }, { + name: "Dan", + roles: [6, 11] + }, { + name: "earth", + roles: [6, 9, 11] + }, { + name: "Hira", + roles: [6, 11, 12] + }, { + name: "IkerStream", + name2: "Iker de Aguirre", + roles: [6, 11] + }, { + name: "L4R5", + name2: "Lars Wolf", + roles: [6, 11, 12] + }, { + name: "Pichusuperlover", + roles: [6, 8, 11] + }, { + name: "realrapidjazz", + roles: [6, 7] + }, { + name: "slabdrill", + roles: 6 + }, { + name: "Acamaeda", + roles: [8, 11] + }, { + name: "Dravitar", + name2: "Alex Henderson", + roles: 10 + }, { + name: "Aesis", + roles: 11 + }, { + name: "AFYINEE", + name2: "Gabriel HADDAG", + roles: 11 + }, { + name: "Alexitato", + roles: 11 + }, { + name: "Anno", + roles: 11 + }, { + name: "Archa", + name2: "Myresa", + roles: [11, 12] + }, { + name: "ArrowBounce", + name2: "Timothy Su", + roles: 11 + }, { + name: "Birb", + name2: "Kelsey Black", + roles: 11 + }, { + name: "Boo", + name2: "Jean-Christophe Bourgault", + roles: 11 + }, { + name: "CaptainGalaxy", + name2: "Ovidijus Točelis", + roles: 11 + }, { + name: "ChaoticHans", + roles: [11, 12] + }, { + name: "cubic frog", + roles: 11 + }, { + name: "dankesehr", + roles: 11 + }, { + name: "Davixx", + name2: "Davide Fedele", + roles: 11 + }, { + name: "Empireus", + roles: 11 + }, { + name: "GirixK", + name2: "Nikola Jelinčić", + roles: [11, 12] + }, { + name: "GoldenTritium", + roles: [11, 12] + }, { + name: "Kael", + roles: 11 + }, { + name: "Lynn", + roles: 11 + }, { + name: "Merp", + roles: 11 + }, { + name: "philipebreaker", + name2: "Philipe", + roles: 11 + }, { + name: "Phillip Marshall", + roles: 11 + }, { + name: "Phoenix", + roles: 11 + }, { + name: "Reda Kotob", + roles: 11 + }, { + name: "Saturnus", + roles: 11 + }, { + name: "Scarlet", + roles: [11, 12] + }, { + name: "sirusi", + name2: "Vinícius Oliveira Martins", + roles: 11 + }, { + name: "Spanosa", + name2: "Jared K", + roles: 11 + }, { + name: "Sparticle999", + roles: 11 + }, { + name: "SpicyCrusader13", + roles: [11, 12] + }, { + name: "Storm", + roles: 11 + }, { + name: "SzyszakS", + roles: 11 + }, { + name: "Tacitus", + roles: 11 + }, { + name: "Typh", + roles: 11 + }, { + name: "Vnge", + name2: "Ben Parrish", + roles: [11, 12] + }, { + name: "Xemadus", + name2: "Jonathan Gibson", + roles: 11 + }, { + name: "Young Woo Joo", + roles: 11 + }, { + name: "Zipi", + roles: 11 + }, { + name: "about:blank", + roles: 12 + }, { + name: "Anjinho01", + roles: 12 + }, { + name: "Auti", + name2: "Alice Tolle", + roles: 12 + }, { + name: "Buck", + roles: 12 + }, { + name: "Barrin84", + roles: 12 + }, { + name: "Circle", + roles: 12 + }, { + name: "DarthDie", + name2: "Briar Bowser", + roles: 12 + }, { + name: "Epsilon", + name2: "Coolguystorm", + roles: 12 + }, { + name: "Firecracker", + roles: 12 + }, { + name: "Gaunter", + roles: 12 + }, { + name: "HarrisL2", + roles: 12 + }, { + name: "Hellbach", + name2: "Asher Günther", + roles: 12 + }, { + name: "hen-ben", + name2: "Henry Ellenberg", + roles: 12 + }, { + name: "ImpossibleSalsa", + roles: 12 + }, { + name: "Johanniklas", + name2: "Jan-Niklas Petersen", + roles: 12 + }, { + name: "kaislash", + name2: "Lily", + roles: 12 + }, { + name: "Kirku", + name2: "Fabian Makowski", + roles: 12 + }, { + name: "Kirin", + name2: "Arthur", + roles: 12 + }, { + name: "Monoma", + name2: "ARoman Ruiz", + roles: 12 + }, { + name: "Nani", + roles: 12 + }, { + name: "opdollar", + name2: "Zane Coole", + roles: 12 + }, { + name: "Pavlxiiv", + roles: 12 + }, { + name: "Porygon-Z", + roles: 12 + }, { + name: "PotatoTIAB", + roles: 12 + }, { + name: "Razor", + roles: 12 + }, { + name: "Razvan Cercel", + roles: 12 + }, { + name: "Rukimix", + roles: 12 + }, { + name: "Skunky", + name2: "Lukas", + roles: 12 + }, { + name: "Socks", + name2: "Hannah Pocks", + roles: 12 + }, { + name: "Tim Wong", + roles: 12 + }, { + name: "tragedt", + name2: "Ethan Manninen", + roles: 12 + }, { + name: "Valentine Clarissa Alanis Star Z", + roles: 12 + }, { + name: "vanadium_void", + roles: 12 + }, { + name: "ZylaKat", + name2: "Katherine Goforth-Harbin", + roles: 12 + } + ] +}; + +GameDatabase.credits.roles.count = Object.keys(GameDatabase.credits.roles).length; \ No newline at end of file diff --git a/javascripts/core/secret-formula/index.js b/javascripts/core/secret-formula/index.js index b104ce50d..e95cb8a8f 100644 --- a/javascripts/core/secret-formula/index.js +++ b/javascripts/core/secret-formula/index.js @@ -39,3 +39,5 @@ import "./script-templates.js"; import "./speedrun-milestones.js"; import "./h2p.js"; + +import "./credits.js"; \ No newline at end of file diff --git a/src/components/tabs/celestial-pelle/CreditsContainer.vue b/src/components/tabs/celestial-pelle/CreditsContainer.vue index 02348ef69..411e276cb 100644 --- a/src/components/tabs/celestial-pelle/CreditsContainer.vue +++ b/src/components/tabs/celestial-pelle/CreditsContainer.vue @@ -17,8 +17,8 @@ export default { } }, computed: { - people() { return people; }, - roles() { return roles; }, + people() { return GameDatabase.credits.people; }, + roles() { return GameDatabase.credits.roles; }, creditStyles() { return { bottom: `${this.scroll}rem`, @@ -31,7 +31,7 @@ export default { symbol: Teresa.symbol, style: { left: "65%", - top: "112rem", + top: "130rem", color: "var(--color-teresa--base)", animation: this.animName("teresa") } @@ -40,7 +40,7 @@ export default { symbol: Effarig.symbol, style: { left: "80%", - top: "40rem", + top: "50rem", color: "#f40", animation: this.animName("effarig", 4) } @@ -49,7 +49,7 @@ export default { symbol: Enslaved.symbol, style: { left: "52%", - top: "200rem", + top: "220rem", color: "var(--color-enslaved-base)", animation: this.animName("enslaved", 10, "linear") } @@ -58,7 +58,7 @@ export default { symbol: V.symbol, style: { left: "20%", - top: "143rem", + top: "170rem", color: "var(--color-v--base)", animation: this.animName("v", 15) } @@ -76,7 +76,7 @@ export default { symbol: Laitela.symbol, style: { left: "13%", - top: "60rem", + top: "90rem", color: "#ffffff", animation: this.animName("laitela", 5) } @@ -103,335 +103,12 @@ export default { return `a-${x}-credits ${duration}s ${type} infinite`; }, relevantPeople(role) { - return people + return this.people .filter(x => (typeof x.roles === "number" ? x.roles === role : x.roles.includes(role))) .sort((a, b) => a.name.toUpperCase() > b.name.toUpperCase()); } } }; - -// Must be placed in the order it is desired they appear in the credits -const roles = { - 1: "Creator", - 2: "Technical Architect", - 3: "Lead Developer", - 4: "Android Developer", - 5: "Library Developer", - 6: "Developer", - 7: "Lead Design Consultant", - 8: "Design Consultant", - 9: "Modal Maker, Lady Taker, Pie Baker", - 10: "Lurker Tester", - 11: "Web Tester", - 12: "Android Tester" -}; - -roles.count = Object.keys(roles).length; - -// Each person must have a name and at least one role (the index of the desired role in roles). They can also have a -// second name, which will appear in parentheses besides their first. -const people = [ - { - name: "Hevipelle", - name2: "Ivar Kerajärvi", - roles: 1 - }, { - name: "Razenpok", - name2: "Andrei Andreev", - roles: 2 - }, { - name: "Omsi", - roles: 3 - }, { - name: "SpectralFlame", - name2: "Christopher Yip", - roles: 3 - }, { - name: "WaitingIdly", - roles: [3, 6, 8, 11, 12] - }, { - name: "kajfik", - name2: "Jakub Kajfosz", - roles: 4 - }, { - name: "Patashu", - roles: [5, 6, 11] - }, { - name: "Dan", - roles: [6, 11] - }, { - name: "earth", - roles: [6, 9, 11] - }, { - name: "Hira", - roles: [6, 11, 12] - }, { - name: "IkerStream", - name2: "Iker de Aguirre", - roles: [6, 11] - }, { - name: "L4R5", - name2: "Lars Wolf", - roles: [6, 11, 12] - }, { - name: "Pichusuperlover", - roles: [6, 8, 11] - }, { - name: "realrapidjazz", - roles: [6, 7] - }, { - name: "slabdrill", - roles: 6 - }, { - name: "Acamaeda", - roles: [8, 11] - }, { - name: "Dravitar", - name2: "Alex Henderson", - roles: 10 - }, { - name: "Aesis", - roles: 11 - }, { - name: "AFYINEE", - name2: "Gabriel HADDAG", - roles: 11 - }, { - name: "Alexitato", - roles: 11 - }, { - name: "Anno", - roles: 11 - }, { - name: "Archa", - name2: "Myresa", - roles: [11, 12] - }, { - name: "ArrowBounce", - name2: "Timothy Su", - roles: 11 - }, { - name: "Birb", - name2: "Kelsey Black", - roles: 11 - }, { - name: "Boo", - name2: "Jean-Christophe Bourgault", - roles: 11 - }, { - name: "CaptainGalaxy", - name2: "Ovidijus Točelis", - roles: 11 - }, { - name: "ChaoticHans", - roles: [11, 12] - }, { - name: "cubic frog", - roles: 11 - }, { - name: "dankesehr", - roles: 11 - }, { - name: "Davixx", - name2: "Davide Fedele", - roles: 11 - }, { - name: "Empireus", - roles: 11 - }, { - name: "GirixK", - name2: "Nikola Jelinčić", - roles: [11, 12] - }, { - name: "GoldenTritium", - roles: [11, 12] - }, { - name: "Kael", - roles: 11 - }, { - name: "Lynn", - roles: 11 - }, { - name: "Merp", - roles: 11 - }, { - name: "philipebreaker", - name2: "Philipe", - roles: 11 - }, { - name: "Phillip Marshall", - roles: 11 - }, { - name: "Phoenix", - roles: 11 - }, { - name: "Reda Kotob", - roles: 11 - }, { - name: "Saturnus", - roles: 11 - }, { - name: "Scarlet", - roles: [11, 12] - }, { - name: "sirusi", - name2: "Vinícius Oliveira Martins", - roles: 11 - }, { - name: "Spanosa", - name2: "Jared K", - roles: 11 - }, { - name: "Sparticle999", - roles: 11 - }, { - name: "SpicyCrusader13", - roles: [11, 12] - }, { - name: "Storm", - roles: 11 - }, { - name: "SzyszakS", - roles: 11 - }, { - name: "Tacitus", - roles: 11 - }, { - name: "Typh", - roles: 11 - }, { - name: "Vnge", - name2: "Ben Parrish", - roles: [11, 12] - }, { - name: "Xemadus", - name2: "Jonathan Gibson", - roles: 11 - }, { - name: "Young Woo Joo", - roles: 11 - }, { - name: "Zipi", - roles: 11 - }, { - name: "about:blank", - roles: 12 - }, { - name: "Anjinho01", - roles: 12 - }, { - name: "Auti", - name2: "Alice Tolle", - roles: 12 - }, { - name: "Buck", - roles: 12 - }, { - name: "Barrin84", - roles: 12 - }, { - name: "Circle", - roles: 12 - }, { - name: "DarthDie", - name2: "Briar Bowser", - roles: 12 - }, { - name: "Epsilon", - name2: "Coolguystorm", - roles: 12 - }, { - name: "Firecracker", - roles: 12 - }, { - name: "Gaunter", - roles: 12 - }, { - name: "HarrisL2", - roles: 12 - }, { - name: "Hellbach", - name2: "Asher Günther", - roles: 12 - }, { - name: "hen-ben", - name2: "Henry Ellenberg", - roles: 12 - }, { - name: "ImpossibleSalsa", - roles: 12 - }, { - name: "Johanniklas", - name2: "Jan-Niklas Petersen", - roles: 12 - }, { - name: "kaislash", - name2: "Lily", - roles: 12 - }, { - name: "Kirku", - name2: "Fabian Makowski", - roles: 12 - }, { - name: "Kirin", - name2: "Arthur", - roles: 12 - }, { - name: "Monoma", - name2: "ARoman Ruiz", - roles: 12 - }, { - name: "Nani", - roles: 12 - }, { - name: "opdollar", - name2: "Zane Coole", - roles: 12 - }, { - name: "Pavlxiiv", - roles: 12 - }, { - name: "Porygon-Z", - roles: 12 - }, { - name: "PotatoTIAB", - roles: 12 - }, { - name: "Razor", - roles: 12 - }, { - name: "Razvan Cercel", - roles: 12 - }, { - name: "Rukimix", - roles: 12 - }, { - name: "Skunky", - name2: "Lukas", - roles: 12 - }, { - name: "Socks", - name2: "Hannah Pocks", - roles: 12 - }, { - name: "Tim Wong", - roles: 12 - }, { - name: "tragedt", - name2: "Ethan Manninen", - roles: 12 - }, { - name: "Valentine Clarissa Alanis Star Z", - roles: 12 - }, { - name: "vanadium_void", - roles: 12 - }, { - name: "ZylaKat", - name2: "Katherine Goforth-Harbin", - roles: 12 - } -]; diff --git a/src/components/tabs/time-dilation/TimeDilationTab.vue b/src/components/tabs/time-dilation/TimeDilationTab.vue index 688b8dcd1..9fafbcf1e 100644 --- a/src/components/tabs/time-dilation/TimeDilationTab.vue +++ b/src/components/tabs/time-dilation/TimeDilationTab.vue @@ -1,14 +1,12 @@ @@ -182,7 +187,10 @@ export default {
- +
From f41951c713a0c2cf667fafdab0f8dd6bde92a665 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 28 Apr 2022 07:48:32 +0800 Subject: [PATCH 0255/1119] Modal prioritization for confirm doing x --- javascripts/core/app/modal.js | 57 +++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/javascripts/core/app/modal.js b/javascripts/core/app/modal.js index d4d26f4b6..c5455f7b3 100644 --- a/javascripts/core/app/modal.js +++ b/javascripts/core/app/modal.js @@ -66,6 +66,7 @@ export class Modal { this._component = component; this._bare = bare; this._modalConfig = {}; + this._prioritize = false; } show(modalConfig) { @@ -73,7 +74,19 @@ export class Modal { this._props = Object.assign({}, modalConfig || {}); if (ui.view.modal.queue.length === 0) ui.view.modal.current = this; // New modals go to the back of the queue (shown last). - if (!ui.view.modal.queue.includes(this)) ui.view.modal.queue.push(this); + if (!ui.view.modal.queue.includes(this)) { + if (this._prioritize) { + ui.view.modal.queue.unshift(this); + ui.view.modal.current = this; + } else { + ui.view.modal.queue.push(this); + } + } + } + + prioritize() { + this._prioritize = true; + return this; } get isOpen() { @@ -131,20 +144,20 @@ Modal.startEternityChallenge = new ChallengeConfirmationModal(EternityChallengeS Modal.startInfinityChallenge = new ChallengeConfirmationModal(InfinityChallengeStartModal); Modal.startNormalChallenge = new ChallengeConfirmationModal(NormalChallengeStartModal); -Modal.dimensionBoost = new Modal(DimensionBoostModal); -Modal.antimatterGalaxy = new Modal(AntimatterGalaxyModal); -Modal.bigCrunch = new Modal(BigCrunchModal); -Modal.replicantiGalaxy = new Modal(ReplicantiGalaxyModal); -Modal.eternity = new Modal(EternityModal); -Modal.enterDilation = new Modal(EnterDilationModal); -Modal.reality = new Modal(RealityModal); -Modal.resetReality = new Modal(ResetRealityModal); -Modal.exitCelestialReality = new Modal(ExitCelestialModal); -Modal.celestials = new Modal(EnterCelestialsModal); -Modal.hardReset = new Modal(HardResetModal); +Modal.dimensionBoost = new Modal(DimensionBoostModal).prioritize(); +Modal.antimatterGalaxy = new Modal(AntimatterGalaxyModal).prioritize(); +Modal.bigCrunch = new Modal(BigCrunchModal).prioritize(); +Modal.replicantiGalaxy = new Modal(ReplicantiGalaxyModal).prioritize(); +Modal.eternity = new Modal(EternityModal).prioritize(); +Modal.enterDilation = new Modal(EnterDilationModal).prioritize(); +Modal.reality = new Modal(RealityModal).prioritize(); +Modal.resetReality = new Modal(ResetRealityModal).prioritize(); +Modal.exitCelestialReality = new Modal(ExitCelestialModal).prioritize(); +Modal.celestials = new Modal(EnterCelestialsModal).prioritize(); +Modal.hardReset = new Modal(HardResetModal).prioritize(); Modal.enterSpeedrun = new Modal(SpeedrunModeModal); Modal.changeName = new Modal(ChangeNameModal); -Modal.armageddon = new Modal(ArmageddonModal); +Modal.armageddon = new Modal(ArmageddonModal).prioritize(); Modal.confirmationOptions = new Modal(ConfirmationOptionsModal); Modal.infoDisplayOptions = new Modal(InfoDisplayOptionsModal); @@ -155,16 +168,16 @@ Modal.animationOptions = new Modal(AnimationOptionsModal); Modal.hiddenTabs = new Modal(HiddenTabsModal); Modal.preferredTree = new Modal(PreferredTreeModal); -Modal.deleteCompanion = new Modal(DeleteCompanionGlyphModal); -Modal.glyphDelete = new Modal(DeleteGlyphModal); -Modal.glyphPurge = new Modal(PurgeGlyphModal); -Modal.glyphSacrifice = new Modal(SacrificeGlyphModal); -Modal.glyphRefine = new Modal(RefineGlyphModal); -Modal.deleteAllUnprotectedGlyphs = new Modal(PurgeAllUnprotectedGlyphsModal); -Modal.deleteAllRejectedGlyphs = new Modal(PurgeAllRejectedGlyphsModal); +Modal.deleteCompanion = new Modal(DeleteCompanionGlyphModal).prioritize(); +Modal.glyphDelete = new Modal(DeleteGlyphModal).prioritize(); +Modal.glyphPurge = new Modal(PurgeGlyphModal).prioritize(); +Modal.glyphSacrifice = new Modal(SacrificeGlyphModal).prioritize(); +Modal.glyphRefine = new Modal(RefineGlyphModal).prioritize(); +Modal.deleteAllUnprotectedGlyphs = new Modal(PurgeAllUnprotectedGlyphsModal).prioritize(); +Modal.deleteAllRejectedGlyphs = new Modal(PurgeAllRejectedGlyphsModal).prioritize(); Modal.glyphShowcasePanel = new Modal(GlyphShowcasePanelModal); -Modal.glyphUndo = new Modal(UndoGlyphModal); +Modal.glyphUndo = new Modal(UndoGlyphModal).prioritize(); Modal.glyphReplace = new Modal(ReplaceGlyphModal); Modal.enslavedHints = new Modal(EnslavedHintsModal); Modal.realityGlyph = new Modal(RealityGlyphCreationModal); @@ -182,7 +195,7 @@ Modal.shop = new Modal(StdStoreModal); Modal.studyString = new Modal(StudyStringModal); Modal.singularityMilestones = new Modal(SingularityMilestonesModal); Modal.pelleEffects = new Modal(PelleEffectsModal); -Modal.sacrifice = new Modal(SacrificeModal); +Modal.sacrifice = new Modal(SacrificeModal).prioritize(); Modal.breakInfinity = new Modal(BreakInfinityModal); Modal.celestialQuote = new class extends Modal { show(celestial, lines) { From aae47a74cb1abdb54546c83807366e5772200064 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 28 Apr 2022 11:21:29 +0800 Subject: [PATCH 0256/1119] Address PR feedback and fix bugs get isUnlocked() {} -> isUnlocked: () => {} Fix store time requirement being applied to reality instead of stored time --- .../tabs/automator/AutomatorBlocks.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/tabs/automator/AutomatorBlocks.vue b/src/components/tabs/automator/AutomatorBlocks.vue index 03ec50215..232ad1dd3 100644 --- a/src/components/tabs/automator/AutomatorBlocks.vue +++ b/src/components/tabs/automator/AutomatorBlocks.vue @@ -8,13 +8,13 @@ export default { }, data() { return { - realBlocks: automatorBlocks.filter(b => !AUTOMATOR_BLOCKS_BLACKLIST.includes(b.cmd)), + allBlocks: automatorBlocks.filter(b => !AUTOMATOR_BLOCKS_BLACKLIST.includes(b.cmd)), blocks: [] }; }, methods: { update() { - this.blocks = this.realBlocks.filter(b => (b.isUnlocked ?? true)); + this.blocks = this.allBlocks.filter(b => (b.isUnlocked?.() ?? true)); }, clone(block) { const b = { @@ -91,15 +91,11 @@ export const automatorBlocks = [ }, { cmd: "BLACK HOLE", targets: ["ON", "OFF"], - get isUnlocked() { - return BlackHole(1).isUnlocked; - }, + isUnlocked: () => BlackHole(1).isUnlocked }, { cmd: "STORE TIME", targets: ["ON", "OFF", "USE"], - get isUnlocked() { - return RealityUpgrade(25).isBought; - }, + isUnlocked: () => Enslaved.isUnlocked }, { cmd: "TT", targets: ["AM", "IP", "EP", "ALL"], @@ -120,9 +116,7 @@ export const automatorBlocks = [ cmd: "REALITY", canRespec: true, canWait: true, - get isUnlocked() { - return Enslaved.isUnlocked; - }, + isUnlocked: () => RealityUpgrade(25).isBought }, { cmd: "LOAD", hasInput: true, From f3156422b1fce2c6bf1be76e6d51c648b235c254 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:42:54 +0800 Subject: [PATCH 0257/1119] Add a passage to cel3 h2p explaining stored rt for < 1s --- javascripts/core/secret-formula/h2p.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/javascripts/core/secret-formula/h2p.js b/javascripts/core/secret-formula/h2p.js index d1617d2b8..ef58caf5c 100644 --- a/javascripts/core/secret-formula/h2p.js +++ b/javascripts/core/secret-formula/h2p.js @@ -1154,6 +1154,12 @@ ${format(5e12)} Relic Shards, ${formatInt(5)} Glyphs (subject to your filtering and ${formatInt(5)} Perk Points.

+However, if your Reality has lasted for less than ${formatInt(1)} second, the amount of +Realities simulated is capped by the seconds of stored real time you have. For example, if you have ${formatInt(1000)} +seconds stored and amplify a Reality which has lasted ${format(0.2, 2, 2)} seconds, you will use ${formatInt(200)} +seconds to simulate ${formatInt(1000)} equivalent Realities. +
+
You can toggle a setting to automatically store offline time as stored real time.

From 60c2b4b74c119a664df7c3e3504a7a929071b083 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Tue, 26 Apr 2022 11:58:06 +0800 Subject: [PATCH 0258/1119] Improve cel3 h2p wording to be less verbose --- javascripts/core/secret-formula/h2p.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/javascripts/core/secret-formula/h2p.js b/javascripts/core/secret-formula/h2p.js index ef58caf5c..2fbbbe8ad 100644 --- a/javascripts/core/secret-formula/h2p.js +++ b/javascripts/core/secret-formula/h2p.js @@ -1154,10 +1154,9 @@ ${format(5e12)} Relic Shards, ${formatInt(5)} Glyphs (subject to your filtering and ${formatInt(5)} Perk Points.

-However, if your Reality has lasted for less than ${formatInt(1)} second, the amount of -Realities simulated is capped by the seconds of stored real time you have. For example, if you have ${formatInt(1000)} -seconds stored and amplify a Reality which has lasted ${format(0.2, 2, 2)} seconds, you will use ${formatInt(200)} -seconds to simulate ${formatInt(1000)} equivalent Realities. +However, if your Reality has lasted for less than ${formatInt(1)} second, the amplification factor is capped by amount +of seconds stored. For example, if you have ${formatInt(1000)} seconds stored and amplify a Reality which has lasted +${format(0.2, 2, 2)} seconds, you will use ${formatInt(200)} seconds to simulate ${formatInt(1000)} Realities.

You can toggle a setting to automatically store offline time as stored real time. From c51ce13602803ed5778bcc852a7e7ab11ce853bd Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Tue, 26 Apr 2022 12:09:53 +0800 Subject: [PATCH 0259/1119] Typo --- javascripts/core/secret-formula/h2p.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javascripts/core/secret-formula/h2p.js b/javascripts/core/secret-formula/h2p.js index 2fbbbe8ad..b9313bf87 100644 --- a/javascripts/core/secret-formula/h2p.js +++ b/javascripts/core/secret-formula/h2p.js @@ -1154,9 +1154,9 @@ ${format(5e12)} Relic Shards, ${formatInt(5)} Glyphs (subject to your filtering and ${formatInt(5)} Perk Points.

-However, if your Reality has lasted for less than ${formatInt(1)} second, the amplification factor is capped by amount -of seconds stored. For example, if you have ${formatInt(1000)} seconds stored and amplify a Reality which has lasted -${format(0.2, 2, 2)} seconds, you will use ${formatInt(200)} seconds to simulate ${formatInt(1000)} Realities. +However, if your Reality has lasted for less than ${formatInt(1)} second, the amplification factor is capped by the +amount of seconds stored. For example, if you have ${formatInt(1000)} seconds stored and amplify a Reality which has +lasted ${format(0.2, 2, 2)} seconds, you will use ${formatInt(200)} seconds to simulate ${formatInt(1000)} Realities.

You can toggle a setting to automatically store offline time as stored real time. From 4299e71591ad28367e23e87fb14d4222d054a652 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Wed, 27 Apr 2022 20:36:17 +0800 Subject: [PATCH 0260/1119] Make zalgo transition on classic subtabs --- .../ui-modes/classic/ClassicSubtabButton.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/ui-modes/classic/ClassicSubtabButton.vue b/src/components/ui-modes/classic/ClassicSubtabButton.vue index f0f3a9ec4..c96a8fd2b 100644 --- a/src/components/ui-modes/classic/ClassicSubtabButton.vue +++ b/src/components/ui-modes/classic/ClassicSubtabButton.vue @@ -11,7 +11,8 @@ export default { return { isAvailable: false, hasNotification: false, - isCurrentSubtab: false + isCurrentSubtab: false, + tabName: "" }; }, methods: { @@ -19,6 +20,11 @@ export default { this.isAvailable = this.subtab.isAvailable; this.hasNotification = this.subtab.hasNotification; this.isCurrentSubtab = this.subtab.isOpen && player.options.theme !== "S9"; + this.tabName = Pelle.transitionText( + this.subtab.name, + this.subtab.name, + Math.max(Math.min(GameEnd.endState - (this.subtab.id) % 4 / 10, 1), 0) + ); } }, }; @@ -31,7 +37,7 @@ export default { :class="{ 'o-subtab-btn--active': isCurrentSubtab }" @click="subtab.show(true)" > - {{ subtab.name }} + {{ tabName }} Date: Thu, 28 Apr 2022 11:36:57 +0800 Subject: [PATCH 0261/1119] Scope CSS variables to body instead of #ui-container so they can be used in more places --- public/stylesheets/new-ui-styles.css | 4 ++-- public/stylesheets/styles.css | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/public/stylesheets/new-ui-styles.css b/public/stylesheets/new-ui-styles.css index cbc2b8bd1..6b0f306aa 100644 --- a/public/stylesheets/new-ui-styles.css +++ b/public/stylesheets/new-ui-styles.css @@ -7,8 +7,8 @@ outline: none; } -.t-normal #ui-container, -.t-s9 #ui-container { +body.t-normal, +body.t-s9 { --color-text: white; --color-text-inverted: black; --color-base: #1d1b22; diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index c0b485c49..7aaffd8e3 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -24,7 +24,7 @@ html { justify-content: center; } -#ui-container { +body { --color-text: black; --color-text-inverted: white; --color-base: #F2F2F2; @@ -67,9 +67,9 @@ html { --color-pelle-secondary: #00bcd4; } -.t-metro #ui-container, /* csslint allow: empty-rules */ -.t-inverted-metro #ui-container, -.t-s8 #ui-container { +body.t-metro, /* csslint allow: empty-rules */ +body.t-inverted-metro, +body.t-s8 { --color-text: black; --color-text-inverted: white; --color-base: #eeeeee; @@ -85,7 +85,7 @@ html { --color-celestials: #00bcd4; } -.t-dark #ui-container { /* csslint allow: empty-rules */ +body.t-dark { /* csslint allow: empty-rules */ --color-text: #e0e0e0; --color-text-inverted: black; --color-base: #455a64; @@ -101,7 +101,7 @@ html { --color-laitela--accent: white; } -.t-dark-metro #ui-container { /* csslint allow: empty-rules */ +body.t-dark-metro { /* csslint allow: empty-rules */ --color-text: #e0e0e0; --color-text-inverted: black; --color-base: #455a64; @@ -123,7 +123,7 @@ html { --color-laitela--accent: white; } -.t-s1 #ui-container { /* csslint allow: empty-rules */ +body.t-s1 { /* csslint allow: empty-rules */ --color-text: black; --color-text-inverted: #dbd242; --color-base: #dbd242; @@ -143,7 +143,7 @@ html { --color-pelle--base: #7cb727; } -.t-s4 #ui-container { /* csslint allow: empty-rules */ +body.t-s4 { /* csslint allow: empty-rules */ --color-text: black; --color-text-inverted: white; --color-base: #1b00ff; @@ -152,8 +152,8 @@ html { --color-bad: #ff0000; } -.t-s6 #ui-container, /* csslint allow: empty-rules */ -.t-s10 #ui-container { +body.t-s6, /* csslint allow: empty-rules */ +body.t-s10 { --color-text: #E0E0E0; --color-text-inverted: black; --color-base: black; @@ -167,7 +167,7 @@ html { --color-laitela--accent: white; } -.t-s11 #ui-container { /* csslint allow: empty-rules */ +body.t-s11 { /* csslint allow: empty-rules */ --color-text: #E0E0E0; --color-text-inverted: black; --color-base: black; From 7da6364525de5a61864265b6b23de6eef1a6a787 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:47:13 +0800 Subject: [PATCH 0262/1119] Fix text flickering on zalgoed subtab buttons --- javascripts/core/celestials/pelle/pelle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/celestials/pelle/pelle.js b/javascripts/core/celestials/pelle/pelle.js index 806117361..573fa3ada 100644 --- a/javascripts/core/celestials/pelle/pelle.js +++ b/javascripts/core/celestials/pelle/pelle.js @@ -268,7 +268,7 @@ export const Pelle = { // Transition text from "from" to "to", stage is 0-1, 0 is fully "from" and 1 is fully "to" // Also adds more zalgo the bigger the stage transitionText(from, to, stage = 0) { - const len = (from.length * (1 - stage) + to.length * stage); + const len = Math.round((from.length * (1 - stage) + to.length * stage) * 1e8) / 1e8; const toInterval = len * (1 - stage); let req = toInterval; let str = ""; From 694df7d49ab7b3a8ad63610e6278135f07aada2e Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:05:31 +0800 Subject: [PATCH 0263/1119] Fix bug where 0 AM generated 0.5 entropy/s --- javascripts/core/celestials/laitela/laitela.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/celestials/laitela/laitela.js b/javascripts/core/celestials/laitela/laitela.js index 271e1dd5e..f14bbe65a 100644 --- a/javascripts/core/celestials/laitela/laitela.js +++ b/javascripts/core/celestials/laitela/laitela.js @@ -52,7 +52,7 @@ export const Laitela = { }, // Note that entropy goes from 0 to 1, with 1 being completion get entropyGainPerSecond() { - return Math.clamp(Math.pow(Currency.antimatter.value.log10() / 1e11, 2), 0, 100) / 200; + return Math.clamp(Math.pow(Currency.antimatter.value.add(1).log10() / 1e11, 2), 0, 100) / 200; }, get darkMatterMultGain() { return Decimal.pow(Currency.darkMatter.value.dividedBy(this.annihilationDMRequirement) From 3383a0021b18bcd42b03b39d6fac92888d0bb571 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:08:38 +0800 Subject: [PATCH 0264/1119] Apply css scope to :root instead of body --- public/stylesheets/new-ui-styles.css | 4 ++-- public/stylesheets/styles.css | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/public/stylesheets/new-ui-styles.css b/public/stylesheets/new-ui-styles.css index 6b0f306aa..0a1762ec8 100644 --- a/public/stylesheets/new-ui-styles.css +++ b/public/stylesheets/new-ui-styles.css @@ -7,8 +7,8 @@ outline: none; } -body.t-normal, -body.t-s9 { +:root .t-normal, +:root .t-s9 { --color-text: white; --color-text-inverted: black; --color-base: #1d1b22; diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 7aaffd8e3..8e016df9a 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -24,7 +24,7 @@ html { justify-content: center; } -body { +:root { --color-text: black; --color-text-inverted: white; --color-base: #F2F2F2; @@ -67,9 +67,9 @@ body { --color-pelle-secondary: #00bcd4; } -body.t-metro, /* csslint allow: empty-rules */ -body.t-inverted-metro, -body.t-s8 { +:root .t-metro, /* csslint allow: empty-rules */ +:root .t-inverted-metro, +:root .t-s8 { --color-text: black; --color-text-inverted: white; --color-base: #eeeeee; @@ -85,7 +85,7 @@ body.t-s8 { --color-celestials: #00bcd4; } -body.t-dark { /* csslint allow: empty-rules */ +:root .t-dark { /* csslint allow: empty-rules */ --color-text: #e0e0e0; --color-text-inverted: black; --color-base: #455a64; @@ -101,7 +101,7 @@ body.t-dark { /* csslint allow: empty-rules */ --color-laitela--accent: white; } -body.t-dark-metro { /* csslint allow: empty-rules */ +:root .t-dark-metro { /* csslint allow: empty-rules */ --color-text: #e0e0e0; --color-text-inverted: black; --color-base: #455a64; @@ -123,7 +123,7 @@ body.t-dark-metro { /* csslint allow: empty-rules */ --color-laitela--accent: white; } -body.t-s1 { /* csslint allow: empty-rules */ +:root .t-s1 { /* csslint allow: empty-rules */ --color-text: black; --color-text-inverted: #dbd242; --color-base: #dbd242; @@ -143,7 +143,7 @@ body.t-s1 { /* csslint allow: empty-rules */ --color-pelle--base: #7cb727; } -body.t-s4 { /* csslint allow: empty-rules */ +:root .t-s4 { /* csslint allow: empty-rules */ --color-text: black; --color-text-inverted: white; --color-base: #1b00ff; @@ -152,8 +152,8 @@ body.t-s4 { /* csslint allow: empty-rules */ --color-bad: #ff0000; } -body.t-s6, /* csslint allow: empty-rules */ -body.t-s10 { +:root .t-s6, /* csslint allow: empty-rules */ +:root .t-s10 { --color-text: #E0E0E0; --color-text-inverted: black; --color-base: black; @@ -167,7 +167,7 @@ body.t-s10 { --color-laitela--accent: white; } -body.t-s11 { /* csslint allow: empty-rules */ +:root .t-s11 { /* csslint allow: empty-rules */ --color-text: #E0E0E0; --color-text-inverted: black; --color-base: black; From 2bfd8c254c6101d25e624cf1ca40a879c2ec002e Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Thu, 28 Apr 2022 19:55:42 +0700 Subject: [PATCH 0265/1119] Fancy TT Shop panel --- public/stylesheets/styles.css | 10 ++++------ .../time-studies/tt-shop/TimeTheoremShop.vue | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index c0b485c49..607b43b31 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -317,6 +317,7 @@ button:focus { flex-direction: row; justify-content: space-between; align-items: stretch; + transition: all 0.25s ease-out; } .ttbuttons-top-row { @@ -454,7 +455,8 @@ button:focus { font-size: 2.1rem; width: 2.5rem; height: 2.5rem; - margin-left: -0.2rem + margin-left: -0.2rem; + cursor: pointer; } .t-s6 .ttshop-minimize-btn, @@ -468,10 +470,6 @@ button:focus { color: #3AACD6; } -.ttshop-minimize-btn span { - transition: all 0.25s ease-out; -} - .c-ttshop__save-load-text { font-size: 10px; } @@ -496,7 +494,7 @@ button:focus { transition-duration: 0.2s; border-radius: 0.4rem; font-size: 1.65rem; - position:relative; + position: relative; } /*#region tab buttons*/ diff --git a/src/components/tabs/time-studies/tt-shop/TimeTheoremShop.vue b/src/components/tabs/time-studies/tt-shop/TimeTheoremShop.vue index 81d92491e..eb33e2a7e 100644 --- a/src/components/tabs/time-studies/tt-shop/TimeTheoremShop.vue +++ b/src/components/tabs/time-studies/tt-shop/TimeTheoremShop.vue @@ -63,12 +63,18 @@ export default { }, minimizeArrowStyle() { return { - transform: this.minimized ? "rotateX(180deg)" : "", + transform: this.minimized ? "rotate(-180deg)" : "", + transition: "all 0.25s ease-out" }; }, saveLoadText() { return this.$viewModel.shiftDown ? "Save:" : "Load:"; }, + shopBottomRowHeightStyle() { + return { + height: this.hasTTAutobuyer ? "6.7rem" : "4.4rem", + }; + } }, watch: { isAutobuyerOn(newValue) { @@ -166,6 +172,7 @@ export default {
+
diff --git a/src/components/tabs/glyphs/CurrentGlyphEffects.vue b/src/components/tabs/glyphs/CurrentGlyphEffects.vue index 5f764a59d..8a0329272 100644 --- a/src/components/tabs/glyphs/CurrentGlyphEffects.vue +++ b/src/components/tabs/glyphs/CurrentGlyphEffects.vue @@ -58,8 +58,7 @@ export default { return this.pelleChaosEffect.isUnlocked && !this.noEffects; }, chaosEffect() { - return `${this.pelleChaosEffect.description - .replace("{value}", formatX(this.pelleChaosEffect[Pelle.activeGlyphType], 2))}`; + return this.pelleChaosEffect.description; }, }, watch: { From 45f64ad33dc36ecb20439fe225bb8f2f8a73ca44 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 28 Apr 2022 11:24:27 +0800 Subject: [PATCH 0269/1119] Address PR feedback That comment that was never finished No display on non-special cel7 glyphs Fix removed space --- javascripts/core/celestials/pelle/pelle.js | 3 ++- public/stylesheets/glyphs.css | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/javascripts/core/celestials/pelle/pelle.js b/javascripts/core/celestials/pelle/pelle.js index f974fdb2d..0818eb5ca 100644 --- a/javascripts/core/celestials/pelle/pelle.js +++ b/javascripts/core/celestials/pelle/pelle.js @@ -197,10 +197,11 @@ export const Pelle = { case "companion": return `You feel ${formatPercents(0.34)} better`; // Undefined means that there is no glyph equipped, needs to be here since this function is used in + // both Current Glyph Effects and Glyph Tooltip case undefined: return "No glyph equipped!"; default: - return `${type.capitalize()} glyphs have no special effect in Doomed.`; + return ""; } }, diff --git a/public/stylesheets/glyphs.css b/public/stylesheets/glyphs.css index e6fadd644..ba750724c 100644 --- a/public/stylesheets/glyphs.css +++ b/public/stylesheets/glyphs.css @@ -774,7 +774,7 @@ border-radius: 0.5rem; } -.pelle-current-glyph-effects{ +.pelle-current-glyph-effects { color: var(--color-pelle--base); } From ab24a0157da920f4c7fd473a4b013c2867dd5436 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sat, 30 Apr 2022 11:33:50 +0800 Subject: [PATCH 0270/1119] Can use css vars outside ui-container after recent PR --- public/stylesheets/glyphs.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/stylesheets/glyphs.css b/public/stylesheets/glyphs.css index ba750724c..f1baad9b8 100644 --- a/public/stylesheets/glyphs.css +++ b/public/stylesheets/glyphs.css @@ -779,8 +779,7 @@ } .c-glyph-tooltip .pelle-current-glyph-effects { - /* Can't use css variables on components outside of ui-container */ - color: crimson; + color: var(--color-pelle--base); font-weight: bold; } From d8d62a0d0d39d42cd82fbe2cabf4ce6294fbd1fc Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sat, 30 Apr 2022 18:01:34 +0800 Subject: [PATCH 0271/1119] Move modal confirmation toggle to text Avoids confusion with the cancel button, is now inline and says "Don't show again" --- public/stylesheets/styles.css | 44 +++++++++++-------- .../modals/ModalConfirmationCheck.vue | 27 ++++++------ src/components/modals/ModalWrapperChoice.vue | 14 +++--- 3 files changed, 45 insertions(+), 40 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 789f13314..be393e5ca 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -5196,52 +5196,53 @@ screen and (max-width: 480px) { } .c-modal__confirmation-toggle { - display: flex; + cursor: pointer; +} + +.c-modal__confirmation-toggle__checkbox { + display: inline-flex; + vertical-align: middle; justify-content: center; align-items: center; background: var(--color-gh-purple); - font-size: 1.9rem; - height: 3rem; - width: 3rem; + font-size: 1.3rem; + height: 2rem; + width: 2rem; border: 0.3rem solid black; - border-top-right-radius: 0.3rem; - border-bottom-left-radius: 1rem; + border-radius: 0.3rem; color: black; - cursor: pointer; user-select: none; transition-duration: 0.2s; - position: absolute; - top: -0.3rem; - right: -0.3rem; + position: relative; } -.c-modal__confirmation-toggle:hover { - transform: scale(1.1) translate(-0.15rem, 0.15rem); -} - -.s-base--metro .c-modal__confirmation-toggle { +.s-base--metro .c-modal__confirmation-toggle__checkbox { border-radius: 0; border-width: 0.1rem; top: -0.1rem; right: -0.1rem; } -.t-s6 .c-modal__confirmation-toggle, -.t-s10 .c-modal__confirmation-toggle { +.t-s6 .c-modal__confirmation-toggle__checkbox, +.t-s10 .c-modal__confirmation-toggle__checkbox { border: 0.1rem solid #1b5e20; top: -0.1rem; right: -0.1rem; } -.t-s11 .c-modal__confirmation-toggle { +.t-s11 .c-modal__confirmation-toggle__checkbox { border-color: #e1ae18; top: -0.2rem; } -.c-modal__confirmation-toggle--active { +.c-modal__confirmation-toggle__checkbox--active { background: var(--color-good); } +.c-modal__confirmation-toggle:hover .c-modal__confirmation-toggle__checkbox { + transform: scale(1.1); +} + .c-modal__confirmation-toggle__tooltip { opacity: 0; transition-duration: 0.2s; @@ -5301,6 +5302,11 @@ screen and (max-width: 480px) { margin-bottom: -0.7rem; } +.c-modal__confirmation-toggle__text { + vertical-align: middle; + opacity: 0.7; +} + .c-modal__confirm-btn { background-color: var(--color-good) !important; } diff --git a/src/components/modals/ModalConfirmationCheck.vue b/src/components/modals/ModalConfirmationCheck.vue index d51fbf844..512bbdf99 100644 --- a/src/components/modals/ModalConfirmationCheck.vue +++ b/src/components/modals/ModalConfirmationCheck.vue @@ -18,8 +18,8 @@ export default { }, confirmationClass() { return { - "c-modal__confirmation-toggle": true, - "c-modal__confirmation-toggle--active": this.setting + "c-modal__confirmation-toggle__checkbox": true, + "c-modal__confirmation-toggle__checkbox--active": !this.setting }; }, tooltipText() { @@ -40,19 +40,20 @@ export default { diff --git a/src/components/modals/ModalWrapperChoice.vue b/src/components/modals/ModalWrapperChoice.vue index 638a7b279..c8f2e00c9 100644 --- a/src/components/modals/ModalWrapperChoice.vue +++ b/src/components/modals/ModalWrapperChoice.vue @@ -59,14 +59,7 @@ export default { + + \ No newline at end of file From 72abc320007191e09412cbf41daf79b22fe86e83 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Sat, 30 Apr 2022 13:59:49 +0700 Subject: [PATCH 0276/1119] Cel 6 (singularity cap button hovering) - Stop hover action when the cap increase/decrease is not available --- public/stylesheets/styles.css | 7 +++++-- src/components/tabs/celestial-laitela/SingularityPane.vue | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 66da41091..8125c1017 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -8129,7 +8129,6 @@ kbd { margin-bottom: 1rem; border: 0.2rem solid var(--color-laitela--accent); border-radius: .5rem; - cursor: pointer; font-family: Typewriter; font-size: 1.1rem; font-weight: bold; @@ -8141,7 +8140,11 @@ kbd { border-radius: 0; } -.c-laitela-singularity__cap-control:hover { +.c-laitela-singularity__cap-control-available { + cursor: pointer; +} + +.c-laitela-singularity__cap-control-available:hover { color: var(--color-laitela--base); background: var(--color-laitela--accent); } diff --git a/src/components/tabs/celestial-laitela/SingularityPane.vue b/src/components/tabs/celestial-laitela/SingularityPane.vue index 96bd33f59..f502e2b8b 100644 --- a/src/components/tabs/celestial-laitela/SingularityPane.vue +++ b/src/components/tabs/celestial-laitela/SingularityPane.vue @@ -135,6 +135,7 @@ export default {
+
+
+ + Collapse Study ID list Shorthands + +
From dd0ba847041e16e7d90e94ba861cd45831d1b0fd Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 5 May 2022 20:42:49 +0800 Subject: [PATCH 0357/1119] Remove all auto study string formatting --- javascripts/core/time-studies/time-study-tree.js | 5 ----- src/components/modals/StudyStringModal.vue | 4 ++-- .../tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/javascripts/core/time-studies/time-study-tree.js b/javascripts/core/time-studies/time-study-tree.js index d6327cc6d..3a5e14268 100644 --- a/javascripts/core/time-studies/time-study-tree.js +++ b/javascripts/core/time-studies/time-study-tree.js @@ -109,11 +109,6 @@ export class TimeStudyTree { } static formatStudyList(input) { - const internal = input.toLowerCase().replaceAll(" ", ""); - return internal.replaceAll(",", ", ").replace("|", " | "); - } - - static collapseStudyShorthands(input) { let internal = input.replaceAll(" ", ""); // \\b means 0-width word boundry, meaning "target = 11" doesnt match 111 const testRegex = target => new RegExp(`\\b${target}\\b,?`, "gu"); diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index 567146b58..aee83ad80 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -134,7 +134,7 @@ export default { else this.savePreset(); }, convertInputShorthands() { - this.input = TimeStudyTree.collapseStudyShorthands(this.input); + this.input = TimeStudyTree.formatStudyList(this.input); }, importTree() { if (!this.inputIsValid) return; @@ -146,7 +146,7 @@ export default { }, savePreset() { if (this.inputIsValid) { - player.timestudy.presets[this.modalConfig.id].studies = TimeStudyTree.formatStudyList(this.input); + player.timestudy.presets[this.modalConfig.id].studies = this.input; GameUI.notify.eternity(`Study Tree ${this.name} successfully edited.`); this.emitClose(); } diff --git a/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue b/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue index ac1919924..3bddf7093 100644 --- a/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue +++ b/src/components/tabs/time-studies/tt-shop/TimeStudySaveLoadButton.vue @@ -35,7 +35,7 @@ export default { }, save() { this.hideContextMenu(); - this.preset.studies = TimeStudyTree.formatStudyList(GameCache.currentStudyTree.value.exportString); + this.preset.studies = GameCache.currentStudyTree.value.exportString; const presetName = this.name ? `Study preset "${this.name}"` : "Study preset"; GameUI.notify.eternity(`${presetName} saved in slot ${this.saveslot}`); }, From 66d00bcf6f64c6bd94c52a62e8c98f7b9d742de4 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 5 May 2022 22:26:59 +0800 Subject: [PATCH 0358/1119] Add back missing toLowerCase brain farted --- javascripts/core/time-studies/time-study-tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/time-studies/time-study-tree.js b/javascripts/core/time-studies/time-study-tree.js index 3a5e14268..b994426c0 100644 --- a/javascripts/core/time-studies/time-study-tree.js +++ b/javascripts/core/time-studies/time-study-tree.js @@ -109,7 +109,7 @@ export class TimeStudyTree { } static formatStudyList(input) { - let internal = input.replaceAll(" ", ""); + let internal = input.toLowerCase().replaceAll(" ", ""); // \\b means 0-width word boundry, meaning "target = 11" doesnt match 111 const testRegex = target => new RegExp(`\\b${target}\\b,?`, "gu"); // If the studylist has all IDs, replace the first instance with the shorthand, then remove the rest From 957c7b124304c176209d2e113432ab782ab7c2d6 Mon Sep 17 00:00:00 2001 From: L4R5W <66326188+L4R5W@users.noreply.github.com> Date: Thu, 19 May 2022 12:14:51 +0200 Subject: [PATCH 0359/1119] keep infinity broken on eternity in doomed (#2607) --- javascripts/core/eternity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/eternity.js b/javascripts/core/eternity.js index 0475eb0cc..07bf10b35 100644 --- a/javascripts/core/eternity.js +++ b/javascripts/core/eternity.js @@ -89,7 +89,7 @@ export function eternity(force, auto, specialConditions = {}) { initializeChallengeCompletions(); initializeResourcesAfterEternity(); - if (!EternityMilestone.keepAutobuyers.isReached) { + if (!EternityMilestone.keepAutobuyers.isReached && !(Pelle.isDoomed && PelleUpgrade.keepAutobuyers.canBeApplied)) { // Fix infinity because it can only break after big crunch autobuyer interval is maxed player.break = false; } From eb4b7acca14625800a3b63bffcf609f041a25cd1 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 19 May 2022 18:26:19 +0800 Subject: [PATCH 0360/1119] Codefactor likes my import statements now --- javascripts/core/devtools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/core/devtools.js b/javascripts/core/devtools.js index 44b92d59b..3b4e0d497 100644 --- a/javascripts/core/devtools.js +++ b/javascripts/core/devtools.js @@ -1,7 +1,7 @@ import { sha512_256 } from "js-sha512"; -import FullScreenAnimationHandler from "./full-screen-animation-handler"; import { DC } from "./constants"; +import FullScreenAnimationHandler from "./full-screen-animation-handler"; /* eslint-disable no-console */ // Disabling no-console here seems From 6f80704e421bc1af9016e9ab250fd5ea100110b7 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Sat, 30 Apr 2022 21:20:32 +0700 Subject: [PATCH 0361/1119] Force re-render alchemy chart on toggle all --- src/components/tabs/alchemy/AlchemyTab.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/tabs/alchemy/AlchemyTab.vue b/src/components/tabs/alchemy/AlchemyTab.vue index 989f7706d..95e63b064 100644 --- a/src/components/tabs/alchemy/AlchemyTab.vue +++ b/src/components/tabs/alchemy/AlchemyTab.vue @@ -162,6 +162,7 @@ export default { reaction.isActive = false; } } + this.$forceUpdate(); } } }; From 50600e7c5edc99b9a4ff3631e7ceb2dde19981ab Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sat, 30 Apr 2022 22:57:28 +0800 Subject: [PATCH 0362/1119] Remove $forceUpdate, implement better-ish solution --- src/components/tabs/alchemy/AlchemyTab.vue | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/components/tabs/alchemy/AlchemyTab.vue b/src/components/tabs/alchemy/AlchemyTab.vue index 95e63b064..e3b10eddd 100644 --- a/src/components/tabs/alchemy/AlchemyTab.vue +++ b/src/components/tabs/alchemy/AlchemyTab.vue @@ -21,6 +21,7 @@ export default { alchemyCap: 0, capFactor: 0, createdRealityGlyph: false, + allReactionsDisabled: false }; }, computed: { @@ -46,6 +47,12 @@ export default { "tutorial--glow": !this.createdRealityGlyph }; }, + reactions() { + return AlchemyReactions.all.compact().filter(r => r._product.isUnlocked); + } + }, + created() { + this.updateReactionData(); }, methods: { update() { @@ -79,6 +86,7 @@ export default { } if (resource.isBaseResource) return; resource.reaction.isActive = !resource.reaction.isActive; + this.updateReactionData(); GameUI.update(); }, isUnlocked(reactionArrow) { @@ -151,18 +159,22 @@ export default { Modal.h2p.show(); }, toggleAllReactions() { - const reactions = AlchemyReactions.all.compact().filter(r => r._product.isUnlocked); - const allReactionsDisabled = reactions.every(reaction => !reaction.isActive); - if (allReactionsDisabled) { - for (const reaction of reactions) { + if (this.allReactionsDisabled) { + for (const reaction of this.reactions) { reaction.isActive = true; } } else { - for (const reaction of reactions) { + for (const reaction of this.reactions) { reaction.isActive = false; } } - this.$forceUpdate(); + // This is moreso here to force an update than anything but it also adds some info to the "Toggle all reactions" + // button, since its behaviour is unclear to the player- Would it want to disable/enable all if only some were on? + // This switches it to outright say disabled/enabled instead of toggle and also updates the reaction path colours + this.updateReactionData(); + }, + updateReactionData() { + this.allReactionsDisabled = this.reactions.every(reaction => !reaction.isActive); } } }; @@ -181,7 +193,7 @@ export default { class="o-primary-btn--subtab-option" @click="toggleAllReactions" > - Toggle all reactions + {{ allReactionsDisabled ? "Enable" : "Disable" }} all reactions Date: Tue, 3 May 2022 19:20:53 +0700 Subject: [PATCH 0363/1119] Address PR feedbacks --- src/components/tabs/alchemy/AlchemyTab.vue | 25 +++++----------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/components/tabs/alchemy/AlchemyTab.vue b/src/components/tabs/alchemy/AlchemyTab.vue index e3b10eddd..9919ad40e 100644 --- a/src/components/tabs/alchemy/AlchemyTab.vue +++ b/src/components/tabs/alchemy/AlchemyTab.vue @@ -48,12 +48,9 @@ export default { }; }, reactions() { - return AlchemyReactions.all.compact().filter(r => r._product.isUnlocked); + return AlchemyReactions.all.compact().filter(r => r.product.isUnlocked); } }, - created() { - this.updateReactionData(); - }, methods: { update() { this.reactionsAvailable = AlchemyResources.all.filter(res => !res.isBaseResource && res.isUnlocked).length !== 0; @@ -62,6 +59,7 @@ export default { this.alchemyCap = Ra.alchemyResourceCap; this.capFactor = 1 / GlyphSacrificeHandler.glyphRefinementEfficiency; this.createdRealityGlyph = player.reality.glyphs.createdRealityGlyph; + this.allReactionsDisabled = this.reactions.every(reaction => !reaction.isActive); }, orbitSize(orbit) { const maxRadius = this.layout.orbits.map(o => o.radius).max(); @@ -86,7 +84,6 @@ export default { } if (resource.isBaseResource) return; resource.reaction.isActive = !resource.reaction.isActive; - this.updateReactionData(); GameUI.update(); }, isUnlocked(reactionArrow) { @@ -159,23 +156,11 @@ export default { Modal.h2p.show(); }, toggleAllReactions() { - if (this.allReactionsDisabled) { - for (const reaction of this.reactions) { - reaction.isActive = true; - } - } else { - for (const reaction of this.reactions) { - reaction.isActive = false; - } + const setIsActive = this.allReactionsDisabled; + for (const reaction of this.reactions) { + reaction.isActive = setIsActive; } - // This is moreso here to force an update than anything but it also adds some info to the "Toggle all reactions" - // button, since its behaviour is unclear to the player- Would it want to disable/enable all if only some were on? - // This switches it to outright say disabled/enabled instead of toggle and also updates the reaction path colours - this.updateReactionData(); }, - updateReactionData() { - this.allReactionsDisabled = this.reactions.every(reaction => !reaction.isActive); - } } }; From 94c4014e7a02c876368390575a525e085128f249 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Wed, 4 May 2022 23:54:19 +0700 Subject: [PATCH 0364/1119] Improve design of Reality Glyph creation modal --- .../modals/RealityGlyphCreationModal.vue | 85 +++++++++++-------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/src/components/modals/RealityGlyphCreationModal.vue b/src/components/modals/RealityGlyphCreationModal.vue index 76f5a0925..8702bf625 100644 --- a/src/components/modals/RealityGlyphCreationModal.vue +++ b/src/components/modals/RealityGlyphCreationModal.vue @@ -51,44 +51,59 @@ export default { + + \ No newline at end of file From be1a7de3bf5a5bfd625890609e941db8a7056490 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Thu, 5 May 2022 18:59:03 +0700 Subject: [PATCH 0365/1119] Adjust layout for consistency --- public/stylesheets/styles.css | 2 -- src/components/modals/RealityGlyphCreationModal.vue | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 1eb4d4f27..a56ed48de 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -7768,8 +7768,6 @@ kbd { display: flex; flex-direction: column; width: 60rem; - text-align: left; - font-size: 1.2rem; padding: 0.25rem 1rem; } diff --git a/src/components/modals/RealityGlyphCreationModal.vue b/src/components/modals/RealityGlyphCreationModal.vue index 8702bf625..dbf50de26 100644 --- a/src/components/modals/RealityGlyphCreationModal.vue +++ b/src/components/modals/RealityGlyphCreationModal.vue @@ -64,7 +64,7 @@ export default { Reality Glyphs can also be sacrificed to increase the yield from alchemy reactions. Like Effarig Glyphs, you cannot equip more than one at the same time. -
+
Available Effects:
@@ -83,7 +83,6 @@ export default { Create a Reality Glyph! @@ -99,7 +98,7 @@ export default { \ No newline at end of file + diff --git a/src/components/modals/PopupModal.vue b/src/components/modals/PopupModal.vue index c831348cb..17ae175f8 100644 --- a/src/components/modals/PopupModal.vue +++ b/src/components/modals/PopupModal.vue @@ -35,6 +35,7 @@ export default {
diff --git a/src/components/modals/ReplaceGlyphModal.vue b/src/components/modals/ReplaceGlyphModal.vue index 7ab57cedb..49af966dc 100644 --- a/src/components/modals/ReplaceGlyphModal.vue +++ b/src/components/modals/ReplaceGlyphModal.vue @@ -7,21 +7,25 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + targetSlot: { + type: Number, + required: true + }, + inventoryIndex: { + type: Number, required: true } }, data() { return { - targetSlot: 0, + target: 0, idx: 0, }; }, methods: { update() { - this.targetSlot = this.modalConfig.targetSlot; - this.idx = this.modalConfig.inventoryIndex; + this.target = this.targetSlot; + this.idx = this.inventoryIndex; this.glyph = Glyphs.findByInventoryIndex(this.idx); }, handleYesClick() { diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index aee83ad80..072c284a4 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -13,8 +13,8 @@ export default { PrimaryButton }, props: { - modalConfig: { - type: Object, + id: { + type: Number, required: true, } }, @@ -28,7 +28,7 @@ export default { // This modal is used by both study importing and preset editing but only has a prop actually passed in when // editing (which is the preset index). Needs to be an undefined check because index can be zero isImporting() { - return this.modalConfig.id === undefined; + return this.id === undefined; }, // This represents the state reached from importing into an empty tree importedTree() { @@ -121,7 +121,7 @@ export default { }, // Needs to be assigned in created() or else they will end up being undefined when importing created() { - const preset = player.timestudy.presets[this.modalConfig.id]; + const preset = player.timestudy.presets[this.id]; this.input = preset ? preset.studies : ""; this.name = preset ? preset.name : ""; }, @@ -146,7 +146,7 @@ export default { }, savePreset() { if (this.inputIsValid) { - player.timestudy.presets[this.modalConfig.id].studies = this.input; + player.timestudy.presets[this.id].studies = this.input; GameUI.notify.eternity(`Study Tree ${this.name} successfully edited.`); this.emitClose(); } diff --git a/src/components/modals/glyph-management/DeleteGlyphModal.vue b/src/components/modals/glyph-management/DeleteGlyphModal.vue index ec045a845..baaf8b86b 100644 --- a/src/components/modals/glyph-management/DeleteGlyphModal.vue +++ b/src/components/modals/glyph-management/DeleteGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + idx: { + type: Number, required: true } }, @@ -19,12 +19,12 @@ export default { }, computed: { glyph() { - return Glyphs.findByInventoryIndex(this.modalConfig.idx); + return Glyphs.findByInventoryIndex(this.idx); }, }, methods: { update() { - const newGlyph = Glyphs.findByInventoryIndex(this.modalConfig.idx); + const newGlyph = Glyphs.findByInventoryIndex(this.idx); if (this.glyph !== newGlyph && this.confirmedDelete) { // Why is confirmedDelete here: refer to SacrificeGlyphModal.vue diff --git a/src/components/modals/glyph-management/PurgeGlyphModal.vue b/src/components/modals/glyph-management/PurgeGlyphModal.vue index a6717d05a..a087018b7 100644 --- a/src/components/modals/glyph-management/PurgeGlyphModal.vue +++ b/src/components/modals/glyph-management/PurgeGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + harsh: { + type: Boolean, required: true } }, @@ -19,9 +19,6 @@ export default { }; }, computed: { - harsh() { - return this.modalConfig.harsh; - }, threshold() { return this.harsh ? 1 : 5; }, diff --git a/src/components/modals/glyph-management/RefineGlyphModal.vue b/src/components/modals/glyph-management/RefineGlyphModal.vue index 9feac2c93..cb2a72ebb 100644 --- a/src/components/modals/glyph-management/RefineGlyphModal.vue +++ b/src/components/modals/glyph-management/RefineGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + idx: { + type: Number, required: true } }, @@ -24,7 +24,7 @@ export default { }, computed: { glyph() { - return Glyphs.findByInventoryIndex(this.modalConfig.idx); + return Glyphs.findByInventoryIndex(this.idx); }, resource() { return GlyphSacrificeHandler.glyphAlchemyResource(this.glyph); @@ -43,7 +43,7 @@ export default { this.after = this.resourceAmount + this.gain; - const newGlyph = Glyphs.findByInventoryIndex(this.modalConfig.idx); + const newGlyph = Glyphs.findByInventoryIndex(this.idx); if (this.glyph !== newGlyph && !this.confirmedRefine) { // Why is confirmedRefine here: refer to SacrificeGlyphModal.vue diff --git a/src/components/modals/glyph-management/SacrificeGlyphModal.vue b/src/components/modals/glyph-management/SacrificeGlyphModal.vue index 20f3a62bd..daecc81d6 100644 --- a/src/components/modals/glyph-management/SacrificeGlyphModal.vue +++ b/src/components/modals/glyph-management/SacrificeGlyphModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + idx: { + type: Number, required: true } }, @@ -21,7 +21,7 @@ export default { }, computed: { glyph() { - return Glyphs.findByInventoryIndex(this.modalConfig.idx); + return Glyphs.findByInventoryIndex(this.idx); }, message() { return `Do you really want to sacrifice this Glyph? Your total power of sacrificed ${this.glyph.type} @@ -34,7 +34,7 @@ export default { this.currentGlyphSacrifice = player.reality.glyphs.sac[this.glyph.type]; this.gain = GlyphSacrificeHandler.glyphSacrificeGain(this.glyph); - const newGlyph = Glyphs.findByInventoryIndex(this.modalConfig.idx); + const newGlyph = Glyphs.findByInventoryIndex(this.idx); if (this.glyph !== newGlyph && !this.confirmedSacrifice) { // ConfirmedSacrifice is here because when you sac a glyph with confirmation it diff --git a/src/components/modals/prestige/AntimatterGalaxyModal.vue b/src/components/modals/prestige/AntimatterGalaxyModal.vue index 293a6c805..0bbfe8acd 100644 --- a/src/components/modals/prestige/AntimatterGalaxyModal.vue +++ b/src/components/modals/prestige/AntimatterGalaxyModal.vue @@ -7,8 +7,8 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + bulk: { + type: Number, required: true, } }, @@ -21,7 +21,6 @@ export default { }; }, computed: { - bulk() { return this.modalConfig.bulk; }, topLabel() { if (this.bulk) return `You are about to purchase ${quantifyInt("Antimatter Galaxy", this.newGalaxies)}`; return `You are about to purchase an Antimatter Galaxy`; diff --git a/src/components/modals/prestige/DimensionBoostModal.vue b/src/components/modals/prestige/DimensionBoostModal.vue index 22c3157f3..2ffed8ef7 100644 --- a/src/components/modals/prestige/DimensionBoostModal.vue +++ b/src/components/modals/prestige/DimensionBoostModal.vue @@ -7,13 +7,12 @@ export default { ModalWrapperChoice }, props: { - modalConfig: { - type: Object, + bulk: { + type: Number, required: true, } }, computed: { - bulk() { return this.modalConfig.bulk; }, topLabel() { return `You are about to do a Dimension Boost Reset`; }, diff --git a/src/components/modals/prestige/EnterCelestialsModal.vue b/src/components/modals/prestige/EnterCelestialsModal.vue index 1d248f41b..34f921385 100644 --- a/src/components/modals/prestige/EnterCelestialsModal.vue +++ b/src/components/modals/prestige/EnterCelestialsModal.vue @@ -9,20 +9,24 @@ export default { EnterCelestialsRaPet, }, props: { - modalConfig: { - type: Object, + number: { + type: Number, required: true, + }, + name: { + type: String, + required: true } }, computed: { description() { - return GameDatabase.celestials.descriptions[this.modalConfig.number].description().split("\n"); + return GameDatabase.celestials.descriptions[this.number].description().split("\n"); }, topLabel() { - return `${this.modalConfig.name} Reality`; + return `${this.name} Reality`; }, message() { - return `Perform a Reality reset, and enter ${this.modalConfig.name} Reality, in which`; + return `Perform a Reality reset, and enter ${this.name} Reality, in which`; }, }, methods: { @@ -37,7 +41,7 @@ export default { const laitelaFastest = player.celestials.laitela.fastestCompletion; const laitalaTime = TimeSpan.fromSeconds(laitelaFastest).toStringShort(); - switch (this.modalConfig.number) { + switch (this.number) { case 0: return `Your highest Teresa completetion was for ${format(teresaBestAM, 2, 2)} antimatter, gaining you a ${formatX(teresaRunMult, 2)} multiplier to Glyph Sacrifice power.`; case 1: return `${effarigDone @@ -64,7 +68,7 @@ export default { }, handleYesClick() { beginProcessReality(getRealityProps(true)); - switch (this.modalConfig.number) { + switch (this.number) { case 0: return Teresa.initializeRun(); case 1: return Effarig.initializeRun(); case 2: return Enslaved.initializeRun(); @@ -95,7 +99,7 @@ export default {
{{ extraLine() }}
- + Date: Mon, 16 May 2022 12:13:17 -0700 Subject: [PATCH 0367/1119] remove excess $viewModel and convert rest to props --- javascripts/core/app/modal.js | 3 +-- .../modals/DeleteAutomatorScriptModal.vue | 5 ----- .../challenges/EternityChallengeStartModal.vue | 13 ++++++++----- .../challenges/InfinityChallengeStartModal.vue | 15 +++++++++------ .../challenges/NormalChallengeStartModal.vue | 13 ++++++++----- .../DeleteCompanionGlyphModal.vue | 3 --- .../modals/prestige/EnterDilationModal.vue | 3 --- 7 files changed, 26 insertions(+), 29 deletions(-) diff --git a/javascripts/core/app/modal.js b/javascripts/core/app/modal.js index faaf3ad85..4b881e243 100644 --- a/javascripts/core/app/modal.js +++ b/javascripts/core/app/modal.js @@ -132,8 +132,7 @@ export class Modal { class ChallengeConfirmationModal extends Modal { show(id) { - this.id = id; - super.show(); + super.show({ id }); } } diff --git a/src/components/modals/DeleteAutomatorScriptModal.vue b/src/components/modals/DeleteAutomatorScriptModal.vue index b8ed75570..e9e6e4ba1 100644 --- a/src/components/modals/DeleteAutomatorScriptModal.vue +++ b/src/components/modals/DeleteAutomatorScriptModal.vue @@ -12,11 +12,6 @@ export default { required: true } }, - computed: { - modal() { - return this.$viewModel.modal.current; - }, - }, methods: { handleYesClick() { const script = this.scriptID; diff --git a/src/components/modals/challenges/EternityChallengeStartModal.vue b/src/components/modals/challenges/EternityChallengeStartModal.vue index 38e108bc3..7ebbd5827 100644 --- a/src/components/modals/challenges/EternityChallengeStartModal.vue +++ b/src/components/modals/challenges/EternityChallengeStartModal.vue @@ -6,16 +6,19 @@ export default { components: { ModalWrapperChoice }, + props: { + id: { + type: Number, + required: true + } + }, computed: { challenge() { - return EternityChallenge(this.modal.id); + return EternityChallenge(this.id); }, challengeIsCompleted() { return this.challenge.isFullyCompleted; }, - modal() { - return this.$viewModel.modal.current; - }, message() { return `You will Eternity, if possible, and start a new Eternity within the Challenge, with all the Challenge-specific restrictions and modifiers active. @@ -25,7 +28,7 @@ export default { ${formatInt(5)} times, with increasing goals and bonuses.`; }, entranceLabel() { - return `You are about to enter Eternity Challenge ${this.modal.id}`; + return `You are about to enter Eternity Challenge ${this.id}`; }, reward() { let rewardDescription = this.challenge._config.reward.description; diff --git a/src/components/modals/challenges/InfinityChallengeStartModal.vue b/src/components/modals/challenges/InfinityChallengeStartModal.vue index 4e725aa3b..12f8b6a38 100644 --- a/src/components/modals/challenges/InfinityChallengeStartModal.vue +++ b/src/components/modals/challenges/InfinityChallengeStartModal.vue @@ -6,26 +6,29 @@ export default { components: { ModalWrapperChoice }, + props: { + id: { + type: Number, + required: true + } + }, computed: { challenge() { - return InfinityChallenge(this.modal.id); + return InfinityChallenge(this.id); }, challengeIsCompleted() { return this.challenge.isCompleted; }, - modal() { - return this.$viewModel.modal.current; - }, message() { return `You will Big Crunch, if possible, and start a new Infinity within the Challenge, with all the Challenge-specific restrictions and modifiers active. To complete the Challenge${this.challengeIsCompleted ? "" : " and gain its reward"}, you must reach the Challenge goal of - ${format(InfinityChallenge(this.modal.id).goal)} Antimatter. + ${format(InfinityChallenge(this.id).goal)} Antimatter. You do not start with any Dimension Boosts or Galaxies, regardless of upgrades.`; }, entranceLabel() { - return `You are about to enter Infinity Challenge ${this.modal.id}`; + return `You are about to enter Infinity Challenge ${this.id}`; }, reward() { let rewardDescription = this.challenge._config.reward.description; diff --git a/src/components/modals/challenges/NormalChallengeStartModal.vue b/src/components/modals/challenges/NormalChallengeStartModal.vue index 3b22d2da6..38f965994 100644 --- a/src/components/modals/challenges/NormalChallengeStartModal.vue +++ b/src/components/modals/challenges/NormalChallengeStartModal.vue @@ -6,16 +6,19 @@ export default { components: { ModalWrapperChoice }, + props: { + id: { + type: Number, + required: true + } + }, computed: { challenge() { - return NormalChallenge(this.modal.id); + return NormalChallenge(this.id); }, challengeIsCompleted() { return this.challenge.isCompleted; }, - modal() { - return this.$viewModel.modal.current; - }, message() { return `You will Big Crunch, if possible, and start a new Infinity within the Challenge, with all the Challenge-specific restrictions and modifiers active. @@ -24,7 +27,7 @@ export default { You do not start with any Dimension Boosts or Galaxies, regardless of upgrades.`; }, entranceLabel() { - return `You are about to enter Challenge ${this.modal.id}`; + return `You are about to enter Challenge ${this.id}`; }, reward() { return `The reward for completing this challenge is: ${this.challenge._config.reward}`; diff --git a/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue b/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue index f406af7f3..eb3828711 100644 --- a/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue +++ b/src/components/modals/glyph-management/DeleteCompanionGlyphModal.vue @@ -12,9 +12,6 @@ export default { }; }, computed: { - modal() { - return this.$viewModel.modal.current; - }, message() { switch (this.messageIndex) { case 0: return "Are you sure you want to get rid of your Companion Glyph?"; diff --git a/src/components/modals/prestige/EnterDilationModal.vue b/src/components/modals/prestige/EnterDilationModal.vue index daf1cac5c..ef5375d74 100644 --- a/src/components/modals/prestige/EnterDilationModal.vue +++ b/src/components/modals/prestige/EnterDilationModal.vue @@ -7,9 +7,6 @@ export default { ModalWrapperChoice }, computed: { - modal() { - return this.$viewModel.modal.current; - }, message() { return `Dilating time will start a new Eternity, and all Dimension multiplier's exponents and tickspeed multiplier's exponent will be reduced to ${formatPow(0.75, 2, 2)}. If you can Eternity while Dilated, From c0877fb30807f0ae4298b5ac2943fb8fbb4ba8d0 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 19 May 2022 22:18:37 +0800 Subject: [PATCH 0368/1119] Add info to tell users what "collapse shorthands" does, subject to change by future tweaks to its functionality --- src/components/modals/StudyStringModal.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index aee83ad80..dcf4b0a9c 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -223,8 +223,13 @@ export default {

- - Collapse Study ID list Shorthands + + Format String and Collapse Shorthands
\ No newline at end of file diff --git a/src/components/modals/CreditsModal.vue b/src/components/modals/CreditsModal.vue index 9b82e3ebb..d14c51a46 100644 --- a/src/components/modals/CreditsModal.vue +++ b/src/components/modals/CreditsModal.vue @@ -1,21 +1,14 @@ @@ -438,25 +465,31 @@ export default { :key="x" :style="glyphEffectIcon(x)" /> +
+ × +
-
+
From 81c9ac6bf9a5c276cc0e53ca850d9cadf3d2481c Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 19 May 2022 23:02:57 -0500 Subject: [PATCH 0387/1119] Minor lag reduction on glyph tab --- javascripts/core/cache.js | 2 + .../core/glyphs/glyph-purge-handler.js | 7 +++ src/components/GlyphComponent.vue | 59 ++++++++++--------- .../tabs/glyphs/CurrentGlyphEffects.vue | 9 ++- 4 files changed, 43 insertions(+), 34 deletions(-) diff --git a/javascripts/core/cache.js b/javascripts/core/cache.js index 76a014622..0c3bcee92 100644 --- a/javascripts/core/cache.js +++ b/javascripts/core/cache.js @@ -96,6 +96,8 @@ export const GameCache = { glyphEffects: new Lazy(() => orderedEffectList.mapToObject(k => k, k => getAdjustedGlyphEffectUncached(k))), + logTotalGlyphSacrifice: new Lazy(() => GlyphSacrificeHandler.logTotalSacrifice), + totalIPMult: new Lazy(() => totalIPMult()), challengeTimeSum: new Lazy(() => player.challenge.normal.bestTimes.sum()), diff --git a/javascripts/core/glyphs/glyph-purge-handler.js b/javascripts/core/glyphs/glyph-purge-handler.js index 618310a5c..4f0d64200 100644 --- a/javascripts/core/glyphs/glyph-purge-handler.js +++ b/javascripts/core/glyphs/glyph-purge-handler.js @@ -2,6 +2,12 @@ export const GlyphSacrificeHandler = { // Anything scaling on sacrifice caps at this value, even though the actual sacrifice values can go higher maxSacrificeForEffects: 1e100, + // This is used for glyph UI-related things in a few places, but is handled here as a getter which is only called + // sparingly - that is, whenever the cache is invalidated after a glyph is sacrificed. Thus it only gets recalculated + // when glyphs are actually sacrificed, rather than every render cycle. + get logTotalSacrifice() { + return BASIC_GLYPH_TYPES.reduce((tot, type) => tot + Math.log10(player.reality.glyphs.sac[type]), 0); + }, get canSacrifice() { return RealityUpgrade(19).isBought; }, @@ -50,6 +56,7 @@ export const GlyphSacrificeHandler = { return; } player.reality.glyphs.sac[glyph.type] += toGain; + GameCache.logTotalGlyphSacrifice.invalidate(); Glyphs.removeFromInventory(glyph); EventHub.dispatch(GAME_EVENT.GLYPH_SACRIFICED, glyph); }, diff --git a/src/components/GlyphComponent.vue b/src/components/GlyphComponent.vue index e389157cc..cb456f00f 100644 --- a/src/components/GlyphComponent.vue +++ b/src/components/GlyphComponent.vue @@ -93,12 +93,9 @@ export default { uncappedRefineReward: 0, refineReward: 0, displayLevel: 0, - isRealityGlyph: false, - isCursedGlyph: false, - glyphEffects: [], // We use this to not create a ton of tooltip components as soon as the glyph tab loads. tooltipLoaded: false, - logGlyphSacrifice: 0 + logTotalSacrifice: 0 }; }, computed: { @@ -197,32 +194,9 @@ export default { return ""; } }, - }, - watch: { - logGlyphSacrifice() { - this.tooltipLoaded = false; - if (this.isCurrentTooltip) this.showTooltip(); - } - }, - created() { - this.$on("tooltip-touched", () => this.hideTooltip()); - }, - beforeDestroy() { - if (this.isCurrentTooltip) this.hideTooltip(); - if (this.$viewModel.draggingUIID === this.componentID) this.$viewModel.draggingUIID = -1; - }, - methods: { - update() { - this.isRealityGlyph = this.glyph.type === "reality"; - this.isCursedGlyph = this.glyph.type === "cursed"; - this.glyphEffects = this.extractGlyphEffects(); - this.showGlyphEffectDots = player.options.showHintText.glyphEffectDots; - this.logGlyphSacrifice = BASIC_GLYPH_TYPES - .reduce((tot, type) => tot + Math.log10(player.reality.glyphs.sac[type]), 0); - }, // This finds all the effects of a glyph and shifts all their IDs so that type's lowest-ID effect is 0 and all // other effects count up to 3 (or 6 for effarig). Used to add dots in unique positions on glyphs to show effects. - extractGlyphEffects() { + glyphEffects() { let minEffectID = 0; switch (this.glyph.type) { case "time": @@ -260,6 +234,33 @@ export default { } return effectIDs; }, + isRealityGlyph() { + return this.glyph.type === "reality"; + }, + isCursedGlyph() { + return this.glyph.type === "cursed"; + }, + showGlyphEffectDots() { + return player.options.showHintText.glyphEffectDots; + } + }, + watch: { + logTotalSacrifice() { + this.tooltipLoaded = false; + if (this.isCurrentTooltip) this.showTooltip(); + } + }, + created() { + this.$on("tooltip-touched", () => this.hideTooltip()); + }, + beforeDestroy() { + if (this.isCurrentTooltip) this.hideTooltip(); + if (this.$viewModel.draggingUIID === this.componentID) this.$viewModel.draggingUIID = -1; + }, + methods: { + update() { + this.logTotalSacrifice = GameCache.logTotalGlyphSacrifice.value; + }, hideTooltip() { this.tooltipLoaded = false; this.$viewModel.tabs.reality.mouseoverGlyphInfo.type = ""; @@ -488,7 +489,7 @@ export default { :show-deletion-text="showSacrifice" :display-level="displayLevel" :component="componentID" - :change-watcher="logGlyphSacrifice" + :change-watcher="logTotalSacrifice" />
g && g.type === "effarig"); this.hasReality = Glyphs.active.some(g => g && g.type === "reality"); - this.logGlyphSacrifice = BASIC_GLYPH_TYPES - .reduce((tot, type) => tot + Math.log10(player.reality.glyphs.sac[type]), 0); + this.logTotalSacrifice = GameCache.logTotalGlyphSacrifice.value; this.pelleChaosEffect = Pelle.specialGlyphEffect; }, @@ -112,7 +111,7 @@ export default {
Date: Sat, 21 May 2022 03:30:34 -0500 Subject: [PATCH 0388/1119] Significantly reduce performance impact of glyph level calculation --- .../core/achievements/normal-achievement.js | 3 + javascripts/core/cache.js | 3 + javascripts/core/celestials/teresa.js | 3 + .../core/glyphs/auto-glyph-processor.js | 73 +++++++++++-------- .../core/glyphs/glyph-purge-handler.js | 6 +- javascripts/core/imaginary-upgrades.js | 6 ++ javascripts/core/reality-upgrades.js | 1 + .../tabs/glyphs/GlyphLevelsAndWeights.vue | 22 +++--- src/components/tabs/glyphs/RealityButton.vue | 4 +- .../tabs/glyphs/SacrificedGlyphs.vue | 22 +++--- 10 files changed, 91 insertions(+), 52 deletions(-) diff --git a/javascripts/core/achievements/normal-achievement.js b/javascripts/core/achievements/normal-achievement.js index b66955cb5..6a7f4f55f 100644 --- a/javascripts/core/achievements/normal-achievement.js +++ b/javascripts/core/achievements/normal-achievement.js @@ -68,6 +68,9 @@ class AchievementState extends GameMechanicState { Instead of the Dimensions disappearing, they stay and the Big Crunch button appears on top of them. This is purely visual, and is there to prevent flickering.`); } + if (this.id === 148 || this.id === 166) { + GameCache.staticGlyphWeights.invalidate(); + } if (auto) { GameUI.notify.reality(`Automatically unlocked: ${this.name}`); } else { diff --git a/javascripts/core/cache.js b/javascripts/core/cache.js index 0c3bcee92..8c85e8412 100644 --- a/javascripts/core/cache.js +++ b/javascripts/core/cache.js @@ -96,6 +96,8 @@ export const GameCache = { glyphEffects: new Lazy(() => orderedEffectList.mapToObject(k => k, k => getAdjustedGlyphEffectUncached(k))), + staticGlyphWeights: new Lazy(() => staticGlyphWeights()), + logTotalGlyphSacrifice: new Lazy(() => GlyphSacrificeHandler.logTotalSacrifice), totalIPMult: new Lazy(() => totalIPMult()), @@ -107,6 +109,7 @@ export const GameCache = { EventHub.logic.on(GAME_EVENT.GLYPHS_CHANGED, () => { GameCache.glyphEffects.invalidate(); + GameCache.staticGlyphWeights.invalidate(); }, GameCache.glyphEffects); GameCache.antimatterDimensionFinalMultipliers.invalidate = function() { diff --git a/javascripts/core/celestials/teresa.js b/javascripts/core/celestials/teresa.js index e33d7d3cb..04100f6b6 100644 --- a/javascripts/core/celestials/teresa.js +++ b/javascripts/core/celestials/teresa.js @@ -112,6 +112,9 @@ class PerkShopUpgradeState extends RebuyableMechanicState { } onPurchased() { + if (this.id === 0) { + GameCache.staticGlyphWeights.invalidate(); + } if (this.id === 1) { Autobuyer.reality.bumpAmount(2); } diff --git a/javascripts/core/glyphs/auto-glyph-processor.js b/javascripts/core/glyphs/auto-glyph-processor.js index df5463e27..f340eb1f6 100644 --- a/javascripts/core/glyphs/auto-glyph-processor.js +++ b/javascripts/core/glyphs/auto-glyph-processor.js @@ -183,6 +183,7 @@ function getGlyphLevelSources() { export function getGlyphLevelInputs() { const sources = getGlyphLevelSources(); + const staticFactors = GameCache.staticGlyphWeights.value; // If the nomial blend of inputs is a * b * c * d, then the contribution can be tuend by // changing the exponents on the terms: aⁿ¹ * bⁿ² * cⁿ³ * dⁿ⁴ // If n1..n4 just add up to 4, then the optimal strategy is to just max out the one over the @@ -221,10 +222,9 @@ export function getGlyphLevelInputs() { adjustFactor(sources.repl, weights.repl / 100); adjustFactor(sources.dt, weights.dt / 100); adjustFactor(sources.eternities, weights.eternities / 100); - const perkShopEffect = Effects.max(1, PerkShopUpgrade.glyphLevel); const shardFactor = Ra.unlocks.relicShardGlyphLevelBoost.effectOrDefault(0); let baseLevel = sources.ep.value * sources.repl.value * sources.dt.value * sources.eternities.value * - perkShopEffect + shardFactor; + staticFactors.perkShop + shardFactor; const singularityEffect = SingularityMilestone.glyphLevelFromSingularities.isUnlocked ? SingularityMilestone.glyphLevelFromSingularities.effectValue @@ -232,44 +232,57 @@ export function getGlyphLevelInputs() { baseLevel *= singularityEffect; let scaledLevel = baseLevel; - // With begin = 1000 and rate = 250, a base level of 2000 turns into 1500; 4000 into 2000 - const instabilityScaleBegin = Glyphs.instabilityThreshold; - const instabilityScaleRate = 500; - if (scaledLevel > instabilityScaleBegin) { - const excess = (scaledLevel - instabilityScaleBegin) / instabilityScaleRate; - scaledLevel = instabilityScaleBegin + 0.5 * instabilityScaleRate * (Math.sqrt(1 + 4 * excess) - 1); - } - const hyperInstabilityScaleBegin = Glyphs.hyperInstabilityThreshold; - const hyperInstabilityScaleRate = 400; - if (scaledLevel > hyperInstabilityScaleBegin) { - const excess = (scaledLevel - hyperInstabilityScaleBegin) / hyperInstabilityScaleRate; - scaledLevel = hyperInstabilityScaleBegin + 0.5 * hyperInstabilityScaleRate * (Math.sqrt(1 + 4 * excess) - 1); - } + // The softcap starts at begin and rate determines how quickly level scales after the cap, turning a linear pre-cap + // increase to a quadratic post-cap increase with twice the scaling. For example, with begin = 1000 and rate = 400: + // - Scaled level 1400 requires +800 more base levels from the start of the cap (ie. level 1800) + // - Scaled level 1800 requires +1600 more base levels from scaled 1400 (ie. level 3400) + // - Each additional 400 scaled requires another +800 on top of the already-existing gap for base + // This is applied twice in a stacking way, using regular instability first and then again with hyperinstability + // if the newly reduced level is still above the second threshold + const instabilitySoftcap = (level, begin, rate) => { + if (level < begin) return level; + const excess = (level - begin) / rate; + return begin + 0.5 * rate * (Math.sqrt(1 + 4 * excess) - 1); + }; + scaledLevel = instabilitySoftcap(scaledLevel, staticFactors.instability, 500); + scaledLevel = instabilitySoftcap(scaledLevel, staticFactors.hyperInstability, 400); + const scalePenalty = scaledLevel > 0 ? baseLevel / scaledLevel : 1; - const rowFactor = [Array.range(1, 5).every(x => RealityUpgrade(x).boughtAmount > 0)] - .concat(Array.range(1, 4).map(x => Array.range(1, 5).every(y => RealityUpgrade(5 * x + y).isBought))) - .filter(x => x) - .length; - const achievementFactor = Effects.sum(Achievement(148), Achievement(166)); - baseLevel += rowFactor + achievementFactor; - scaledLevel += rowFactor + achievementFactor; - // Temporary runaway prevention (?) - const levelHardcap = 1000000; - const levelCapped = scaledLevel > levelHardcap; - scaledLevel = Math.min(scaledLevel, levelHardcap); + const incAfterInstability = staticFactors.realityUpgrades + staticFactors.achievements; + baseLevel += incAfterInstability; + scaledLevel += incAfterInstability; return { ep: sources.ep, repl: sources.repl, dt: sources.dt, eter: sources.eternities, - perkShop: perkShopEffect, + perkShop: staticFactors.perkShop, scalePenalty, - rowFactor, - achievementFactor, + rowFactor: staticFactors.realityUpgrades, + achievementFactor: staticFactors.achievements, shardFactor, singularityEffect, rawLevel: baseLevel, actualLevel: Math.max(1, scaledLevel), - capped: levelCapped + }; +} + +// Calculates glyph weights which don't change over the course of a reality unless particular events occur; this is +// stored in the GameCache and only invalidated as needed +export function staticGlyphWeights() { + const perkShop = Effects.max(1, PerkShopUpgrade.glyphLevel); + const instability = Glyphs.instabilityThreshold; + const hyperInstability = Glyphs.hyperInstabilityThreshold; + const realityUpgrades = [Array.range(1, 5).every(x => RealityUpgrade(x).boughtAmount > 0)] + .concat(Array.range(1, 4).map(x => Array.range(1, 5).every(y => RealityUpgrade(5 * x + y).isBought))) + .filter(x => x) + .length; + const achievements = Effects.sum(Achievement(148), Achievement(166)); + return { + perkShop, + instability, + hyperInstability, + realityUpgrades, + achievements }; } diff --git a/javascripts/core/glyphs/glyph-purge-handler.js b/javascripts/core/glyphs/glyph-purge-handler.js index 4f0d64200..e454fd836 100644 --- a/javascripts/core/glyphs/glyph-purge-handler.js +++ b/javascripts/core/glyphs/glyph-purge-handler.js @@ -6,7 +6,11 @@ export const GlyphSacrificeHandler = { // sparingly - that is, whenever the cache is invalidated after a glyph is sacrificed. Thus it only gets recalculated // when glyphs are actually sacrificed, rather than every render cycle. get logTotalSacrifice() { - return BASIC_GLYPH_TYPES.reduce((tot, type) => tot + Math.log10(player.reality.glyphs.sac[type]), 0); + // We check elsewhere for this equalling zero to determine if the player has ever sacrificed. Technically this + // should check for -Infinity, but the clampMin works in practice because the minimum possible sacrifice + // value is greater than 1 for even the weakest possible glyph + return BASIC_GLYPH_TYPES.reduce( + (tot, type) => tot + Math.log10(Math.clampMin(player.reality.glyphs.sac[type], 1)), 0); }, get canSacrifice() { return RealityUpgrade(19).isBought; diff --git a/javascripts/core/imaginary-upgrades.js b/javascripts/core/imaginary-upgrades.js index d1c41dd62..ad5d23a75 100644 --- a/javascripts/core/imaginary-upgrades.js +++ b/javascripts/core/imaginary-upgrades.js @@ -77,6 +77,12 @@ class RebuyableImaginaryUpgradeState extends RebuyableMechanicState { set boughtAmount(value) { player.reality.imaginaryRebuyables[this.id] = value; } + + onPurchased() { + if (this.id === 7) { + GameCache.staticGlyphWeights.invalidate(); + } + } } ImaginaryUpgradeState.index = mapGameData( diff --git a/javascripts/core/reality-upgrades.js b/javascripts/core/reality-upgrades.js index 6a95d2404..a1635a63e 100644 --- a/javascripts/core/reality-upgrades.js +++ b/javascripts/core/reality-upgrades.js @@ -65,6 +65,7 @@ class RealityUpgradeState extends BitPurchasableMechanicState { if (id === 20 && player.blackHole[0].unlocked) { player.blackHole[1].unlocked = true; } + GameCache.staticGlyphWeights.invalidate(); } } diff --git a/src/components/tabs/glyphs/GlyphLevelsAndWeights.vue b/src/components/tabs/glyphs/GlyphLevelsAndWeights.vue index 2b51c02c9..2bde01a2c 100644 --- a/src/components/tabs/glyphs/GlyphLevelsAndWeights.vue +++ b/src/components/tabs/glyphs/GlyphLevelsAndWeights.vue @@ -10,14 +10,10 @@ export default { }, data() { return { - adjustVisible: false, - eternityVisible: false, perkShopVisible: false, penaltyVisible: false, rowVisible: false, achievementVisible: false, - shardVisible: false, - singularityVisible: false, showAutoAdjustWeights: false, isAutoAdjustWeightsOn: false, factors: getGlyphLevelInputs(), @@ -78,6 +74,18 @@ export default { rows.push("info"); return rows; }, + adjustVisible() { + return EffarigUnlock.adjuster.isUnlocked; + }, + eternityVisible() { + return RealityUpgrade(18).isBought; + }, + shardVisible() { + return Ra.unlocks.relicShardGlyphLevelBoost.canBeApplied && Effarig.shardsGained !== 0; + }, + singularityVisible() { + return SingularityMilestone.glyphLevelFromSingularities.isUnlocked; + } }, watch: { isAutoAdjustWeightsOn(newValue) { @@ -105,17 +113,13 @@ export default { }, methods: { update() { - if (this.glyphWeightFields === undefined) { + if (this.glyphWeightFields === undefined || this.$parent.state.name === "CLOSED") { return; } - this.adjustVisible = EffarigUnlock.adjuster.isUnlocked; - this.eternityVisible = RealityUpgrade(18).isBought; const glyphFactors = getGlyphLevelInputs(); this.perkShopVisible = glyphFactors.perkShop !== 1; this.rowVisible = glyphFactors.rowFactor > 0; this.achievementVisible = glyphFactors.achievementFactor > 0; - this.shardVisible = Ra.unlocks.relicShardGlyphLevelBoost.canBeApplied && Effarig.shardsGained !== 0; - this.singularityVisible = SingularityMilestone.glyphLevelFromSingularities.isUnlocked; if (glyphFactors.scalePenalty !== 1) { this.penaltyVisible = true; this.lastInstability = Date.now(); diff --git a/src/components/tabs/glyphs/RealityButton.vue b/src/components/tabs/glyphs/RealityButton.vue index cd66f7902..7a8ad7de9 100644 --- a/src/components/tabs/glyphs/RealityButton.vue +++ b/src/components/tabs/glyphs/RealityButton.vue @@ -59,9 +59,7 @@ export default { let level = glyphState.actualLevel; if (!isFinite(level)) level = 0; const decimalPoints = this.glyphLevel > 1000 ? 0 : 1; - return glyphState.capped - ? "Capped" - : `${formatPercents(Math.min(((level - Math.floor(level))), 0.999), decimalPoints)}`; + return `${formatPercents(Math.min(((level - Math.floor(level))), 0.999), decimalPoints)}`; }, update() { this.isDoomed = Pelle.isDoomed; diff --git a/src/components/tabs/glyphs/SacrificedGlyphs.vue b/src/components/tabs/glyphs/SacrificedGlyphs.vue index 15f51fba4..3c5a65820 100644 --- a/src/components/tabs/glyphs/SacrificedGlyphs.vue +++ b/src/components/tabs/glyphs/SacrificedGlyphs.vue @@ -10,14 +10,10 @@ export default { }, data() { return { - isDoomed: false, anySacrifices: false, hasDragover: false, hasAlteration: false, hideAlteration: false, - addThreshold: 0, - empowerThreshold: 0, - boostThreshold: 0, maxSacrifice: 0, teresaMult: 0, lastMachinesTeresa: new Decimal(0), @@ -33,16 +29,24 @@ export default { dropDownIconClass() { return this.hideAlteration ? "far fa-plus-square" : "far fa-minus-square"; }, + isDoomed() { + return Pelle.isDoomed; + }, + addThreshold() { + return GlyphAlteration.additionThreshold; + }, + empowerThreshold() { + return GlyphAlteration.empowermentThreshold; + }, + boostThreshold() { + return GlyphAlteration.boostingThreshold; + } }, methods: { update() { - this.isDoomed = Pelle.isDoomed; - this.anySacrifices = GLYPH_TYPES.some(e => player.reality.glyphs.sac[e] && player.reality.glyphs.sac[e] !== 0); + this.anySacrifices = GameCache.logTotalGlyphSacrifice !== 0; this.hasAlteration = Ra.unlocks.alteredGlyphs.canBeApplied; this.hideAlteration = player.options.hideAlterationEffects; - this.addThreshold = GlyphAlteration.additionThreshold; - this.empowerThreshold = GlyphAlteration.empowermentThreshold; - this.boostThreshold = GlyphAlteration.boostingThreshold; this.maxSacrifice = GlyphSacrificeHandler.maxSacrificeForEffects; this.teresaMult = Teresa.runRewardMultiplier; this.lastMachinesTeresa.copyFrom(player.celestials.teresa.lastRepeatedMachines); From 602790548f0da0917b65c4febcd2251dc166ff28 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Sun, 22 May 2022 03:49:27 -0500 Subject: [PATCH 0389/1119] Some more significant glyph tab lag reduction --- javascripts/core/cache.js | 3 + javascripts/core/celestials/teresa.js | 4 +- javascripts/core/devtools.js | 6 +- javascripts/core/glyphs/glyph-core.js | 4 +- javascripts/core/reality.js | 10 +- .../secret-formula/celestials/perk-shop.js | 4 +- public/stylesheets/glyphs.css | 116 ------------------ public/stylesheets/theme-S9.css | 9 -- src/components/GlyphComponent.vue | 41 +++++-- .../modals/RealityGlyphCreationModal.vue | 2 +- .../tabs/celestial-effarig/EffarigTab.vue | 2 +- src/components/tabs/glyphs/EquippedGlyphs.vue | 42 +++---- 12 files changed, 69 insertions(+), 174 deletions(-) diff --git a/javascripts/core/cache.js b/javascripts/core/cache.js index 8c85e8412..76240be0c 100644 --- a/javascripts/core/cache.js +++ b/javascripts/core/cache.js @@ -94,6 +94,8 @@ export const GameCache = { timeDimensionCommonMultiplier: new Lazy(() => timeDimensionCommonMultiplier()), + glyphInventorySpace: new Lazy(() => Glyphs.freeInventorySpace), + glyphEffects: new Lazy(() => orderedEffectList.mapToObject(k => k, k => getAdjustedGlyphEffectUncached(k))), staticGlyphWeights: new Lazy(() => staticGlyphWeights()), @@ -108,6 +110,7 @@ export const GameCache = { }; EventHub.logic.on(GAME_EVENT.GLYPHS_CHANGED, () => { + GameCache.glyphInventorySpace.invalidate(); GameCache.glyphEffects.invalidate(); GameCache.staticGlyphWeights.invalidate(); }, GameCache.glyphEffects); diff --git a/javascripts/core/celestials/teresa.js b/javascripts/core/celestials/teresa.js index 04100f6b6..e68284ec6 100644 --- a/javascripts/core/celestials/teresa.js +++ b/javascripts/core/celestials/teresa.js @@ -120,7 +120,7 @@ class PerkShopUpgradeState extends RebuyableMechanicState { } // Give a single music glyph if (this.id === 4) { - if (Glyphs.freeInventorySpace === 0) { + if (GameCache.glyphInventorySpace.value === 0) { // Refund the perk point if they didn't actually get a glyph Currency.perkPoints.add(1); GameUI.notify.error("You have no empty inventory space!"); @@ -131,7 +131,7 @@ class PerkShopUpgradeState extends RebuyableMechanicState { } // Fill the inventory with music glyphs if (this.id === 5) { - const toCreate = Glyphs.freeInventorySpace; + const toCreate = GameCache.glyphInventorySpace.value; for (let count = 0; count < toCreate; count++) Glyphs.addToInventory(GlyphGenerator.musicGlyph()); GameUI.notify.success(`Created ${quantifyInt("Music Glyph", toCreate)}`); } diff --git a/javascripts/core/devtools.js b/javascripts/core/devtools.js index 552d6ce50..b23823d83 100644 --- a/javascripts/core/devtools.js +++ b/javascripts/core/devtools.js @@ -167,7 +167,7 @@ dev.resetDilation = function() { // eslint-disable-next-line max-params dev.giveSpecialGlyph = function(color, symbol, level, rawLevel = level) { if (!Object.prototype.hasOwnProperty.call(specialGlyphSymbols, symbol)) return; - if (Glyphs.freeInventorySpace === 0) return; + if (GameCache.glyphInventorySpace.value === 0) return; const glyph = GlyphGenerator.randomGlyph({ actualLevel: level, rawLevel }); glyph.symbol = symbol; glyph.color = color; @@ -175,12 +175,12 @@ dev.giveSpecialGlyph = function(color, symbol, level, rawLevel = level) { }; dev.giveGlyph = function(level, rawLevel = level) { - if (Glyphs.freeInventorySpace === 0) return; + if (GameCache.glyphInventorySpace.value === 0) return; Glyphs.addToInventory(GlyphGenerator.randomGlyph({ actualLevel: level, rawLevel })); }; dev.giveRealityGlyph = function(level) { - if (Glyphs.freeInventorySpace === 0) return; + if (GameCache.glyphInventorySpace.value === 0) return; Glyphs.addToInventory(GlyphGenerator.realityGlyph(level)); }; diff --git a/javascripts/core/glyphs/glyph-core.js b/javascripts/core/glyphs/glyph-core.js index b462181ff..770cd62e3 100644 --- a/javascripts/core/glyphs/glyph-core.js +++ b/javascripts/core/glyphs/glyph-core.js @@ -51,6 +51,8 @@ export const Glyphs = { const isUsableIndex = index => (useProtectedSlots ? index < this.protectedSlots : index >= this.protectedSlots); return this.inventory.findIndex((slot, index) => slot === null && isUsableIndex(index)); }, + // This is stored in GameCache and only invalidated if glyphs change; we check for free inventory space often in + // lots of places and this is an expensive operation get freeInventorySpace() { this.validate(); return this.inventory.filter((e, idx) => e === null && idx >= this.protectedSlots).length; @@ -380,7 +382,7 @@ export const Glyphs = { }, sort(sortFunction) { const glyphsToSort = player.reality.glyphs.inventory.filter(g => g.idx >= this.protectedSlots); - const freeSpace = this.freeInventorySpace; + const freeSpace = GameCache.glyphInventorySpace.value; const sortOrder = ["power", "infinity", "replication", "time", "dilation", "effarig", "reality", "cursed", "companion"]; const byType = sortOrder.mapToObject(g => g, () => ({ glyphs: [], padding: 0 })); diff --git a/javascripts/core/reality.js b/javascripts/core/reality.js index aa7fa7c6f..7efe339bc 100644 --- a/javascripts/core/reality.js +++ b/javascripts/core/reality.js @@ -112,7 +112,7 @@ export function requestManualReality() { Modal.reality.show(); return; } - if (Glyphs.freeInventorySpace === 0) { + if (GameCache.glyphInventorySpace.value === 0) { Modal.message.show("Inventory cannot hold new glyphs. Delete/sacrifice (shift-click) some glyphs."); return; } @@ -136,11 +136,11 @@ export function processManualReality(sacrifice, glyphID) { if (EffarigUnlock.glyphFilter.isUnlocked) { // If the player has the glyph filter, we apply the filter to the choices instead of picking randomly let newGlyph = AutoGlyphProcessor.pick(GlyphSelection.glyphs); - if (!AutoGlyphProcessor.wouldKeep(newGlyph) || Glyphs.freeInventorySpace === 0) { + if (!AutoGlyphProcessor.wouldKeep(newGlyph) || GameCache.glyphInventorySpace.value === 0) { AutoGlyphProcessor.getRidOfGlyph(newGlyph); newGlyph = null; } - if (newGlyph && Glyphs.freeInventorySpace > 0) { + if (newGlyph && GameCache.glyphInventorySpace.value > 0) { Glyphs.addToInventory(newGlyph); } } else { @@ -203,7 +203,7 @@ function processAutoGlyph(gainedLevel, rng) { const glyphs = GlyphSelection.glyphList(GlyphSelection.choiceCount, gainedLevel, { rng }); if (EffarigUnlock.glyphFilter.isUnlocked) { newGlyph = AutoGlyphProcessor.pick(glyphs); - if (!AutoGlyphProcessor.wouldKeep(newGlyph) || Glyphs.freeInventorySpace === 0) { + if (!AutoGlyphProcessor.wouldKeep(newGlyph) || GameCache.glyphInventorySpace.value === 0) { AutoGlyphProcessor.getRidOfGlyph(newGlyph); newGlyph = null; } @@ -212,7 +212,7 @@ function processAutoGlyph(gainedLevel, rng) { // so we might as well take the first one. newGlyph = glyphs[0]; } - if (newGlyph && Glyphs.freeInventorySpace > 0) { + if (newGlyph && GameCache.glyphInventorySpace.value > 0) { Glyphs.addToInventory(newGlyph); } } diff --git a/javascripts/core/secret-formula/celestials/perk-shop.js b/javascripts/core/secret-formula/celestials/perk-shop.js index 6e0696d9f..1a1ab9abb 100644 --- a/javascripts/core/secret-formula/celestials/perk-shop.js +++ b/javascripts/core/secret-formula/celestials/perk-shop.js @@ -78,8 +78,8 @@ GameDatabase.celestials.perkShop = { fillMusicGlyph: rebuyable({ id: 5, description: () => `Fill all empty slots in your inventory with Music Glyphs`, - cost: () => Math.clampMin(Glyphs.freeInventorySpace, 1), - otherReq: () => Glyphs.freeInventorySpace > 0, + cost: () => Math.clampMin(GameCache.glyphInventorySpace.value, 1), + otherReq: () => GameCache.glyphInventorySpace.value > 0, formatCost: value => formatInt(value), costCap: () => Number.MAX_VALUE, cap: () => Number.MAX_VALUE diff --git a/public/stylesheets/glyphs.css b/public/stylesheets/glyphs.css index 9ff4c76b8..687f33c65 100644 --- a/public/stylesheets/glyphs.css +++ b/public/stylesheets/glyphs.css @@ -1202,96 +1202,6 @@ cursor: zoom-in; } -@keyframes a-reality-glyph-outer-cycle { - 0% { - background-color: #b67f33; - box-shadow: #b67f33 0 0 1rem 0.2rem; - } - - 20% { - background-color: #64dd17; - box-shadow: #64dd17 0 0 1rem 0.2rem; - } - - 40% { - background-color: #22aa48; - box-shadow: #22aa48 0 0 1rem 0.2rem; - } - - 60% { - background-color: #03a9f4; - box-shadow: #03a9f4 0 0 1rem 0.2rem; - } - - 80% { - background-color: #b241e3; - box-shadow: #b241e3 0 0 1rem 0.2rem; - } - - 100% { - background-color: #b67f33; - box-shadow: #b67f33 0 0 1rem 0.2rem; - } -} - -@keyframes a-reality-glyph-over-cycle { - 0% { - box-shadow: #b67f33 0 0 1rem calc(0.3rem) inset; - } - - 20% { - box-shadow: #64dd17 0 0 1rem calc(0.3rem) inset; - } - - 40% { - box-shadow: #22aa48 0 0 1rem calc(0.3rem) inset; - } - - 60% { - box-shadow: #03a9f4 0 0 1rem calc(0.3rem) inset; - } - - 80% { - box-shadow: #b241e3 0 0 1rem calc(0.3rem) inset; - } - - 100% { - box-shadow: #b67f33 0 0 1rem calc(0.3rem) inset; - } -} - -@keyframes a-reality-glyph-icon-cycle { - 0% { - color: #b67f33; - text-shadow: #b67f33 -0.04rem 0.04rem 0.08rem; - } - - 20% { - color: #64dd17; - text-shadow: #64dd17 -0.04rem 0.04rem 0.08rem; - } - - 40% { - color: #22aa48; - text-shadow: #22aa48 -0.04rem 0.04rem 0.08rem; - } - - 60% { - color: #03a9f4; - text-shadow: #03a9f4 -0.04rem 0.04rem 0.08rem; - } - - 80% { - color: #b241e3; - text-shadow: #b241e3 -0.04rem 0.04rem 0.08rem; - } - - 100% { - color: #b67f33; - text-shadow: #b67f33 -0.04rem 0.04rem 0.08rem; - } -} - @keyframes a-reality-glyph-name-cycle { 0% { color: #b67f33; @@ -1386,32 +1296,6 @@ } } -@keyframes a-reality-glyph-dot-cycle { - 0% { - background: #b67f33; - } - - 20% { - background: #64dd17; - } - - 40% { - background: #22aa48; - } - - 60% { - background: #03a9f4; - } - - 80% { - background: #b241e3; - } - - 100% { - background: #b67f33; - } -} - @keyframes a-reality-glyph-tooltip-cycle { 0% { border-color: #b67f33; diff --git a/public/stylesheets/theme-S9.css b/public/stylesheets/theme-S9.css index 03ff6b9ab..4664ec922 100644 --- a/public/stylesheets/theme-S9.css +++ b/public/stylesheets/theme-S9.css @@ -37,19 +37,10 @@ background-image: none; } -@keyframes a-reality-glyph-icon-cycle { - 0% { color: transparent; } -} - @keyframes a-reality-glyph-description-cycle { 0% { color: transparent; } } -@keyframes a-reality-glyph-dot-cycle { - from { background: none; } - to { background: none; } -} - .o-celestial-nav__legend-text { fill: transparent !important; } diff --git a/src/components/GlyphComponent.vue b/src/components/GlyphComponent.vue index cb456f00f..fa6a25991 100644 --- a/src/components/GlyphComponent.vue +++ b/src/components/GlyphComponent.vue @@ -95,7 +95,11 @@ export default { displayLevel: 0, // We use this to not create a ton of tooltip components as soon as the glyph tab loads. tooltipLoaded: false, - logTotalSacrifice: 0 + logTotalSacrifice: 0, + // This exists to dynamically adjust reality glyph colors over time - this used to use a keyframe animation, but + // applying that was causing large amounts of lag due to the number of independent and partially overlapping + // elements it was applying it to. Of note - null transform hacks did not seem to improve performance either. + colorTimer: 0, }; }, computed: { @@ -123,6 +127,7 @@ export default { return { "z-index": this.isInModal ? 7 : 6 }; }, borderColor() { + if (this.isRealityGlyph) return this.realityGlyphColor(); return this.glyph.color || this.typeConfig.color; }, overStyle() { @@ -133,7 +138,6 @@ export default { "background-color": "rgba(0, 0, 0, 0)", "box-shadow": `0 0 ${this.glowBlur} calc(${this.glowSpread} + 0.1rem) ${this.borderColor} inset`, "border-radius": this.circular ? "50%" : "0", - animation: this.isRealityGlyph ? "a-reality-glyph-over-cycle 10s infinite" : undefined, }; }, outerStyle() { @@ -143,12 +147,13 @@ export default { "background-color": this.borderColor, "box-shadow": `0 0 ${this.glowBlur} ${this.glowSpread} ${this.borderColor}`, "border-radius": this.circular ? "50%" : "0", - animation: this.isRealityGlyph ? "a-reality-glyph-outer-cycle 10s infinite" : undefined, "-webkit-user-drag": this.draggable ? "" : "none" }; }, innerStyle() { - const rarityColor = this.glyph.color || getRarity(this.glyph.strength).color; + const rarityColor = this.isRealityGlyph + ? this.realityGlyphColor() + : this.glyph.color || getRarity(this.glyph.strength).color; return { width: `calc(${this.size} - 0.2rem)`, height: `calc(${this.size} - 0.2rem)`, @@ -156,7 +161,6 @@ export default { color: this.isCursedGlyph ? "black" : rarityColor, "text-shadow": this.isCursedGlyph ? "-0.04em 0.04em 0.08em black" : `-0.04em 0.04em 0.08em ${rarityColor}`, "border-radius": this.circular ? "50%" : "0", - animation: this.isRealityGlyph ? "a-reality-glyph-icon-cycle 10s infinite" : undefined, "padding-bottom": this.bottomPadding, background: this.isCursedGlyph ? "white" : undefined }; @@ -260,6 +264,24 @@ export default { methods: { update() { this.logTotalSacrifice = GameCache.logTotalGlyphSacrifice.value; + this.colorTimer = (this.colorTimer + 4) % 1000; + }, + // This produces a linearly interpolated color between the basic glyph colors, but with RGB channels copied and + // hardcoded from the color data because that's probably preferable to a very hacky hex conversion method. The + // order used is {infinity, dilation, power, replication, time, infinity, ... } + realityGlyphColor() { + // RGB values for the colors to interpolate between + const r = [182, 100, 34, 3, 178, 182]; + const g = [127, 221, 170, 169, 65, 127]; + const b = [51, 23, 72, 244, 227, 51]; + + // Integer and fractional parts for interpolation parameter + const i = Math.floor(this.colorTimer / 200); + const f = this.colorTimer / 200 - i; + + return `rgb(${r[i] * (1 - f) + r[i + 1] * f}, + ${g[i] * (1 - f) + g[i + 1] * f}, + ${b[i] * (1 - f) + b[i + 1] * f})`; }, hideTooltip() { this.tooltipLoaded = false; @@ -415,14 +437,19 @@ export default { if (this.glyph.type === "companion") return {}; const pos = this.effectIconPos(id); const size = this.hasMutuallyExclusiveEffect && [1, 2].includes(id) ? 0.5 : 0.3; + + let color; + if (this.isCursedGlyph) color = "black"; + else if (this.isRealityGlyph) color = this.realityGlyphColor(); + else color = `${this.glyph.color || getRarity(this.glyph.strength).color}`; + return { position: "absolute", width: `${size}rem`, height: `${size}rem`, "border-radius": "50%", - background: this.isCursedGlyph ? "black" : `${this.glyph.color || getRarity(this.glyph.strength).color}`, + background: color, transform: `translate(${pos.dx - 0.15 * size}rem, ${pos.dy - 0.15 * size}rem)`, - animation: this.isRealityGlyph ? "a-reality-glyph-dot-cycle 10s infinite" : "none", opacity: Theme.current().name === "S9" ? 0 : 0.8 }; }, diff --git a/src/components/modals/RealityGlyphCreationModal.vue b/src/components/modals/RealityGlyphCreationModal.vue index dbf50de26..d78360048 100644 --- a/src/components/modals/RealityGlyphCreationModal.vue +++ b/src/components/modals/RealityGlyphCreationModal.vue @@ -28,7 +28,7 @@ export default { .map(cfg => [realityGlyphEffectLevelThresholds[cfg.bitmaskIndex - minRealityEffectIndex], cfg.id]); }, createRealityGlyph() { - if (Glyphs.freeInventorySpace === 0) { + if (GameCache.glyphInventorySpace.value === 0) { Modal.message.show("Inventory cannot hold new Glyphs. Purge some Glyphs."); return; } diff --git a/src/components/tabs/celestial-effarig/EffarigTab.vue b/src/components/tabs/celestial-effarig/EffarigTab.vue index 8753f669e..37e1fcd17 100644 --- a/src/components/tabs/celestial-effarig/EffarigTab.vue +++ b/src/components/tabs/celestial-effarig/EffarigTab.vue @@ -74,7 +74,7 @@ export default { Modal.celestials.show({ name: "Effarig's", number: 1 }); }, createCursedGlyph() { - if (Glyphs.freeInventorySpace === 0) { + if (GameCache.glyphInventorySpace.value === 0) { Modal.message.show("Inventory cannot hold new Glyphs. Sacrifice (shift-click) some Glyphs."); return; } diff --git a/src/components/tabs/glyphs/EquippedGlyphs.vue b/src/components/tabs/glyphs/EquippedGlyphs.vue index 2d875c914..7669c8957 100644 --- a/src/components/tabs/glyphs/EquippedGlyphs.vue +++ b/src/components/tabs/glyphs/EquippedGlyphs.vue @@ -8,7 +8,6 @@ export default { }, data() { return { - isDoomed: false, glyphs: [], dragoverIndex: -1, respec: player.reality.respec, @@ -25,7 +24,8 @@ export default { return this.glyphs.length; }, arrangementRadius() { - return [0, 0, 0, 4, 5, 6][this.slotCount]; + if (this.slotCount === 0) return 0; + return this.slotCount + 1; }, respecTooltip() { const reset = Pelle.isDoomed ? "Armageddon" : "Reality"; @@ -44,6 +44,9 @@ export default { unequipText() { if (Pelle.isDoomed) return "Unequip Glyphs on Armageddon"; return "Unequip Glyphs on Reality"; + }, + isDoomed() { + return Pelle.isDoomed; } }, created() { @@ -52,41 +55,26 @@ export default { }, methods: { update() { - this.isDoomed = Pelle.isDoomed; this.respec = player.reality.respec; this.respecIntoProtected = player.options.respecIntoProtected; - this.undoSlotsAvailable = Glyphs.findFreeIndex(player.options.respecIntoProtected) !== -1; + this.undoSlotsAvailable = this.respecIntoProtected + ? Glyphs.totalSlots - GameCache.glyphInventorySpace.value - Glyphs.inventoryList.length > 0 + : GameCache.glyphInventorySpace.value > 0; this.undoVisible = TeresaUnlocks.undo.canBeApplied; - // eslint-disable-next-line max-len - this.undoAvailable = this.undoVisible && - this.undoSlotsAvailable && - player.reality.glyphs.undo.length > 0 && - !this.isDoomed; + this.undoAvailable = this.undoVisible && this.undoSlotsAvailable && + player.reality.glyphs.undo.length > 0 && !this.isDoomed; }, glyphPositionStyle(idx) { + const angle = 2 * Math.PI * idx / this.slotCount; + const dx = -this.GLYPH_SIZE / 2 + this.arrangementRadius * Math.sin(angle); + const dy = -this.GLYPH_SIZE / 2 + this.arrangementRadius * Math.cos(angle); return { position: "absolute", - left: `calc(50% + ${this.glyphX(idx, 1)}rem)`, - top: `calc(50% + ${this.glyphY(idx, 1)}rem)`, + left: `calc(50% + ${dx}rem)`, + top: `calc(50% + ${dy}rem)`, "z-index": 1, }; }, - copyPositionStyle(glyph) { - return { - position: "absolute", - left: `calc(50% + ${this.glyphX(glyph.idx, 1.4)}rem)`, - top: `calc(50% + ${this.glyphY(glyph.idx, 1.4)}rem)`, - opacity: 0.4, - }; - }, - glyphX(idx, scale) { - return -this.GLYPH_SIZE / 2 + this.arrangementRadius * scale * - Math.sin(2 * Math.PI * idx / this.slotCount); - }, - glyphY(idx, scale) { - return -this.GLYPH_SIZE / 2 + this.arrangementRadius * scale * - Math.cos(2 * Math.PI * idx / this.slotCount); - }, dragover(event, idx) { if (!event.dataTransfer.types.includes(GLYPH_MIME_TYPE)) return; event.preventDefault(); From d00b5a73156f90cc6a05f9d786c97a96ed0c0cbb Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Sun, 22 May 2022 05:40:04 -0500 Subject: [PATCH 0390/1119] Adjust glyph tooltip border, fixes #2621 --- public/stylesheets/glyphs.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/glyphs.css b/public/stylesheets/glyphs.css index 687f33c65..2c73f4efa 100644 --- a/public/stylesheets/glyphs.css +++ b/public/stylesheets/glyphs.css @@ -452,7 +452,7 @@ background-color: black; border: var(--var-border-width, 0.2rem) solid black; border-radius: var(--var-border-radius, 0.6rem); - padding: 0.6rem; + padding: 0 0.6rem; padding-bottom: 0.6rem; transition: opacity 0.3s; } @@ -473,7 +473,7 @@ background-color: black; border: var(--var-border-width, 0.2rem) solid; border-radius: var(--var-border-radius, 0.8rem); - margin-top: -4rem; + margin: -0.6rem; padding: 0.3rem 1rem 0.7rem; } From 05b8ce5ed2f01c96d3c001a350a9595803daa55e Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Sun, 22 May 2022 18:10:10 -0700 Subject: [PATCH 0391/1119] convert Pelle.enabledGlyphEffects to glyph-effects database --- javascripts/core/celestials/pelle/pelle.js | 12 --------- javascripts/core/glyph-effects.js | 10 +++++-- .../secret-formula/reality/glyph-effects.js | 26 ++++++++++++++----- src/components/GlyphTooltipEffect.vue | 2 +- .../modals/GlyphShowcasePanelEntry.vue | 5 +--- .../tabs/glyphs/CurrentGlyphEffect.vue | 2 +- 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/javascripts/core/celestials/pelle/pelle.js b/javascripts/core/celestials/pelle/pelle.js index d3b1d05a3..c61645ce6 100644 --- a/javascripts/core/celestials/pelle/pelle.js +++ b/javascripts/core/celestials/pelle/pelle.js @@ -141,18 +141,6 @@ export const Pelle = { 60, 61, 62, 80, 81, 82, 83, 100, 105, 106, 201, 202, 203, 204]; }, - // Glyph effects are controlled through other means, but are also enumerated here for accessing to improve UX. Note - // that this field is NEGATED, describing an effect allowlist instead of a blocklist, as most of the effects are - // already disabled by virtue of the glyph type being unequippable and many of the remaining ones are also disabled. - get enabledGlyphEffects() { - return ["timepow", "timespeed", "timeshardpow", - "dilationpow", "dilationgalaxyThreshold", - "replicationpow", - "powerpow", "powermult", "powerdimboost", "powerbuy10", - "infinitypow", "infinityrate", - "companiondescription", "companionEP"]; - }, - get specialGlyphEffect() { const isUnlocked = this.isDoomed && PelleRifts.chaos.milestones[1].canBeApplied; const description = this.getSpecialGlyphEffectDescription(this.activeGlyphType); diff --git a/javascripts/core/glyph-effects.js b/javascripts/core/glyph-effects.js index 5293d2202..4266c5e23 100644 --- a/javascripts/core/glyph-effects.js +++ b/javascripts/core/glyph-effects.js @@ -30,7 +30,7 @@ class GlyphEffectConfig { * Specification of how multiple glyphs combine. Can be GlyphCombiner.add or GlyphCombiner.multiply for most glyphs. * Otherwise, should be a function that takes a potentially empty array of numbers (each glyph's effect value) * and returns a combined effect or an object with the combined effect amd a capped indicator. - * + * @param {boolean} [setup.enabledInDoomed] Determines if this effect is enabled while doomed. Defaults to false */ constructor(setup) { GlyphEffectConfig.checkInputs(setup); @@ -82,6 +82,8 @@ class GlyphEffectConfig { this.alterationType = setup.alterationType; /** @type {boolean} Indicates whether the effect grows with level or shrinks */ this._biggerIsBetter = undefined; + /** @type {boolean} Determines if effect is disabled while in doomed */ + this._enabledInDoomed = setup.enabledInDoomed ?? false; } /** @@ -112,6 +114,10 @@ class GlyphEffectConfig { return typeof shortDesc === "function" ? shortDesc() : shortDesc; } + get isDisabledByDoomed() { + return Pelle.isDoomed && !this._enabledInDoomed; + } + /** @returns {number} */ compareValues(effectValueA, effectValueB) { const result = Decimal.compare(effectValueA, effectValueB); @@ -132,7 +138,7 @@ class GlyphEffectConfig { static checkInputs(setup) { const KNOWN_KEYS = ["id", "bitmaskIndex", "glyphTypes", "singleDesc", "totalDesc", "genericDesc", "effect", "formatEffect", "formatSingleEffect", "combine", "softcap", "conversion", "formatSecondaryEffect", - "formatSingleSecondaryEffect", "alteredColor", "alterationType", "isGenerated", "shortDesc"]; + "formatSingleSecondaryEffect", "alteredColor", "alterationType", "isGenerated", "shortDesc", "enabledInDoomed"]; const unknownField = Object.keys(setup).find(k => !KNOWN_KEYS.includes(k)); if (unknownField !== undefined) { throw new Error(`Glyph effect "${setup.id}" includes unrecognized field "${unknownField}"`); diff --git a/javascripts/core/secret-formula/reality/glyph-effects.js b/javascripts/core/secret-formula/reality/glyph-effects.js index 55a9476f7..182d1d20f 100644 --- a/javascripts/core/secret-formula/reality/glyph-effects.js +++ b/javascripts/core/secret-formula/reality/glyph-effects.js @@ -42,6 +42,7 @@ GameDatabase.reality.glyphEffects = { formatEffect: x => format(x, 3, 3), formatSingleEffect: x => format(x - 1, 3, 3), combine: GlyphCombiner.addExponents, + enabledInDoomed: true, }, timespeed: { id: "timespeed", @@ -58,7 +59,8 @@ GameDatabase.reality.glyphEffects = { formatEffect: x => format(x, 3, 3), combine: GlyphCombiner.multiply, alteredColor: () => GlyphAlteration.getEmpowermentColor("time"), - alterationType: ALTERATION_TYPE.EMPOWER + alterationType: ALTERATION_TYPE.EMPOWER, + enabledInDoomed: true, }, timeetermult: { id: "timeetermult", @@ -136,6 +138,7 @@ GameDatabase.reality.glyphEffects = { ? { value: 0.4 - Math.pow(0.4 - prod, 1.7), capped: true } : { value: prod, capped: false }; }, + enabledInDoomed: true, }, dilationTTgen: { // TTgen slowly generates TT, value amount is per second, displayed per hour @@ -177,6 +180,7 @@ GameDatabase.reality.glyphEffects = { formatEffect: x => format(x, 2, 2), formatSingleEffect: x => format(x - 1, 2, 2), combine: GlyphCombiner.addExponents, + enabledInDoomed: true, }, replicationspeed: { id: "replicationspeed", @@ -209,7 +213,8 @@ GameDatabase.reality.glyphEffects = { formatSingleEffect: x => format(x - 1, 2, 2), combine: GlyphCombiner.addExponents, alteredColor: () => GlyphAlteration.getBoostColor("replication"), - alterationType: ALTERATION_TYPE.BOOST + alterationType: ALTERATION_TYPE.BOOST, + enabledInDoomed: true, }, replicationdtgain: { id: "replicationdtgain", @@ -280,7 +285,8 @@ GameDatabase.reality.glyphEffects = { formatSingleEffect: x => format(x - 1, 3, 3), combine: GlyphCombiner.addExponents, alteredColor: () => GlyphAlteration.getBoostColor("infinity"), - alterationType: ALTERATION_TYPE.BOOST + alterationType: ALTERATION_TYPE.BOOST, + enabledInDoomed: true, }, infinityrate: { id: "infinityrate", @@ -296,6 +302,7 @@ GameDatabase.reality.glyphEffects = { effect: (level, strength) => Math.pow(level, 0.2) * Math.pow(strength, 0.4) * 0.04, formatEffect: x => format(x, 2, 2), combine: GlyphCombiner.add, + enabledInDoomed: true, }, infinityIP: { id: "infinityIP", @@ -365,7 +372,8 @@ GameDatabase.reality.glyphEffects = { conversion: x => 2 / (x + 1), formatSecondaryEffect: x => format(x, 3, 3), alteredColor: () => GlyphAlteration.getAdditionColor("power"), - alterationType: ALTERATION_TYPE.ADDITION + alterationType: ALTERATION_TYPE.ADDITION, + enabledInDoomed: true, }, powermult: { id: "powermult", @@ -380,7 +388,8 @@ GameDatabase.reality.glyphEffects = { formatEffect: x => formatPostBreak(x, 2, 0), combine: GlyphCombiner.multiplyDecimal, alteredColor: () => GlyphAlteration.getEmpowermentColor("power"), - alterationType: ALTERATION_TYPE.EMPOWER + alterationType: ALTERATION_TYPE.EMPOWER, + enabledInDoomed: true, }, powerdimboost: { id: "powerdimboost", @@ -395,7 +404,8 @@ GameDatabase.reality.glyphEffects = { formatEffect: x => format(x, 2, 2), combine: GlyphCombiner.multiply, alteredColor: () => GlyphAlteration.getBoostColor("power"), - alterationType: ALTERATION_TYPE.BOOST + alterationType: ALTERATION_TYPE.BOOST, + enabledInDoomed: true, }, powerbuy10: { id: "powerbuy10", @@ -409,6 +419,7 @@ GameDatabase.reality.glyphEffects = { effect: (level, strength) => 1 + level * strength / 12, formatEffect: x => format(x, 2, 2), combine: GlyphCombiner.addExponents, + enabledInDoomed: true, }, effarigblackhole: { id: "effarigblackhole", @@ -534,6 +545,7 @@ GameDatabase.reality.glyphEffects = { formatEffect: x => format(x, 3, 3), formatSingleEffect: x => format(x - 1, 3, 3), combine: GlyphCombiner.addExponents, + enabledInDoomed: true, }, cursedgalaxies: { id: "cursedgalaxies", @@ -650,6 +662,7 @@ GameDatabase.reality.glyphEffects = { effect: () => (Enslaved.isRunning ? 0 : (0.4 + 0.6 * Math.random())), formatEffect: x => formatPercents(x, 2, 2), combine: GlyphCombiner.add, + enabledInDoomed: true, }, companionEP: { id: "companionEP", @@ -665,5 +678,6 @@ GameDatabase.reality.glyphEffects = { effect: (level, strength) => Decimal.pow10(1e6 * strengthToRarity(strength)), formatEffect: x => formatPostBreak(x, 2), combine: GlyphCombiner.multiplyDecimal, + enabledInDoomed: true, } }; diff --git a/src/components/GlyphTooltipEffect.vue b/src/components/GlyphTooltipEffect.vue index e199c29af..69cee0206 100644 --- a/src/components/GlyphTooltipEffect.vue +++ b/src/components/GlyphTooltipEffect.vue @@ -51,7 +51,7 @@ export default { return this.textSplits[2] !== undefined; }, isPelleDisabled() { - return Pelle.isDoomed && !Pelle.enabledGlyphEffects.includes(this.effect); + return this.effectConfig.isDisabledByDoomed; }, convertedParts() { const parts = []; diff --git a/src/components/modals/GlyphShowcasePanelEntry.vue b/src/components/modals/GlyphShowcasePanelEntry.vue index 732c0927d..8d65c63e9 100644 --- a/src/components/modals/GlyphShowcasePanelEntry.vue +++ b/src/components/modals/GlyphShowcasePanelEntry.vue @@ -137,11 +137,8 @@ export default { text: `${rawDesc}` .replace("{value}", singleValue) .replace("{value2}", alteredValue), - isPelleDisabled: this.isPelleDisabled(dbEntry.id) + isPelleDisabled: dbEntry.isDisabledByDoomed }; - }, - isPelleDisabled(effect) { - return Pelle.isDoomed && !Pelle.enabledGlyphEffects.includes(effect); } }, }; diff --git a/src/components/tabs/glyphs/CurrentGlyphEffect.vue b/src/components/tabs/glyphs/CurrentGlyphEffect.vue index 7c3271b29..0f5f7112e 100644 --- a/src/components/tabs/glyphs/CurrentGlyphEffect.vue +++ b/src/components/tabs/glyphs/CurrentGlyphEffect.vue @@ -17,7 +17,7 @@ export default { return GlyphEffects[this.effect.id]; }, formatValue() { - if (Pelle.isDoomed && !Pelle.enabledGlyphEffects.includes(this.effect.id)) return ""; + if (this.effectConfig.isDisabledByDoomed) return ""; const baseValue = this.effect.value.value; const value1 = this.effectConfig.formatEffect(baseValue); const value2 = this.effectConfig.conversion === undefined From 45776842b58cef0255be18a919ad01bde08e7dcb Mon Sep 17 00:00:00 2001 From: WaitingIdly <25394029+WaitingIdly@users.noreply.github.com> Date: Sun, 22 May 2022 19:04:28 -0700 Subject: [PATCH 0392/1119] move isColored to props --- src/components/tabs/glyphs/CurrentGlyphEffect.vue | 14 ++++---------- src/components/tabs/glyphs/CurrentGlyphEffects.vue | 3 +++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/tabs/glyphs/CurrentGlyphEffect.vue b/src/components/tabs/glyphs/CurrentGlyphEffect.vue index 749ac6a9c..8fb1093cb 100644 --- a/src/components/tabs/glyphs/CurrentGlyphEffect.vue +++ b/src/components/tabs/glyphs/CurrentGlyphEffect.vue @@ -2,16 +2,15 @@ export default { name: "CurrentGlyphEffect", props: { + isColored: { + type: Boolean, + default: true + }, effect: { type: Object, required: true } }, - data() { - return { - isColored: true, - }; - }, computed: { effectConfig() { return GameDatabase.reality.glyphEffects[this.effect.id]; @@ -50,11 +49,6 @@ export default { valueClass() { return this.effect.value.capped ? "c-current-glyph-effects__effect--capped" : ""; } - }, - methods: { - update() { - this.isColored = player.options.glyphTextColors; - }, } }; diff --git a/src/components/tabs/glyphs/CurrentGlyphEffects.vue b/src/components/tabs/glyphs/CurrentGlyphEffects.vue index 49ccaad7d..242a5c1a0 100644 --- a/src/components/tabs/glyphs/CurrentGlyphEffects.vue +++ b/src/components/tabs/glyphs/CurrentGlyphEffects.vue @@ -23,6 +23,7 @@ export default { data() { return { effects: [], + isColored: false, hasEffarig: false, hasReality: false, logGlyphSacrifice: 0, @@ -72,6 +73,7 @@ export default { }, methods: { update() { + this.isColored = player.options.glyphTextColors; this.hasEffarig = Glyphs.active.some(g => g && g.type === "effarig"); this.hasReality = Glyphs.active.some(g => g && g.type === "reality"); @@ -114,6 +116,7 @@ export default { v-for="effect in effects" :key="effect.id + logGlyphSacrifice" :effect="effect" + :is-colored="isColored" />
Date: Sun, 22 May 2022 20:37:53 -0700 Subject: [PATCH 0393/1119] back to circles --- public/stylesheets/styles.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 958d380e0..220fd88ce 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -7861,7 +7861,7 @@ kbd { color: black; background-color: white; border: 0.1rem solid black; - border-radius: var(--var-border-radius, 50%); + border-radius: 50%; margin-top: -1.5rem; margin-left: -1.5rem; transition: all 0.2s, z-index 0s; @@ -7878,7 +7878,7 @@ kbd { z-index: 4; background-color: #bbbbbb; border: 0.1rem solid black; - border-radius: var(--var-border-radius, 50%); + border-radius: 50%; margin-top: -1.2rem; margin-left: -1.2rem; } @@ -7888,7 +7888,7 @@ kbd { height: 2.8rem; position: absolute; background: white; - border-radius: var(--var-border-radius, 50%); + border-radius: 50%; } .o-alchemy-resource-arc-circle { @@ -7900,7 +7900,7 @@ kbd { .o-alchemy-resource-arc-spinner { z-index: 2; - border-radius: var(--var-border-radius, 1.4rem 0 0 1.4rem); + border-radius: 1.4rem 0 0 1.4rem; transform-origin: 100% 50%; } @@ -7908,7 +7908,7 @@ kbd { left: 50%; z-index: 1; opacity: 0; - border-radius: var(--var-border-radius, 0 1.4rem 1.4rem 0); + border-radius: 0 1.4rem 1.4rem 0; } .o-alchemy-resource-arc-mask { @@ -7918,7 +7918,7 @@ kbd { z-index: 3; opacity: 1; background: inherit; - border-radius: var(--var-border-radius, 1.4rem 0 0 1.4rem); + border-radius: 1.4rem 0 0 1.4rem; } .o-alchemy-node--unfocused { From a7e1bf3a9e7cb8d3a813a2a0721b9298f400c465 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Tue, 17 May 2022 20:14:42 -0500 Subject: [PATCH 0394/1119] Adjust automator layout to accomodate debug and info text, fixes #2206 --- .../core/automator/automator-backend.js | 4 + public/stylesheets/automator.css | 32 +-- .../tabs/automator/AutomatorControls.vue | 111 ++++++---- .../tabs/automator/AutomatorDocs.vue | 192 ++++++++++-------- .../tabs/automator/AutomatorEditor.vue | 89 +------- .../tabs/automator/AutomatorModeSwitch.vue | 166 +++++++++++++++ 6 files changed, 358 insertions(+), 236 deletions(-) create mode 100644 src/components/tabs/automator/AutomatorModeSwitch.vue diff --git a/javascripts/core/automator/automator-backend.js b/javascripts/core/automator/automator-backend.js index 36f217764..ae26e1092 100644 --- a/javascripts/core/automator/automator-backend.js +++ b/javascripts/core/automator/automator-backend.js @@ -257,6 +257,10 @@ export const AutomatorBackend = { return Math.clampMin(Math.pow(0.994, Currency.realities.value) * 500, 1); }, + get currentScriptLength() { + return player.reality.automator.scripts[this.state.topLevelScript].content.split("\n").length; + }, + update(diff) { if (!this.isOn) return; let stack; diff --git a/public/stylesheets/automator.css b/public/stylesheets/automator.css index 7ff2f2e0e..4d5941b90 100644 --- a/public/stylesheets/automator.css +++ b/public/stylesheets/automator.css @@ -132,21 +132,20 @@ border-radius: 0; } -.l-automator-pane__controls { - flex: 0 0 auto; -} - .c-automator__controls { background-color: #262626; } .l-automator__controls { display: flex; - flex-direction: row; + flex-direction: column; + flex: none; +} - /* for corner buttons */ - position: relative; - justify-content: flex-start; +.l-automator-button-row { + display: flex; + flex-direction: row; + height: 3rem; align-items: center; } @@ -163,23 +162,6 @@ right: 0; } -.l-automator__script-names { - display: flex; - flex-grow: 1; - flex-direction: row; - justify-content: space-evenly; - align-items: center; -} - -.l-automator__scripts-dropdown { - width: 90%; - height: 90%; - border-width: 0.1rem; - border-radius: 0; - margin: 0.4rem; - padding: 0.2rem 0 0.3rem; -} - .l-automator__rename-input { width: 90%; height: 90%; diff --git a/src/components/tabs/automator/AutomatorControls.vue b/src/components/tabs/automator/AutomatorControls.vue index 7e4f07567..2c4eda230 100644 --- a/src/components/tabs/automator/AutomatorControls.vue +++ b/src/components/tabs/automator/AutomatorControls.vue @@ -13,6 +13,7 @@ export default { repeatOn: false, forceRestartOn: false, followExecution: false, + currentLine: 0, }; }, computed: { @@ -32,6 +33,19 @@ export default { "fa-eject": this.isPaused }; }, + statusText() { + // TODO Check for correct script, add script name to running + const prefix = "Status: "; + // Pad with leading zeroes based on script length to prevent text jitter on fast scripts. This technically fails + // for scripts with more than 99999 lines, but scripts that long will be prevented elsewhere + const digits = Math.ceil(Math.log10(AutomatorBackend.currentScriptLength)); + let lineNum = `0000${this.currentLine}`; + lineNum = lineNum.slice(lineNum.length - digits); + + if (this.isPaused) return `${prefix}Paused (Will run line ${lineNum} when resumed)`; + if (!this.isRunning) return `${prefix}Not running (Will start at beginning)`; + return `${prefix}Running (Last executed line ${lineNum})`; + }, }, methods: { update() { @@ -40,6 +54,7 @@ export default { this.repeatOn = AutomatorBackend.state.repeat; this.forceRestartOn = AutomatorBackend.state.forceRestart; this.followExecution = AutomatorBackend.state.followExecution; + if (this.isRunning) this.currentLine = AutomatorBackend.currentLineNumber; }, rewind: () => AutomatorBackend.restart(), play() { @@ -64,52 +79,64 @@ export default { diff --git a/src/components/tabs/automator/AutomatorModeSwitch.vue b/src/components/tabs/automator/AutomatorModeSwitch.vue new file mode 100644 index 000000000..0e5e7b4a6 --- /dev/null +++ b/src/components/tabs/automator/AutomatorModeSwitch.vue @@ -0,0 +1,166 @@ + + + + + From b8b4a762b3ad88988d7165081126c28322295d98 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Tue, 17 May 2022 23:14:16 -0500 Subject: [PATCH 0395/1119] Cleanup automator backend and fix crash when deleting scripts while automator is running --- .../core/automator/automator-backend.js | 36 +++++++++++++------ .../modals/DeleteAutomatorScriptModal.vue | 11 ------ .../tabs/automator/AutomatorControls.vue | 36 ++++++++++++++----- .../tabs/automator/AutomatorEditor.vue | 18 ---------- .../tabs/automator/AutomatorModeSwitch.vue | 21 ----------- 5 files changed, 53 insertions(+), 69 deletions(-) diff --git a/javascripts/core/automator/automator-backend.js b/javascripts/core/automator/automator-backend.js index ae26e1092..28d260f28 100644 --- a/javascripts/core/automator/automator-backend.js +++ b/javascripts/core/automator/automator-backend.js @@ -111,7 +111,6 @@ class AutomatorStackEntry { export class AutomatorScript { constructor(id) { - if (!id) throw new Error("Invalid Automator script ID"); this._id = id; this.compile(); } @@ -183,7 +182,7 @@ export const AutomatorData = { createNewScript(newScript, name) { const newScriptID = Object.values(player.reality.automator.scripts).length + 1; player.reality.automator.scripts[newScriptID] = { - id: `${newScriptID}`, + id: newScriptID, name, content: newScript }; @@ -243,12 +242,22 @@ export const AutomatorBackend = { return this.isOn && this.mode === AUTOMATOR_MODE.RUN; }, + get currentRunningScript() { + return player.reality.automator.scripts[this.state.topLevelScript]; + }, + + get currentEditingScript() { + const saveIndex = Object.values(player.reality.automator.scripts) + .findIndex(s => s.id === player.reality.automator.state.editorScript); + return player.reality.automator.scripts[saveIndex]; + }, + get scriptName() { - return this.findScript(this.state.topLevelScript).name; + return this.currentRunningScript?.name ?? ""; }, get currentLineNumber() { - if (this.stack.top === null) + if (!this.stack.top) return -1; return this.stack.top.lineNumber; }, @@ -257,8 +266,12 @@ export const AutomatorBackend = { return Math.clampMin(Math.pow(0.994, Currency.realities.value) * 500, 1); }, + get currentRawText() { + return this.currentRunningScript?.content ?? ""; + }, + get currentScriptLength() { - return player.reality.automator.scripts[this.state.topLevelScript].content.split("\n").length; + return this.currentRawText.split("\n").length; }, update(diff) { @@ -355,10 +368,7 @@ export const AutomatorBackend = { }, findScript(id) { - // I tried really hard to convert IDs from strings into numbers for some cleanup but I just kept getting constant - // errors everywhere. It needs to be a number so that importing works properly without ID assignment being a mess, - // but apparently some deeper things seem to break in a way I can't easily fix. - return this._scripts.find(e => `${e.id}` === `${id}`); + return this._scripts.find(e => e.id === id); }, _createDefaultScript() { @@ -369,7 +379,7 @@ export const AutomatorBackend = { }, initializeFromSave() { - const scriptIds = Object.keys(player.reality.automator.scripts); + const scriptIds = Object.keys(player.reality.automator.scripts).map(id => parseInt(id, 10)); if (scriptIds.length === 0) { scriptIds.push(this._createDefaultScript()); } else { @@ -396,10 +406,14 @@ export const AutomatorBackend = { return newScript; }, + // Note that deleting scripts leaves gaps in the automator script indexing since automator scripts can't be + // dynamically re-indexed while the automator is running without causing a stutter from recompiling scripts. deleteScript(id) { + // We need to delete scripts from two places - in the savefile and compiled AutomatorScript Objects + const saveId = Object.values(player.reality.automator.scripts).findIndex(s => s.id === id); + delete player.reality.automator.scripts[saveId]; const idx = this._scripts.findIndex(e => e.id === id); this._scripts.splice(idx, 1); - delete player.reality.automator.scripts[id]; if (this._scripts.length === 0) { this._createDefaultScript(); } diff --git a/src/components/modals/DeleteAutomatorScriptModal.vue b/src/components/modals/DeleteAutomatorScriptModal.vue index e9e6e4ba1..df661b992 100644 --- a/src/components/modals/DeleteAutomatorScriptModal.vue +++ b/src/components/modals/DeleteAutomatorScriptModal.vue @@ -29,17 +29,6 @@ export default { // AutomatorBackend.deleteScript will create an empty script if necessary player.reality.automator.state.editorScript = scriptList[0].id; } - - // Deleting a script leaves a gap in ids, shift all of them down to fill it - let newID = 0; - const shiftedScripts = {}; - for (const id of Object.keys(player.reality.automator.scripts)) { - shiftedScripts[newID] = player.reality.automator.scripts[id]; - shiftedScripts[newID].id = newID; - newID++; - } - player.reality.automator.scripts = shiftedScripts; - EventHub.dispatch(GAME_EVENT.AUTOMATOR_SAVE_CHANGED); }, }, diff --git a/src/components/tabs/automator/AutomatorControls.vue b/src/components/tabs/automator/AutomatorControls.vue index 2c4eda230..fc3a47355 100644 --- a/src/components/tabs/automator/AutomatorControls.vue +++ b/src/components/tabs/automator/AutomatorControls.vue @@ -13,7 +13,10 @@ export default { repeatOn: false, forceRestartOn: false, followExecution: false, + hasErrors: false, currentLine: 0, + runningName: "", + editingName: "", }; }, computed: { @@ -34,17 +37,16 @@ export default { }; }, statusText() { - // TODO Check for correct script, add script name to running - const prefix = "Status: "; // Pad with leading zeroes based on script length to prevent text jitter on fast scripts. This technically fails // for scripts with more than 99999 lines, but scripts that long will be prevented elsewhere - const digits = Math.ceil(Math.log10(AutomatorBackend.currentScriptLength)); + const digits = Math.clampMin(Math.ceil(Math.log10(AutomatorBackend.currentScriptLength)), 1); let lineNum = `0000${this.currentLine}`; lineNum = lineNum.slice(lineNum.length - digits); - if (this.isPaused) return `${prefix}Paused (Will run line ${lineNum} when resumed)`; - if (!this.isRunning) return `${prefix}Not running (Will start at beginning)`; - return `${prefix}Running (Last executed line ${lineNum})`; + if (this.isPaused) return `Paused: "${this.runningName}" (Resumes on Line ${lineNum})`; + if (this.isRunning) return `Running: "${this.runningName}" (Line ${lineNum})`; + if (this.hasErrors) return `Stopped: "${this.editingName}" has errors (Cannot run)`; + return `Stopped: Will start running "${this.editingName}"`; }, }, methods: { @@ -54,10 +56,14 @@ export default { this.repeatOn = AutomatorBackend.state.repeat; this.forceRestartOn = AutomatorBackend.state.forceRestart; this.followExecution = AutomatorBackend.state.followExecution; - if (this.isRunning) this.currentLine = AutomatorBackend.currentLineNumber; + this.hasErrors = AutomatorData.currentErrors().length !== 0; + this.currentLine = AutomatorBackend.currentLineNumber; + this.runningName = AutomatorBackend.scriptName; + this.editingName = AutomatorBackend.currentEditingScript.name; }, rewind: () => AutomatorBackend.restart(), play() { + if (this.hasErrors) return; if (this.isRunning) { AutomatorBackend.pause(); return; @@ -122,8 +128,14 @@ export default { :class="{ 'c-automator__button--active' : followExecution }" @click="follow" /> +
+ {{ editingName }} +
-
+
{{ statusText }}
@@ -137,6 +149,14 @@ export default { padding: 0 0.5rem; } +.c-automator__status-text--edit { + color: var(--color-accent); +} + +.c-automator__status-text--error { + color: var(--color-bad); +} + .c-automator__button--active { background-color: var(--color-reality); border-color: var(--color-reality-light); diff --git a/src/components/tabs/automator/AutomatorEditor.vue b/src/components/tabs/automator/AutomatorEditor.vue index 31e711fda..0370118c3 100644 --- a/src/components/tabs/automator/AutomatorEditor.vue +++ b/src/components/tabs/automator/AutomatorEditor.vue @@ -13,11 +13,6 @@ export default { data() { return { automatorType: 0, - runningScriptID: 0, - activeLineInfo: { - lineNumber: 0, - scriptID: 0, - } }; }, computed: { @@ -49,20 +44,7 @@ export default { }, methods: { update() { - this.runningScriptID = AutomatorBackend.state.topLevelScript; this.automatorType = player.reality.automator.type; - if (AutomatorBackend.isOn) { - this.activeLineInfo = { - lineNumber: AutomatorBackend.stack.top.lineNumber, - scriptID: AutomatorBackend.state.topLevelScript, - }; - } else { - this.activeLineInfo = { - lineNumber: 0, - scriptID: "0", - }; - if (AutomatorTextUI.editor) AutomatorTextUI.editor.performLint(); - } }, onGameLoad() { this.updateCurrentScriptID(); diff --git a/src/components/tabs/automator/AutomatorModeSwitch.vue b/src/components/tabs/automator/AutomatorModeSwitch.vue index 0e5e7b4a6..8dbd512a1 100644 --- a/src/components/tabs/automator/AutomatorModeSwitch.vue +++ b/src/components/tabs/automator/AutomatorModeSwitch.vue @@ -4,17 +4,9 @@ export default { data() { return { automatorType: 0, - runningScriptID: 0, - activeLineInfo: { - lineNumber: 0, - scriptID: 0, - } }; }, computed: { - fullScreen() { - return this.$viewModel.tabs.reality.automator.fullScreen; - }, currentScriptID: { get() { return this.$viewModel.tabs.reality.automator.editorScriptID; @@ -49,20 +41,7 @@ export default { }, methods: { update() { - this.runningScriptID = AutomatorBackend.state.topLevelScript; this.automatorType = player.reality.automator.type; - if (AutomatorBackend.isOn) { - this.activeLineInfo = { - lineNumber: AutomatorBackend.stack.top.lineNumber, - scriptID: AutomatorBackend.state.topLevelScript, - }; - } else { - this.activeLineInfo = { - lineNumber: 0, - scriptID: "0", - }; - if (AutomatorTextUI.editor) AutomatorTextUI.editor.performLint(); - } }, onGameLoad() { this.updateCurrentScriptID(); From ed9b9955732d61d8f1189c668b480ff21d902345 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Wed, 18 May 2022 05:30:58 -0500 Subject: [PATCH 0396/1119] Fix automator bugs related to script indexing, add more debug text for player --- .../core/automator/automator-backend.js | 21 +++++--- javascripts/core/storage/dev-migrations.js | 5 ++ .../tabs/automator/AutomatorControls.vue | 52 +++++++++++++++---- .../tabs/automator/AutomatorDocs.vue | 1 + .../tabs/automator/AutomatorEditor.vue | 1 + .../tabs/automator/AutomatorTextEditor.vue | 4 -- 6 files changed, 63 insertions(+), 21 deletions(-) diff --git a/javascripts/core/automator/automator-backend.js b/javascripts/core/automator/automator-backend.js index 28d260f28..a83d409a4 100644 --- a/javascripts/core/automator/automator-backend.js +++ b/javascripts/core/automator/automator-backend.js @@ -242,20 +242,29 @@ export const AutomatorBackend = { return this.isOn && this.mode === AUTOMATOR_MODE.RUN; }, + findRawScriptObject(id) { + const auto = player.reality.automator; + const index = Object.values(auto.scripts).findIndex(s => s.id === id); + return auto.scripts[parseInt(Object.keys(auto.scripts)[index], 10)]; + }, + get currentRunningScript() { - return player.reality.automator.scripts[this.state.topLevelScript]; + return this.findRawScriptObject(this.state.topLevelScript); }, get currentEditingScript() { - const saveIndex = Object.values(player.reality.automator.scripts) - .findIndex(s => s.id === player.reality.automator.state.editorScript); - return player.reality.automator.scripts[saveIndex]; + return this.findRawScriptObject(player.reality.automator.state.editorScript); }, get scriptName() { return this.currentRunningScript?.name ?? ""; }, + hasDuplicateName(name) { + const nameArray = Object.values(player.reality.automator.scripts).map(s => s.name); + return nameArray.filter(n => n === name).length > 1; + }, + get currentLineNumber() { if (!this.stack.top) return -1; @@ -385,7 +394,7 @@ export const AutomatorBackend = { } else { this._scripts = scriptIds.map(s => new AutomatorScript(s)); } - if (!scriptIds.includes(`${this.state.topLevelScript}`)) this.state.topLevelScript = scriptIds[0]; + if (!scriptIds.includes(this.state.topLevelScript)) this.state.topLevelScript = scriptIds[0]; const currentScript = this.findScript(this.state.topLevelScript); if (currentScript.commands) { const commands = currentScript.commands; @@ -411,7 +420,7 @@ export const AutomatorBackend = { deleteScript(id) { // We need to delete scripts from two places - in the savefile and compiled AutomatorScript Objects const saveId = Object.values(player.reality.automator.scripts).findIndex(s => s.id === id); - delete player.reality.automator.scripts[saveId]; + delete player.reality.automator.scripts[parseInt(Object.keys(player.reality.automator.scripts)[saveId], 10)]; const idx = this._scripts.findIndex(e => e.id === id); this._scripts.splice(idx, 1); if (this._scripts.length === 0) { diff --git a/javascripts/core/storage/dev-migrations.js b/javascripts/core/storage/dev-migrations.js index 58789eab6..4e6d25eaa 100644 --- a/javascripts/core/storage/dev-migrations.js +++ b/javascripts/core/storage/dev-migrations.js @@ -1318,6 +1318,11 @@ GameStorage.devMigrations = { delete player.celestials.effarig.unlocksBits; delete player.celestials.ra.unlocksBits; }, + player => { + for (const script of Object.values(player.reality.automator.scripts)) { + script.id = parseInt(script.id, 10); + } + }, ], patch(player) { diff --git a/src/components/tabs/automator/AutomatorControls.vue b/src/components/tabs/automator/AutomatorControls.vue index fc3a47355..3b8c006a0 100644 --- a/src/components/tabs/automator/AutomatorControls.vue +++ b/src/components/tabs/automator/AutomatorControls.vue @@ -15,8 +15,10 @@ export default { followExecution: false, hasErrors: false, currentLine: 0, - runningName: "", + statusName: "", editingName: "", + duplicateStatus: false, + duplicateEditing: false, }; }, computed: { @@ -43,10 +45,10 @@ export default { let lineNum = `0000${this.currentLine}`; lineNum = lineNum.slice(lineNum.length - digits); - if (this.isPaused) return `Paused: "${this.runningName}" (Resumes on Line ${lineNum})`; - if (this.isRunning) return `Running: "${this.runningName}" (Line ${lineNum})`; - if (this.hasErrors) return `Stopped: "${this.editingName}" has errors (Cannot run)`; - return `Stopped: Will start running "${this.editingName}"`; + if (this.isPaused) return `Paused: "${this.statusName}" (Resumes on Line ${lineNum})`; + if (this.isRunning) return `Running: "${this.statusName}" (Line ${lineNum})`; + if (this.hasErrors) return `Stopped: "${this.statusName}" has errors (Cannot run)`; + return `Stopped: Will start running "${this.statusName}"`; }, }, methods: { @@ -58,8 +60,15 @@ export default { this.followExecution = AutomatorBackend.state.followExecution; this.hasErrors = AutomatorData.currentErrors().length !== 0; this.currentLine = AutomatorBackend.currentLineNumber; - this.runningName = AutomatorBackend.scriptName; + + // When the automator isn't running, the script name contains the last run script instead of the + // to-be-run script, which is the currently displayed one in the editor + this.statusName = (this.isPaused || this.isRunning) + ? AutomatorBackend.scriptName + : AutomatorBackend.currentEditingScript.name; this.editingName = AutomatorBackend.currentEditingScript.name; + this.duplicateStatus = AutomatorBackend.hasDuplicateName(this.statusName); + this.duplicateEditing = AutomatorBackend.hasDuplicateName(this.editingName); }, rewind: () => AutomatorBackend.restart(), play() { @@ -129,14 +138,31 @@ export default { @click="follow" />
+ {{ editingName }}
-
- {{ statusText }} +
+ + + + {{ statusText }} +
@@ -153,6 +179,10 @@ export default { color: var(--color-accent); } +.c-automator__status-text--warning { + color: var(--color-good-paused); +} + .c-automator__status-text--error { color: var(--color-bad); } diff --git a/src/components/tabs/automator/AutomatorDocs.vue b/src/components/tabs/automator/AutomatorDocs.vue index b919ef941..c987762e9 100644 --- a/src/components/tabs/automator/AutomatorDocs.vue +++ b/src/components/tabs/automator/AutomatorDocs.vue @@ -211,6 +211,7 @@ export default { @click="infoPaneID = 4" /> + Switching will stop scripts - - From ada8dc36bfff29da6d4f8bd71f283b6f81dde406 Mon Sep 17 00:00:00 2001 From: Hirame1 <56225774+Hirame1@users.noreply.github.com> Date: Wed, 18 May 2022 23:15:16 +0700 Subject: [PATCH 0397/1119] Fix disclaimer text overflaw --- src/components/tabs/automator/AutomatorDocs.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/tabs/automator/AutomatorDocs.vue b/src/components/tabs/automator/AutomatorDocs.vue index c987762e9..50f9839a4 100644 --- a/src/components/tabs/automator/AutomatorDocs.vue +++ b/src/components/tabs/automator/AutomatorDocs.vue @@ -211,10 +211,11 @@ export default { @click="infoPaneID = 4" /> - Switching will stop scripts +
+ Switching will stop scripts +
@@ -282,9 +283,9 @@ export default { From c712f9a71aa1509fc8e81eef6f9bef6e53e8af19 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Wed, 18 May 2022 21:52:39 +0800 Subject: [PATCH 0409/1119] Make blockmato line number display wider --- public/stylesheets/styles.css | 5 +++-- src/components/tabs/automator/AutomatorSingleBlock.vue | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index c4a13fe2b..37155c971 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -8982,7 +8982,7 @@ kbd { border-top-left-radius: var(--var-border-radius, 1rem); border-bottom-left-radius: var(--var-border-radius, 1rem); box-sizing: border-box; - padding: 0.5rem 0.5rem 0.5rem 2.5rem; + padding: 0.5rem 0.5rem 0.5rem 3.5rem; } .s-base--metro .c-automator-block-editor::-webkit-scrollbar-thumb { @@ -9009,7 +9009,8 @@ input.o-automator-block-input { min-width: 30rem; border: var(--var-border-width, 2px) dotted #55ff55; margin: 0.5rem 0 0.5rem 3rem; - padding: 1rem; + padding: 0.5rem; + padding-bottom: 0; } .o-automator-block-delete { diff --git a/src/components/tabs/automator/AutomatorSingleBlock.vue b/src/components/tabs/automator/AutomatorSingleBlock.vue index 02b616a65..4f21f8bd9 100644 --- a/src/components/tabs/automator/AutomatorSingleBlock.vue +++ b/src/components/tabs/automator/AutomatorSingleBlock.vue @@ -222,10 +222,10 @@ export default { position: absolute; left: 0; display: flex; - justify-content: center; align-items: center; height: 2.85rem; - width: 2.5rem; - font-size: 1.4rem; + width: 3.5rem; + padding: 0.2rem; + font-size: 1.2rem; } From 72391cd4a271812c96c9538abd8aeb42dc9cee08 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Thu, 19 May 2022 18:03:07 +0800 Subject: [PATCH 0410/1119] Apply liquibytes style to mato block line numbers --- public/stylesheets/styles.css | 12 ---- .../tabs/automator/AutomatorBlockEditor.vue | 64 ++++++++++++++----- .../tabs/automator/AutomatorSingleBlock.vue | 12 ++-- 3 files changed, 55 insertions(+), 33 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 37155c971..a52e9b475 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -8973,18 +8973,6 @@ kbd { margin-left: 0; } -.c-automator-block-editor { - position: relative; - overflow-y: scroll; - tab-size: 1.5rem; - height: 100%; - background-color: black; - border-top-left-radius: var(--var-border-radius, 1rem); - border-bottom-left-radius: var(--var-border-radius, 1rem); - box-sizing: border-box; - padding: 0.5rem 0.5rem 0.5rem 3.5rem; -} - .s-base--metro .c-automator-block-editor::-webkit-scrollbar-thumb { border-radius: 0; } diff --git a/src/components/tabs/automator/AutomatorBlockEditor.vue b/src/components/tabs/automator/AutomatorBlockEditor.vue index 70910caf9..0aa8c1801 100644 --- a/src/components/tabs/automator/AutomatorBlockEditor.vue +++ b/src/components/tabs/automator/AutomatorBlockEditor.vue @@ -130,26 +130,56 @@ export const BlockAutomator = { diff --git a/src/components/tabs/automator/AutomatorSingleBlock.vue b/src/components/tabs/automator/AutomatorSingleBlock.vue index 4f21f8bd9..b96d6cd12 100644 --- a/src/components/tabs/automator/AutomatorSingleBlock.vue +++ b/src/components/tabs/automator/AutomatorSingleBlock.vue @@ -219,13 +219,17 @@ export default { From 2695d279b865ec91b1c3c091eb69afb0344ca2da Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Sun, 22 May 2022 11:19:32 +0800 Subject: [PATCH 0411/1119] Address PR feedback Bigger text, move common method to BlockAutomator obj --- src/components/tabs/automator/AutomatorBlockEditor.vue | 8 ++++++-- src/components/tabs/automator/AutomatorSingleBlock.vue | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/tabs/automator/AutomatorBlockEditor.vue b/src/components/tabs/automator/AutomatorBlockEditor.vue index 0aa8c1801..822b9f2bc 100644 --- a/src/components/tabs/automator/AutomatorBlockEditor.vue +++ b/src/components/tabs/automator/AutomatorBlockEditor.vue @@ -33,7 +33,7 @@ export default { this.parseRequest(); }, numberOfLinesInBlock(block) { - return block.nested ? block.nest.reduce((v, b) => v + this.numberOfLinesInBlock(b), 1) : 1; + return BlockAutomator.numberOfLinesInBlock(block); }, lineNumberAtPosition(x) { let number = 1; @@ -125,7 +125,11 @@ export const BlockAutomator = { updateIdArray() { this._idArray = this.blockIdArray(this.lines); - } + }, + + numberOfLinesInBlock(block) { + return block.nested ? block.nest.reduce((v, b) => v + this.numberOfLinesInBlock(b), 1) : 1; + }, }; diff --git a/src/components/tabs/automator/AutomatorSingleBlock.vue b/src/components/tabs/automator/AutomatorSingleBlock.vue index b96d6cd12..fa252a1ba 100644 --- a/src/components/tabs/automator/AutomatorSingleBlock.vue +++ b/src/components/tabs/automator/AutomatorSingleBlock.vue @@ -109,7 +109,7 @@ export default { }; }, numberOfLinesInBlock(block) { - return block.nested ? block.nest.reduce((v, b) => v + this.numberOfLinesInBlock(b), 1) : 1; + return BlockAutomator.numberOfLinesInBlock(block); }, lineNumberAtPosition(x) { let number = 1 + this.lineNumber; @@ -220,13 +220,13 @@ export default { diff --git a/src/components/tabs/infinity-dimensions/ClassicInfinityDimensionRow.vue b/src/components/tabs/infinity-dimensions/ClassicInfinityDimensionRow.vue index 710022315..e36327937 100644 --- a/src/components/tabs/infinity-dimensions/ClassicInfinityDimensionRow.vue +++ b/src/components/tabs/infinity-dimensions/ClassicInfinityDimensionRow.vue @@ -58,6 +58,9 @@ export default { return `Reach ${formatPostBreak(InfinityDimension(this.tier).amRequirement)} AM`; }, + hasLongText() { + return this.costDisplay.length > 15; + }, hardcapPurchases() { return format(this.hardcap, 1, 1); }, @@ -137,6 +140,7 @@ export default { v-tooltip="capTooltip" :enabled="isAvailableForPurchase || (!isUnlocked && canUnlock)" class="o-primary-btn--buy-id l-dim-row__button" + :class="{ 'o-primary-btn--buy-id--small-text': hasLongText }" @click="buySingleInfinityDimension" > {{ costDisplay }} diff --git a/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue b/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue index 4cca6c6e7..041694744 100644 --- a/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue +++ b/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue @@ -58,6 +58,9 @@ export default { return `Reach ${formatPostBreak(InfinityDimension(this.tier).amRequirement)} AM`; }, + hasLongText() { + return this.costDisplay.length > 15; + }, capTooltip() { if (this.enslavedRunning) return `Enslaved prevents the purchase of more than ${format(10)} Infinity Dimensions`; if (this.isCapped) return `Cap reached at ${format(this.capIP)} IP`; @@ -133,6 +136,7 @@ export default { v-tooltip="capTooltip" :enabled="isAvailableForPurchase || (!isUnlocked && canUnlock)" class="o-primary-btn--buy-id l-dim-row__button o-primary-btn o-primary-btn--new" + :class="{ 'o-primary-btn--buy-id--small-text-modern': hasLongText }" @click="buySingleInfinityDimension" > {{ costDisplay }} diff --git a/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue b/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue index 81a85efdc..3857ccdac 100644 --- a/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue +++ b/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue @@ -65,6 +65,9 @@ export default { formattedEPCost() { return this.isCapped ? "Capped" : `${this.showCostTitle ? "Cost: " : ""}${format(this.cost, 2)} EP`; }, + hasLongText() { + return this.buttonContents.length > 15; + }, showCostTitle() { return this.cost.exponent < 1e6; } @@ -133,6 +136,7 @@ export default { v-tooltip="tooltipContents" :enabled="isAvailableForPurchase && !isCapped" class="o-primary-btn--buy-td l-dim-row__button" + :class="{ 'o-primary-btn--buy-td--small-text': hasLongText }" @click="buyTimeDimension" > {{ buttonContents }} diff --git a/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue b/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue index e9e4adf91..0c5685b11 100644 --- a/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue +++ b/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue @@ -67,6 +67,9 @@ export default { formattedEPCost() { return this.isCapped ? "Capped" : `${this.showCostTitle ? "Cost: " : ""}${format(this.cost, 2)} EP`; }, + hasLongText() { + return this.buttonContents.length > 15; + }, showCostTitle() { return this.cost.exponent < 1e6; } @@ -135,6 +138,7 @@ export default { v-tooltip="tooltipContents" :enabled="isAvailableForPurchase && !isCapped" class="o-primary-btn--buy-td l-dim-row__button o-primary-btn o-primary-btn--new" + :class="{ 'o-primary-btn--buy-td--small-text-modern': hasLongText }" @click="buyTimeDimension" > {{ buttonContents }} From a5954154b3500f7484eec732317e5983f9758d11 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Wed, 25 May 2022 04:00:24 -0500 Subject: [PATCH 0434/1119] Eliminate screen jitter from rapidly-changing dimension amounts, fixes #1302 --- .../ClassicAntimatterDimensionRow.vue | 27 ++++++++++++++---- .../ModernAntimatterDimensionRow.vue | 19 ++++++++----- .../ClassicInfinityDimensionRow.vue | 28 +++++++++++++++---- .../ModernInfinityDimensionRow.vue | 17 +++++++---- .../ClassicTimeDimensionRow.vue | 28 +++++++++++++++---- .../ModernTimeDimensionRow.vue | 22 +++++++++++---- 6 files changed, 109 insertions(+), 32 deletions(-) diff --git a/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue b/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue index c8130732c..98cd323f0 100644 --- a/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue +++ b/src/components/tabs/antimatter-dimensions/ClassicAntimatterDimensionRow.vue @@ -139,14 +139,19 @@ export default { + + + diff --git a/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue b/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue index 53a0e08af..5ccc0e7d1 100644 --- a/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue +++ b/src/components/tabs/antimatter-dimensions/ModernAntimatterDimensionRow.vue @@ -131,14 +131,15 @@ export default { diff --git a/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue b/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue index 041694744..1fc4d54c5 100644 --- a/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue +++ b/src/components/tabs/infinity-dimensions/ModernInfinityDimensionRow.vue @@ -117,14 +117,15 @@ export default { + + diff --git a/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue b/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue index 3857ccdac..f379bbe0f 100644 --- a/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue +++ b/src/components/tabs/time-dimensions/ClassicTimeDimensionRow.vue @@ -117,14 +117,21 @@ export default { + + diff --git a/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue b/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue index 0c5685b11..7f7a5bbd7 100644 --- a/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue +++ b/src/components/tabs/time-dimensions/ModernTimeDimensionRow.vue @@ -119,14 +119,15 @@ export default { + + From f2ffab9759972825d1cb5f3c2dc15fcef49b7a36 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Wed, 25 May 2022 04:57:48 -0500 Subject: [PATCH 0435/1119] Fix more text overflows --- public/stylesheets/styles.css | 7 ++++--- src/components/ui-modes/HeaderBlackHole.vue | 14 +++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 8ced192a5..4e0d2cabc 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -1419,13 +1419,14 @@ br { } .o-primary-btn--buy-ad { + height: 4rem; font-size: 1.2rem; } .o-primary-btn--buy-ad--small-text { vertical-align: middle; font-size: 1rem; - line-height: 0.55rem; + line-height: 1rem; } .o-primary-btn--buy-ad--small-text-modern { @@ -1466,7 +1467,7 @@ br { .o-primary-btn--buy-id--small-text { font-size: 1rem; - line-height: 0.55rem; + line-height: 1rem; } .o-primary-btn--buy-id--small-text-modern { @@ -1488,7 +1489,7 @@ br { .o-primary-btn--buy-td--small-text { font-size: 1rem; - line-height: 0.55rem; + line-height: 1rem; } .o-primary-btn--buy-td--small-text-modern { diff --git a/src/components/ui-modes/HeaderBlackHole.vue b/src/components/ui-modes/HeaderBlackHole.vue index 943023efd..7c817a931 100644 --- a/src/components/ui-modes/HeaderBlackHole.vue +++ b/src/components/ui-modes/HeaderBlackHole.vue @@ -28,6 +28,12 @@ export default { id() { return this.blackHole.id; }, + dischargeText() { + return `Discharge: ${timeDisplayShort(this.storedTime)}`; + }, + hasLongText() { + return this.dischargeText.length > 15; + }, }, watch: { isAutoReleasing(newValue) { @@ -100,9 +106,10 @@ export default { - Discharge: {{ timeDisplayShort(storedTime) }} + {{ dischargeText }} @@ -124,4 +131,9 @@ export default { .c-black-hole-status-text { margin: 0 0.8rem; } + +.o-small-discharge-text { + font-size: 1rem; + line-height: 1rem; +} From 7789cf5834e3b81a841cf998c20ff4096d4f6c6e Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Wed, 25 May 2022 17:58:23 +0800 Subject: [PATCH 0436/1119] Make inf upg buy order a bit more obvious --- public/stylesheets/styles.css | 5 -- .../infinity-upgrades/InfinityUpgradesTab.vue | 61 ++++++++++++++++++- 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index ed36f769f..58cc7c8fd 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -3610,11 +3610,6 @@ br { flex-direction: row; } -.l-infinity-upgrade-grid__column { - display: flex; - flex-direction: column; -} - .l-infinity-upgrade-grid__cell { margin: 0.5rem 0.8rem; } diff --git a/src/components/tabs/infinity-upgrades/InfinityUpgradesTab.vue b/src/components/tabs/infinity-upgrades/InfinityUpgradesTab.vue index 8d291bc8d..d8fb6bf05 100644 --- a/src/components/tabs/infinity-upgrades/InfinityUpgradesTab.vue +++ b/src/components/tabs/infinity-upgrades/InfinityUpgradesTab.vue @@ -86,6 +86,24 @@ export default { classObject[`o-infinity-upgrade-btn--color-${column + 1}`] = true; } return classObject; + }, + backgroundOfColumnBg(col) { + // Infinity upgrades are 10 rem tall, if counting margins. + const INF_UPG_HEIGHT = 10; + // The "row" text is 2.5rem tall. + const HEADER_HEIGHT = 2.5; + const MAX_HEIGHT = INF_UPG_HEIGHT * col.length + HEADER_HEIGHT; + + let boughtUpgrades = 0; + for (const upg of col) { + if (upg.isBought) boughtUpgrades++; + } + + const heightUpper = boughtUpgrades >= 4 ? 1 + : Math.max((boughtUpgrades - 1) * INF_UPG_HEIGHT + HEADER_HEIGHT, 0) / MAX_HEIGHT; + const heightLower = (boughtUpgrades * INF_UPG_HEIGHT + HEADER_HEIGHT) / MAX_HEIGHT; + return `linear-gradient(to bottom, var(--color-infinity) 0% ${heightUpper * 100}%, + transparent ${heightLower * 100}%)`; } } }; @@ -114,22 +132,30 @@ export default { You cannot get any Charged Infinity Upgrades while in Doomed.

+ Within each column, the upgrades must be purchased from top to bottom. +
+ Column {{ columnId + 1 }} +
@@ -148,5 +174,36 @@ export default { From a0ba2a0be33720fe9dcac0e853dd844be33ed6c4 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Wed, 25 May 2022 19:43:51 +0800 Subject: [PATCH 0437/1119] Revamp the blockmato line code Uses static elements instead of absolute ones. --- public/stylesheets/styles.css | 19 +++--- .../tabs/automator/AutomatorBlockEditor.vue | 61 ++++++++++++------- .../tabs/automator/AutomatorSingleBlock.vue | 43 ++++--------- 3 files changed, 59 insertions(+), 64 deletions(-) diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index a52e9b475..595aa5dc2 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -8921,12 +8921,12 @@ kbd { .c-automator-blocks { width: 100%; - padding-bottom: 5rem; + padding: 0.3rem 0.6rem 5rem; } .o-automator-command { display: inline-block; - width: 8.5rem; + min-width: 8.5rem; color: #c080ff; background: #000115; border: 0.1rem solid #353535; @@ -8954,8 +8954,10 @@ kbd { .c-automator-block-row { display: flex; + min-height: 2.85rem; + max-height: 2.85rem; align-items: center; - margin-bottom: 0.5rem; + margin: 0.3rem 0; } .c-automator-block-row > * { @@ -8968,9 +8970,11 @@ kbd { .c-automator-block-row-ghost { display: block; + width: 100%; margin: auto; margin-bottom: 0.5rem; margin-left: 0; + padding: 0.3rem 0.6rem; } .s-base--metro .c-automator-block-editor::-webkit-scrollbar-thumb { @@ -8992,15 +8996,6 @@ input.o-automator-block-input { color: #00ff00; } -.l-automator-nested-block { - width: fit-content; - min-width: 30rem; - border: var(--var-border-width, 2px) dotted #55ff55; - margin: 0.5rem 0 0.5rem 3rem; - padding: 0.5rem; - padding-bottom: 0; -} - .o-automator-block-delete { font-size: 1.7rem; color: #ff3333; diff --git a/src/components/tabs/automator/AutomatorBlockEditor.vue b/src/components/tabs/automator/AutomatorBlockEditor.vue index 9c28ce38a..0b3871df7 100644 --- a/src/components/tabs/automator/AutomatorBlockEditor.vue +++ b/src/components/tabs/automator/AutomatorBlockEditor.vue @@ -17,14 +17,21 @@ export default { set(value) { this.$viewModel.tabs.reality.automator.lines = value; } - } + }, + numberOfLines() { + return this.lines.reduce((a, l) => a + BlockAutomator.numberOfLinesInBlock(l), 0); + }, }, mounted() { this.$refs.blockEditorElement.scrollTo(0, BlockAutomator.previousScrollPosition); + // We want to set it here directly instead of through v-bind because it's slightly faster and less jittery + this.$refs.editorGutter.style.bottom = `${BlockAutomator.previousScrollPosition}px`; }, methods: { setPreviousScroll() { BlockAutomator.previousScrollPosition = this.$refs.blockEditorElement.scrollTop; + // We want to set it here directly instead of through v-bind because it's slightly faster and less jittery + this.$refs.editorGutter.style.bottom = `${BlockAutomator.previousScrollPosition}px`; }, parseRequest() { BlockAutomator.parseTextFromBlocks(); @@ -38,16 +45,6 @@ export default { this.lines.splice(idx, 1); this.parseRequest(); }, - numberOfLinesInBlock(block) { - return BlockAutomator.numberOfLinesInBlock(block); - }, - lineNumberAtPosition(x) { - let number = 1; - for (let i = 0; i < x; i++) { - number += this.numberOfLinesInBlock(this.lines[i]); - } - return number; - } } }; @@ -143,7 +140,21 @@ export const BlockAutomator = { diff --git a/src/components/tabs/glyphs/sidebar/GlyphCleanButtonGroup.vue b/src/components/tabs/glyphs/sidebar/GlyphCleanButtonGroup.vue index 9cc62bba0..cf28f0572 100644 --- a/src/components/tabs/glyphs/sidebar/GlyphCleanButtonGroup.vue +++ b/src/components/tabs/glyphs/sidebar/GlyphCleanButtonGroup.vue @@ -26,9 +26,12 @@ export default { ANY other glyph${this.hasPerkShop ? " (includes Music Glyphs)" : ""}`; }, deleteRejectedTooltip() { + const negativeWarning = AutoGlyphProcessor.hasNegativeEffectScore() + ? " You also have some negative Effect Filter scores; this may remove some Glyphs you normally want to keep!" + : ""; return this.removeCount === 0 - ? `This will not remove any Glyphs, adjust your filter settings to remove some.` - : `This will remove ${quantifyInt("Glyph", this.removeCount)}!`; + ? `This will not remove any Glyphs, adjust your Filter settings to remove some.` + : `This will remove ${quantifyInt("Glyph", this.removeCount)}!${negativeWarning}`; } }, methods: { diff --git a/src/components/tabs/glyphs/sidebar/GlyphFilterPanel.vue b/src/components/tabs/glyphs/sidebar/GlyphFilterPanel.vue index d5a1b998b..80f1c785f 100644 --- a/src/components/tabs/glyphs/sidebar/GlyphFilterPanel.vue +++ b/src/components/tabs/glyphs/sidebar/GlyphFilterPanel.vue @@ -56,8 +56,8 @@ export default { }; }, questionmarkTooltip() { - return "All Glyph choices are given a score based on the chosen option, and the Glyph with the highest score " + - "is picked. If this Glyph is below a mode-specific threshold, it will be Sacrificed instead."; + return "All Glyph choices are given a score and compared to a threshold based on the chosen mode. " + + "The Glyph with the highest score is picked, but will still be Sacrificed if below the threshold."; }, unlockedModes() { return Object.values(this.modes).filter(idx => this.isUnlocked(idx)); @@ -168,7 +168,11 @@ export default { .filter(s => s > this.rarityThresholds[type]) .min(); this.setRarityThreshold(type, newRarity); - } + }, + showFilterHowTo() { + ui.view.h2pForcedTab = GameDatabase.h2p.tabs.filter(tab => tab.name === "Advanced Glyph Mechanics")[0]; + Modal.h2p.show(); + }, } }; @@ -180,6 +184,7 @@ export default {
?
From 9b595068a512697e3aefc8293bd1b66c09fb50b0 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Fri, 22 Jul 2022 08:59:20 -0500 Subject: [PATCH 0725/1119] Fix #2700, allow Secret Achievement 37 to work with alternate text --- .../secret-formula/achievements/secret-achievements.js | 2 +- src/components/modals/StudyStringModal.vue | 9 +++++++-- src/components/tabs/shop/ShopTab.vue | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/javascripts/core/secret-formula/achievements/secret-achievements.js b/javascripts/core/secret-formula/achievements/secret-achievements.js index 19f46e176..0bb9ee9b8 100644 --- a/javascripts/core/secret-formula/achievements/secret-achievements.js +++ b/javascripts/core/secret-formula/achievements/secret-achievements.js @@ -120,7 +120,7 @@ GameDatabase.achievements.secret = [ { id: 33, name: "A sound financial decision", - description: "Click on the donate link." + description: "Click on the button to purchase STD coins." }, { id: 34, diff --git a/src/components/modals/StudyStringModal.vue b/src/components/modals/StudyStringModal.vue index 05cbc4892..4272bcd7d 100644 --- a/src/components/modals/StudyStringModal.vue +++ b/src/components/modals/StudyStringModal.vue @@ -115,8 +115,13 @@ export default { return TimeStudyTree.isValidImportString(this.truncatedInput); }, inputIsSecret() { - return sha512_256(this.truncatedInput.toLowerCase()) === - "08b819f253b684773e876df530f95dcb85d2fb052046fa16ec321c65f3330608"; + // The button to open the modal and the actual modal itself display two different strings; + // we should allow either to unlock the secret achievement + const secretStrings = [ + "08b819f253b684773e876df530f95dcb85d2fb052046fa16ec321c65f3330608", + "bb450c2a3869bae412ed0b4304dc229521fc69f0fdcc95b3b61460aaf5658fc4" + ]; + return secretStrings.includes(sha512_256(this.input.toLowerCase())); }, }, // Needs to be assigned in created() or else they will end up being undefined when importing diff --git a/src/components/tabs/shop/ShopTab.vue b/src/components/tabs/shop/ShopTab.vue index 623b45adc..0fc726e70 100644 --- a/src/components/tabs/shop/ShopTab.vue +++ b/src/components/tabs/shop/ShopTab.vue @@ -26,6 +26,7 @@ export default { this.kongEnabled = kong.enabled; }, showStore() { + SecretAchievement(33).unlock(); if (!this.kongEnabled) return; Modal.shop.show(); }, From 9286a4c7c8f9cfb78d7c4f20e99a0e24c2ae0f15 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Fri, 22 Jul 2022 10:35:44 -0500 Subject: [PATCH 0726/1119] Add infotext on time study tab --- .../tabs/time-studies/DilationTimeStudy.vue | 14 +++++++++++++- .../tt-shop/TimeStudySaveLoadButton.vue | 12 ++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/components/tabs/time-studies/DilationTimeStudy.vue b/src/components/tabs/time-studies/DilationTimeStudy.vue index 0eae9b5f3..5fb379d5e 100644 --- a/src/components/tabs/time-studies/DilationTimeStudy.vue +++ b/src/components/tabs/time-studies/DilationTimeStudy.vue @@ -18,6 +18,8 @@ export default { return { showRequirement: false, maxTT: new Decimal(), + currTT: new Decimal(), + ttGen: new Decimal(), }; }, computed: { @@ -38,6 +40,11 @@ export default { return `Requirement: ${format("1e4000")} Eternity Points${achRows}`; } return ""; + }, + theoremTimeEstimate() { + if (!this.study.cost || this.ttGen.eq(0)) return null; + const time = Decimal.sub(this.study.cost, this.currTT).dividedBy(this.ttGen); + return time.gt(0) ? `Enough TT in ${TimeSpan.fromSeconds(time.toNumber()).toStringShort()}` : null; } }, methods: { @@ -49,13 +56,18 @@ export default { if (this.id === 6) { this.showRequirement = !Pelle.isDoomed; } + this.currTT.copyFrom(Currency.timeTheorems.value); + this.ttGen.copyFrom(getTTPerSecond().times(getGameSpeedupFactor())); } } }; From ea9e558be258a73b2a1d4569c0246b953d42f3f3 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Tue, 12 Jul 2022 20:23:52 +0800 Subject: [PATCH 0736/1119] Add more control to cel quote history modal Allow arrow key navigation Allow clicking on slides to make them appear --- javascripts/core/hotkeys.js | 2 +- .../CelestialQuoteHistoryModal.vue | 37 +++++++++++++++---- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/javascripts/core/hotkeys.js b/javascripts/core/hotkeys.js index a18a3e914..67b1aa57c 100644 --- a/javascripts/core/hotkeys.js +++ b/javascripts/core/hotkeys.js @@ -419,7 +419,7 @@ function keyboardVisibleTabsToggle() { } EventHub.logic.on(GAME_EVENT.ARROW_KEY_PRESSED, direction => { - if (Quote.isOpen) return; + if (Quote.isOpen || Modal.celestialQuoteHistory.isOpen) return; // Current tabs. Defined here as both tab and subtab movements require knowing your current tab. const currentTab = Tabs.current.key; if (direction[0] === "up" || direction[0] === "down") { diff --git a/src/components/modals/celestial-quotes/CelestialQuoteHistoryModal.vue b/src/components/modals/celestial-quotes/CelestialQuoteHistoryModal.vue index 2bcb1018d..dd61b6e9d 100644 --- a/src/components/modals/celestial-quotes/CelestialQuoteHistoryModal.vue +++ b/src/components/modals/celestial-quotes/CelestialQuoteHistoryModal.vue @@ -38,13 +38,26 @@ export default { }; }, }, + created() { + this.$nextTick(() => { + this.on$(GAME_EVENT.ARROW_KEY_PRESSED, arrow => { + switch (arrow[0]) { + case "up": + this.progressUp(); + break; + case "down": + this.progressDown(); + } + }); + }); + }, methods: { update() { this.unlockedQuotes = this.quotes.filter(x => x.isUnlocked); }, quoteStyle(id) { return { - top: `calc(50vh + ${(id - this.focusedQuote) * 10}rem)`, + top: `calc(50vh + ${easeOut(id - this.focusedQuote) * 15}rem)`, transform: `translate(-50%, -50%) scale(${Math.max(1 - Math.abs(id - this.focusedQuote) / 4, 0)})`, "z-index": 6 - Math.abs(id - this.focusedQuote) }; @@ -57,6 +70,10 @@ export default { } } }; + +function easeOut(x) { + return Math.sign(x) * (Math.abs(x) ** 0.6); +} From b0cb59c40067a6d326dd6e11bd0a100101728bf6 Mon Sep 17 00:00:00 2001 From: Dys <50160441+Dystopia-user181@users.noreply.github.com> Date: Tue, 12 Jul 2022 20:52:29 +0800 Subject: [PATCH 0737/1119] Add hovering to cel quote history btn, fix #2822 --- src/components/CelestialQuoteHistory.vue | 13 ++++++++++--- .../CelestialQuoteBackground.vue | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/components/CelestialQuoteHistory.vue b/src/components/CelestialQuoteHistory.vue index d29a687d3..7d8b9bc7d 100644 --- a/src/components/CelestialQuoteHistory.vue +++ b/src/components/CelestialQuoteHistory.vue @@ -8,7 +8,7 @@ export default { } }, computed: { - borderColor() { + color() { return this.celestial === "laitela" ? `var(--color-laitela--accent)` : `var(--color-${this.celestial}--base)`; } }, @@ -24,7 +24,7 @@ export default { diff --git a/src/components/modals/prestige/EnterCelestialsModal.vue b/src/components/modals/prestige/EnterCelestialsModal.vue index 2e28e5795..ad36ebec5 100644 --- a/src/components/modals/prestige/EnterCelestialsModal.vue +++ b/src/components/modals/prestige/EnterCelestialsModal.vue @@ -44,7 +44,7 @@ export default { }, extraLine() { switch (this.number) { - case 0: return `Your highest Teresa completetion was for ${format(this.teresaBestAM, 2, 2)} + case 0: return `Your highest Teresa completion was for ${format(this.teresaBestAM, 2, 2)} antimatter, gaining you a ${formatX(this.teresaRunMult, 2)} multiplier to Glyph Sacrifice power.`; case 1: return this.effarigDone ? "Effarig is completed!" diff --git a/src/components/tabs/celestial-enslaved/EnslavedTab.vue b/src/components/tabs/celestial-enslaved/EnslavedTab.vue index 403c19475..bdad7b4d4 100644 --- a/src/components/tabs/celestial-enslaved/EnslavedTab.vue +++ b/src/components/tabs/celestial-enslaved/EnslavedTab.vue @@ -46,8 +46,8 @@ export default { return Enslaved.storedTimeInsideEnslaved(this.storedBlackHole); }, realityTitle() { - if (this.isRunning) return "You're inside Enslaved Ones' Reality"; - return "Start Enslaved One's Reality"; + if (this.isRunning) return "You are inside The Enslaved Ones' Reality"; + return "Start The Enslaved Ones' Reality"; }, runButtonClassObject() { return { diff --git a/src/components/tabs/celestial-pelle/PelleRiftBar.vue b/src/components/tabs/celestial-pelle/PelleRiftBar.vue index a6b67a4dc..5114c4966 100644 --- a/src/components/tabs/celestial-pelle/PelleRiftBar.vue +++ b/src/components/tabs/celestial-pelle/PelleRiftBar.vue @@ -69,9 +69,9 @@ export default { if (typeof milestone.description === "string") return milestone.description; return milestone.description(); }, - // One-off formatting function; needs to format large Decimals and a small number assumed to be a percentage + // One-off formatting function; needs to format large Decimals and a small number assumed to be an integer percent formatRift(value) { - return typeof value === "number" ? formatPercents(value, 3) : format(value, 2); + return typeof value === "number" ? `${formatInt(100 * value)}%` : format(value, 2); }, toggle() { if (!this.isMaxed) this.rift.toggle(); From ead60cc6a73f701b29f11688ba3bfa0ae6621b57 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 28 Jul 2022 05:55:47 -0500 Subject: [PATCH 0800/1119] Change Teresa-25 reward to apply more consistently --- javascripts/core/dilation.js | 22 ++++++++++++++----- .../core/secret-formula/celestials/ra.js | 4 ++-- javascripts/game.js | 6 ++++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/javascripts/core/dilation.js b/javascripts/core/dilation.js index 7d2e86f0d..c18151e07 100644 --- a/javascripts/core/dilation.js +++ b/javascripts/core/dilation.js @@ -135,6 +135,7 @@ export function getDilationGainPerSecond() { function tachyonGainMultiplier() { if (Pelle.isDisabled("tpMults")) return new Decimal(1); + const pow = Enslaved.isRunning ? Enslaved.tachyonNerf : 1; return DC.D1.timesEffectsOf( DilationUpgrade.tachyonGain, GlyphSacrifice.dilation, @@ -142,7 +143,7 @@ function tachyonGainMultiplier() { RealityUpgrade(4), RealityUpgrade(8), RealityUpgrade(15) - ); + ).pow(pow); } export function rewardTP() { @@ -150,13 +151,22 @@ export function rewardTP() { player.dilation.lastEP = Currency.eternityPoints.value; } +// This function exists to apply Teresa-25 in a consistent way; TP multipliers can be very volatile and +// applying the reward only once upon unlock promotes min-maxing the upgrade by unlocking dilation with +// TP multipliers as large as possible. Applying the reward to a base TP value and letting the multipliers +// act dynamically on this fixed base value elsewhere solves that issue +export function getBaseTP(antimatter) { + const am = (isInCelestialReality() || Pelle.isDoomed) + ? antimatter + : Ra.unlocks.unlockDilationStartingTP.effectOrDefault(antimatter); + let baseTP = Decimal.pow(Decimal.log10(am) / 400, 1.5); + if (Enslaved.isRunning) baseTP = baseTP.pow(Enslaved.tachyonNerf); + return baseTP; +} + // Returns the TP that would be gained this run export function getTP(antimatter) { - let tachyon = Decimal - .pow(Decimal.log10(antimatter) / 400, 1.5) - .times(tachyonGainMultiplier()); - if (Enslaved.isRunning) tachyon = tachyon.pow(Enslaved.tachyonNerf); - return tachyon; + return getBaseTP(antimatter).times(tachyonGainMultiplier()); } // Returns the amount of TP gained, subtracting out current TP; used only for displaying gained TP diff --git a/javascripts/core/secret-formula/celestials/ra.js b/javascripts/core/secret-formula/celestials/ra.js index 41d86fe8c..517fb4657 100644 --- a/javascripts/core/secret-formula/celestials/ra.js +++ b/javascripts/core/secret-formula/celestials/ra.js @@ -93,8 +93,8 @@ GameDatabase.celestials.ra = { }, unlockDilationStartingTP: { id: 6, - reward: `When unlocking Time Dilation in non-celestial Realities, gain Tachyon Particles as if you reached - the square root of your total antimatter in Dilation`, + reward: `In non-celestial Realities, gain Tachyon Particles as if you reached the square root of your total + antimatter in Dilation. Any multipliers to TP gain are applied retroactively, even outside Dilation`, effect: () => player.records.totalAntimatter.pow(0.5), pet: "teresa", level: 25, diff --git a/javascripts/game.js b/javascripts/game.js index 24d30d368..f92d7ba9e 100644 --- a/javascripts/game.js +++ b/javascripts/game.js @@ -581,7 +581,11 @@ export function gameLoop(passDiff, options = {}) { applyAutoUnlockPerks(); if (GlyphSelection.active) GlyphSelection.update(gainedGlyphLevel()); - if (player.dilation.active && Ra.unlocks.autoTP.canBeApplied && !Pelle.isDoomed) rewardTP(); + // There are some external checks which prevent excessive resource gain with Teresa-25; it may give TP outside of + // dilation, but the TP gain function is also coded to behave differently if it's active + const teresa2 = player.dilation.active && Ra.unlocks.autoTP.canBeApplied; + const teresa25 = !isInCelestialReality() && Ra.unlocks.unlockDilationStartingTP.canBeApplied; + if ((teresa2 || teresa25) && !Pelle.isDoomed) rewardTP(); if (!EnslavedProgress.hintsUnlocked.hasProgress && Enslaved.has(ENSLAVED_UNLOCKS.RUN) && !Enslaved.isCompleted) { player.celestials.enslaved.hintUnlockProgress += Enslaved.isRunning ? realDiff : realDiff / 25; From 812daa7544f636bdd901937ebe913b9a55b9a0bd Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 28 Jul 2022 07:05:35 -0500 Subject: [PATCH 0801/1119] Add gamespeed to Modern header, fix text bugs --- javascripts/core/dimboost.js | 16 ++++++++-------- javascripts/core/secret-formula/news.js | 2 +- src/components/GameSpeedDisplay.vue | 15 +++++++++++++-- src/components/GlyphComponent.vue | 14 +++++++------- src/components/modals/AwayProgressEntry.vue | 2 +- .../tabs/antimatter-dimensions/TickspeedRow.vue | 12 +----------- src/components/ui-modes/HeaderTickspeedRow.vue | 14 +------------- src/components/ui-modes/modern/ModernUi.vue | 7 ++++++- 8 files changed, 38 insertions(+), 44 deletions(-) diff --git a/javascripts/core/dimboost.js b/javascripts/core/dimboost.js index 5b43c350e..4983fbef9 100644 --- a/javascripts/core/dimboost.js +++ b/javascripts/core/dimboost.js @@ -141,15 +141,15 @@ export class DimBoost { if (boosts >= DimBoost.maxDimensionsUnlockable - 1) dimensionRange = `to all Dimensions`; let boostEffects; - if (NormalChallenge(8).isRunning) boostEffects = newUnlock === "" ? "" : ` to ${newUnlock}`; - else if (newUnlock === "") boostEffects = ` to ${formattedMultText} ${dimensionRange}`; - else boostEffects = ` to ${newUnlock} and ${formattedMultText} ${dimensionRange}`; + if (NormalChallenge(8).isRunning) boostEffects = newUnlock; + else if (newUnlock === "") boostEffects = `${formattedMultText} ${dimensionRange}`; + else boostEffects = `${newUnlock} and ${formattedMultText} ${dimensionRange}`; - const areDimensionsReset = `Reset - ${((Perk.antimatterNoReset.isBought || Achievement(111).isUnlocked) && - (!Pelle.isDoomed || PelleUpgrade.dimBoostResetsNothing.isBought)) ? "nothing" : "your Dimensions"}`; - - return `${areDimensionsReset}${boostEffects}`; + if (boostEffects === "") return "Dimension Boosts are currently useless"; + const areDimensionsKept = (Perk.antimatterNoReset.isBought || Achievement(111).isUnlocked) && + (!Pelle.isDoomed || PelleUpgrade.dimBoostResetsNothing.isBought); + if (areDimensionsKept) return boostEffects.capitalize(); + return `Reset your Dimensions to ${boostEffects}`; } static get purchasedBoosts() { diff --git a/javascripts/core/secret-formula/news.js b/javascripts/core/secret-formula/news.js index 14d2b9cbe..5c5a73c81 100644 --- a/javascripts/core/secret-formula/news.js +++ b/javascripts/core/secret-formula/news.js @@ -1505,7 +1505,7 @@ GameDatabase.news = [ { id: "a252", get text() { - return `This message is dilated.`; + return `This message is dilated.`; }, }, { diff --git a/src/components/GameSpeedDisplay.vue b/src/components/GameSpeedDisplay.vue index b9f258079..7b77ee8dd 100644 --- a/src/components/GameSpeedDisplay.vue +++ b/src/components/GameSpeedDisplay.vue @@ -1,6 +1,12 @@ diff --git a/src/components/GlyphComponent.vue b/src/components/GlyphComponent.vue index be77a95e2..9b0173ef0 100644 --- a/src/components/GlyphComponent.vue +++ b/src/components/GlyphComponent.vue @@ -267,6 +267,13 @@ export default { update() { this.logTotalSacrifice = GameCache.logTotalGlyphSacrifice.value; this.colorTimer = (this.colorTimer + 4) % 1000; + this.sacrificeReward = GlyphSacrificeHandler.glyphSacrificeGain(this.glyph); + this.uncappedRefineReward = ALCHEMY_BASIC_GLYPH_TYPES.includes(this.glyph.type) + ? GlyphSacrificeHandler.glyphRawRefinementGain(this.glyph) + : 0; + this.refineReward = ALCHEMY_BASIC_GLYPH_TYPES.includes(this.glyph.type) + ? GlyphSacrificeHandler.glyphRefinementGain(this.glyph) + : 0; }, // This produces a linearly interpolated color between the basic glyph colors, but with RGB channels copied and // hardcoded from the color data because that's probably preferable to a very hacky hex conversion method. The @@ -300,13 +307,6 @@ export default { glyphInfo.sacrificeValue = GlyphSacrificeHandler.glyphSacrificeGain(this.glyph); glyphInfo.refineValue = GlyphSacrificeHandler.glyphRawRefinementGain(this.glyph); this.$viewModel.tabs.reality.currentGlyphTooltip = this.componentID; - this.sacrificeReward = GlyphSacrificeHandler.glyphSacrificeGain(this.glyph); - this.uncappedRefineReward = ALCHEMY_BASIC_GLYPH_TYPES.includes(this.glyph.type) - ? GlyphSacrificeHandler.glyphRawRefinementGain(this.glyph) - : 0; - this.refineReward = ALCHEMY_BASIC_GLYPH_TYPES.includes(this.glyph.type) - ? GlyphSacrificeHandler.glyphRefinementGain(this.glyph) - : 0; if ( AutoGlyphProcessor.sacMode === AUTO_GLYPH_REJECT.SACRIFICE || (AutoGlyphProcessor.sacMode === AUTO_GLYPH_REJECT.REFINE_TO_CAP && this.refineReward === 0) diff --git a/src/components/modals/AwayProgressEntry.vue b/src/components/modals/AwayProgressEntry.vue index 1bd71eaf7..0e3b9d7a7 100644 --- a/src/components/modals/AwayProgressEntry.vue +++ b/src/components/modals/AwayProgressEntry.vue @@ -82,7 +82,7 @@ export default { formatPseudo(number) { // Sometimes it's undefined and that throws errors, because this method is also used to determine whether or // not any text is even shown at all and sometimes this gets checked on variables which don't have values yet - if (!number) return ""; + if (number === undefined) return ""; // Surrounding text is formatted differently to specify that this is log10 if (this.isVeryLarge) return formatInt(Math.floor(number.log10())); if (Decimal.lt(number, 1e9)) { diff --git a/src/components/tabs/antimatter-dimensions/TickspeedRow.vue b/src/components/tabs/antimatter-dimensions/TickspeedRow.vue index d4183b210..0de3292a9 100644 --- a/src/components/tabs/antimatter-dimensions/TickspeedRow.vue +++ b/src/components/tabs/antimatter-dimensions/TickspeedRow.vue @@ -37,16 +37,6 @@ export default { tickspeedDisplay() { return `Tickspeed: ${format(this.tickspeed, 2, 3)} / sec`; }, - isGameSpeedNormal() { - return this.gameSpeedMult === 1; - }, - isGameSpeedSlow() { - return this.gameSpeedMult < 1; - }, - formattedFastSpeed() { - const gameSpeedMult = this.gameSpeedMult; - return gameSpeedMult < 10000 ? format(gameSpeedMult, 3, 3) : format(gameSpeedMult, 2, 0); - }, showCostTitle() { return this.cost.exponent < 1000000; }, @@ -91,7 +81,7 @@ export default {
{{ tickspeedDisplay }} {{ multiplierDisplay }} - +
diff --git a/src/components/ui-modes/HeaderTickspeedRow.vue b/src/components/ui-modes/HeaderTickspeedRow.vue index 2eda7c3cc..1ff5d0576 100644 --- a/src/components/ui-modes/HeaderTickspeedRow.vue +++ b/src/components/ui-modes/HeaderTickspeedRow.vue @@ -17,7 +17,6 @@ export default { cost: new Decimal(0), isAffordable: false, tickspeed: new Decimal(0), - gameSpeedMult: 1, galaxyCount: 0, isContinuumActive: false, continuumValue: 0 @@ -39,16 +38,6 @@ export default { tickspeedDisplay() { return `Tickspeed: ${format(this.tickspeed, 2, 3)} / sec`; }, - isGameSpeedNormal() { - return this.gameSpeedMult === 1; - }, - isGameSpeedSlow() { - return this.gameSpeedMult < 1; - }, - formattedFastSpeed() { - const gameSpeedMult = this.gameSpeedMult; - return gameSpeedMult < 10000 ? format(gameSpeedMult, 3, 3) : format(gameSpeedMult, 2, 0); - }, showCostTitle() { return this.cost.exponent < 1000000; }, @@ -71,7 +60,6 @@ export default { this.cost.copyFrom(Tickspeed.cost); this.isAffordable = !isEC9Running && canAfford(Tickspeed.cost); this.tickspeed.copyFrom(Tickspeed.perSecond); - this.gameSpeedMult = getGameSpeedupForDisplay(); this.galaxyCount = player.galaxies; this.isContinuumActive = Laitela.continuumActive; if (this.isContinuumActive) this.continuumValue = Tickspeed.continuumValue; @@ -111,7 +99,7 @@ export default {
{{ tickspeedDisplay }} - +
diff --git a/src/components/ui-modes/modern/ModernUi.vue b/src/components/ui-modes/modern/ModernUi.vue index 9d5a19ac3..cd6ade885 100644 --- a/src/components/ui-modes/modern/ModernUi.vue +++ b/src/components/ui-modes/modern/ModernUi.vue @@ -7,6 +7,8 @@ import HeaderEternityButton from "../HeaderEternityButton"; import HeaderUnlockInfinityDimButton from "../HeaderUnlockInfinityDimButton"; import NewsTicker from "../NewsTicker"; +import GameSpeedDisplay from "@/components/GameSpeedDisplay"; + export default { name: "ModernUi", components: { @@ -16,7 +18,8 @@ export default { HeaderAmountsLine, HeaderUnlockInfinityDimButton, NewsTicker, - HeaderBlackHole + HeaderBlackHole, + GameSpeedDisplay }, data() { return { @@ -145,6 +148,8 @@ export default {

You have {{ format(antimatter, 2, 1) }} antimatter.

You are getting {{ format(antimatterPerSec, 2, 0) }} antimatter per second.
+
+
From b98c80ff9dfba304ac03eaa00fd25682acf3f270 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 28 Jul 2022 08:39:58 -0500 Subject: [PATCH 0802/1119] Update h2p entries, fixes #2856 --- javascripts/core/secret-formula/h2p.js | 199 ++++++++++++++++--------- 1 file changed, 127 insertions(+), 72 deletions(-) diff --git a/javascripts/core/secret-formula/h2p.js b/javascripts/core/secret-formula/h2p.js index 205fa9ce8..000ab7832 100644 --- a/javascripts/core/secret-formula/h2p.js +++ b/javascripts/core/secret-formula/h2p.js @@ -1,4 +1,3 @@ -import { Pelle, PelleStrikes } from "../globals"; import { DC } from "../constants"; import { GameDatabase } from "./game-database"; @@ -131,8 +130,47 @@ the game closed. isUnlocked: () => true, tags: ["offline", "away", "progress"], tab: "options/gameplay" - }, - { + }, { + name: "Effect Stacking", + info: () => ` +Most of the effects and upgrades in Antimatter Dimensions largely fall into three categories: +
+- Additive: These effects are typically denoted with a + followed by a number, and add their value to some +base amount. Multiple additive effects are summed up. These can also sometimes show up as subtractive effects which +reduce resource costs. +
+- Multiplicative: These effects are shown either by a × followed by a number or, more rarely, as two numbers +separated by a ➜. Diffrent multiplicative sources always combine by multiplying, never by adding. In some situations, +there may be negative effects or cost reductions that apply in this category as division. +
+- Power: These effects are much rarer and appear as ^ followed by a number. Multiple power effects apply +sequentially, or equivalently by multiplying the values of the power effects together and applying the final value +as a single power. In rare situations, negative effects may apply here in this category as powers which are less +than ${formatInt(1)}. +
+
+Unless otherwise noted when an upgrade or reward replaces an older value, all of these effects stack +with each other. In the case of an upgrade replacing an older value with a newer value, the replacement occurs before +any of the above effects are applied. To determine the final value of a set of effects, the effects from each category +are individually combined, and then applied in the order of additive, multiplicative, then power effects. +
+
+${PlayerProgress.realityUnlocked() || PlayerProgress.dilationUnlocked() + ? "Dilation and any Dilation-like effects apply after all of these other effects are stacked together." + : ""} +
+
+${PlayerProgress.realityUnlocked() + ? `Glyph Effects effectively have two stacking attributes; their internal way of stacking together and the way + they stack with all other game effects. These may not necessarily be the same - for example, the "Antimatter + Dimension Power" effect will stack additively with itself, but then the total effect will be added to + a base value of ${formatInt(1)} and then applied as a power effect to Antimatter Dimensions.` + : ""} +`, + isUnlocked: () => true, + tags: ["offline", "away", "progress"], + tab: "options/gameplay" + }, { name: "Antimatter Dimensions", info: () => ` Antimatter is a resource that is throughout the entire game for purchasing various things as you progress. You start @@ -1063,12 +1101,10 @@ ${EffarigUnlock.run.isUnlocked
Completing Effarig's Reality unlocks ${EffarigUnlock.reality.isUnlocked - // Can't really make a nested template here without generally making a mess of the code - // eslint-disable-next-line prefer-template - ? "a new Glyph type, Effarig Glyphs. Effarig Glyphs have " + - formatInt(7) + " different possible effects, which you can view in the Glyph filter settings. You can only" + - " have one Effarig Glyph equipped at a time, and they can still only have at most " + formatInt(4) + - " effects. Lastly, the RM multiplier and Glyph instability effects can't appear together on the same Glyph." + ? `a new Glyph type, Effarig Glyphs. Effarig Glyphs have + ${formatInt(7)} different possible effects, which you can view in the Glyph filter settings. You can only + have one Effarig Glyph equipped at a time, and they can still only have at most ${formatInt(4)} + effects. Lastly, the RM multiplier and Glyph instability effects can't appear together on the same Glyph.` : "(complete Effarig's Reality to see reward details)"} `, isUnlocked: () => TeresaUnlocks.effarig.canBeApplied, @@ -1234,34 +1270,38 @@ ${format(GameDatabase.celestials.v.mainUnlock.dilatedTime.requirement)} Dilated ${format(GameDatabase.celestials.v.mainUnlock.replicanti.requirement)} Replicanti, all in the same Reality.

-When you meet all of those requirements, you'll be able to access V's Reality. However, completing the -Reality itself is only the beginning. V has six different requirements, each of which require you to make a -certain amount of progress within V's Reality. Completing a requirement rewards you with a V-Achievement. -V-Achievements are permanent and persist after exiting V's reality, and don't all need to be done simultaneously. -
-
-After completing the requirement, the V-Achievement threshold then increases and can be completed again -if you can reach the new goal. You can complete each category of V-Achievement up to six times. -Completed V-Achievements do two things: -
-- Upon reaching certain totals of V-Achievements, you automatically unlock upgrades on the V tab without needing -to spend any resources. -
-- Each V-Achievement also gives you one Space Theorem. -
-
-The goal reduction unlocked by having ${formatInt(2)} V-Achievements allows you to make some V-Achievement requirements -easier to complete by spending Perk Points, down to a limit of whatever the easiest tier requires. -The cost of reducing a goal does not increase as it is used, and will also reduce future tiers as well. -
-
-Space Theorems allow you to purchase Time Studies which are normally forbidden, such as multiple paths in the -split after the improved IP formula, or both Time Studies within a dark/light pair near the bottom. Like Time -Theorems, they are freely given back every time you respec your studies. -With enough Space Theorems you'll eventually be able to purchase every single Time Study at once! -
-
-Reaching ${formatInt(36)} V-Achievements (and therefore completing all of V's Achievements) unlocks the next Celestial. +When you meet all of those requirements, you'll be able to access V's Reality. +${VUnlocks.vAchievementUnlock.isUnlocked + ? `However, completing the Reality itself is only the beginning. V has six different requirements, each of which + require you to make a certain amount of progress within V's Reality. Completing a requirement rewards you with a + V-Achievement. + V-Achievements are permanent and persist after exiting V's reality, and don't all need to be done simultaneously. +
+
+ After completing the requirement, the V-Achievement threshold then increases and can be completed again + if you can reach the new goal. You can complete each category of V-Achievement up to six times. + Completed V-Achievements do two things: +
+ - Upon reaching certain totals of V-Achievements, you automatically unlock upgrades on the V tab without needing + to spend any resources. +
+ - Each V-Achievement also gives you one Space Theorem. +
+
+ The goal reduction unlocked by having ${formatInt(2)} V-Achievements allows you to make some V-Achievement + requirements easier to complete by spending Perk Points, down to a limit of whatever the easiest tier requires. + The cost of reducing a goal does not increase as it is used, and will also reduce future tiers as well. +
+
+ Space Theorems allow you to purchase Time Studies which are normally forbidden, such as multiple paths in the + split after the improved IP formula, or both Time Studies within a dark/light pair near the bottom. Like Time + Theorems, they are freely given back every time you respec your studies. + With enough Space Theorems you'll eventually be able to purchase every single Time Study at once! +
+
+ Reaching ${formatInt(36)} V-Achievements (and therefore completing all of V's Achievements) unlocks the next + Celestial.` + : "(unlock V's Reality to see further details)"} `, isUnlocked: () => Achievement(151).isUnlocked, tags: ["reality", "lategame", "endgame", "girlfriend", "challenges", "achievement", "space", "theorems", @@ -1505,51 +1545,62 @@ Independently of the milestone type, milestones also have an icon indicating wha alias: "Pelle", info: () => ` When you purchase the last Imaginary Upgrade and unlock Pelle, you unlock their tab, where you can find a button to -"Doom your Reality". Dooming your Reality will start a new Doomed Reality, resetting almost the entire game up to -Reality, not giving you any rewards from your progress in your current Reality. -
-When you enter the Doomed Reality, you'll keep all values under the General- and Reality header in the Statistics -tab and all of your best Challenge times. Inside Doomed Realities, multiple upgrades, Time Studies, Challenge and -Celestial rewards, Perks, and other game mechanics are disabled or grant no reward. -You can view the "Show effects in Doomed Reality" in Pelle tab for further information. +"Doom your Reality". In order to Doom your Reality, you must have completed all ${formatInt(17)} rows of achievements +available to you at this point.

-Remnants are a new currency gained on Armageddon resets. Remnant gain is based on your best ever Antimatter, Infinity, -and Eternity Points across all Doomed Realities. Remnants produce Reality Shards which can be spent on Pelle Upgrades. -
-
-Pelle Upgrades can be divided into two categories. The five upgrades in the first row can be repeatedly bought, but -eventually reach a cap. They grant boosts to different aspects of the game, making progression within Doomed Realities -easier. -
-The other upgrades in the bottom rows offer automation and QoL (quality of life) improvements. Everything unlocked from -these upgrades, can't be unlocked by anything else in the game. So for example completing a Normal Challenge won't -give you the corresponding Antimatter Dimension autobuyer back as these are locked behind Pelle Upgrades. -You can toggle a button above upgrade to hide bought upgrades or click the --icon to collapse and hide the entire panel. -
-
-Hotkey: Z will try to perform an Armageddon reset. +${Pelle.isDoomed + ? `Dooming your Reality will start a new Doomed Reality, resetting almost the entire game up to + Reality, not giving you any rewards from your progress in your current Reality. +
+
+ When you enter the Doomed Reality, you keep all values under the General and Reality headers in the Statistics + tab and all of your best Challenge times. Inside Doomed Realities, multiple upgrades, Time Studies, Challenge and + Celestial rewards, Perks, and other game mechanics are disabled or grant no reward. + You can view the "Show effects in Doomed Reality" in Pelle tab for further information. +
+
+ Remnants are a new currency gained on Armageddon resets. Remnant gain is based on your best ever Antimatter, + Infinity Points, and Eternity Points across all Doomed Realities. Remnants produce Reality Shards which can be + spent on Pelle Upgrades. +
+
+ Pelle Upgrades can be divided into two categories. The five upgrades in the first row can be repeatedly bought, + but eventually reach a cap. They grant boosts to different aspects of the game, making progression within Doomed + Realities easier. +
+
+ The other upgrades in the bottom rows offer automation and QoL (quality of life) improvements. Everything unlocked + from these upgrades can't be unlocked by anything else in the game; for example, completing a Normal Challenge + won't give you the corresponding Antimatter Dimension autobuyer back as these are locked behind Pelle Upgrades. + You can toggle a button above upgrade to hide bought upgrades or click the + -icon to collapse and hide the entire panel. +
+
+ Hotkey: Z will try to perform an Armageddon reset.` + : "You must Doom your Reality to read the rest of this entry." +} `, - isUnlocked: () => Pelle.isDoomed, - tags: ["reality", "antimatter", "lategame", "endgame", "final", "hevipelle", "celestial"], + isUnlocked: () => Pelle.isUnlocked, + tags: ["reality", "antimatter", "lategame", "endgame", "final", "hevipelle", "celestial", "doom"], tab: "celestials/pelle" }, { name: "Pelle Strikes", info: () => ` Pelle Strikes are encountered on different events in the Doomed Reality. You have encountered the first Pelle Strike by -reaching Infinity the first time within a Doomed Reality. More Strikes eventually occur by further progression. +reaching Infinity for the first time within a Doomed Reality. More Strikes eventually occur by further progression. Each Pelle Strike adds a nerf to a specific aspect of the game, which can be seen by clicking on the Strike name. Each Pelle Strike also unlocks a Rift bar.
-Rift bars can be filled by clicking them to toggle between "Idle" and "Filling". When active, Rifts consume -${formatInt(3)}% of a Rift specific resource per second. Each Rift offers a Rift specific effect which are based -on the total amount filled. +
+Rift bars can be filled by clicking them to toggle between "Idle" and "Filling", although only two Rifts can be +"Filling" at any given time. When active, Rifts consume ${formatInt(3)}% of a Rift-specific resource per second. Each +Rift offers a Rift-specific effect which are based on the total amount filled. ${PelleStrikes.eternity.hasStrike - ? `An exception for this is Decay/Collapse/Disarray, which effect gets capped once you have drained a total of + ? `An exception for this is Decay/Collapse/Disarray, whose effect gets capped once you have drained a total of ${formatPostBreak(DC.E2000)} replicanti.` : ""} -In addition each Rift offers three rewards for filling them up to a certain percentage. +In addition, each Rift offers three milestone rewards for filling them up to a certain percentage. `, isUnlocked: () => PelleStrikes.infinity.hasStrike, tags: ["reality", "antimatter", "lategame", "endgame", "final", "pelle", "strike", "rift", "celestial"], @@ -1559,10 +1610,14 @@ In addition each Rift offers three rewards for filling them up to a certain perc info: () => ` When you reach ${formatInt(100)}% Recursion/Dispersion/Destruction, you unlock the Galaxy Generator, which can passively generate Galaxies. Generated Galaxies are like Replicanti Galaxies and Tachyon Galaxies in that they affect -Tickspeed as if they were Antimatter Galaxies but they don't increase the cost of your next Antimatter Galaxy. You also -unlock five new upgrades. The first upgrade increases the base amount of Galaxies generated. The other four upgrades -then give a multiplier to this base amount. The first two upgrades can be bought by spending Antimatter and Generated -Galaxies. Replicanti or Tachyon Galaxies can't be spent for purchasing those upgrades.`, +Tickspeed as if they were Antimatter Galaxies, but they don't increase the cost of your next Antimatter Galaxy. You +also unlock five new upgrades. The first upgrade increases the base amount of Galaxies generated. The other four +upgrades then give a multiplier to this base amount. The first two upgrades can be bought by spending Antimatter and +Generated Galaxies. Replicanti or Tachyon Galaxies can't be spent for purchasing those upgrades. +
+
+The Galaxy Generator has a maximum number of Galaxies it can generate, which can only be increased by draining +Rifts once the current cap has been reached.`, isUnlocked: () => Pelle.hasGalaxyGenerator, tags: ["reality", "antimatter", "lategame", "endgame", "final", "pelle", "galaxy", "galaxies", "generator", "celestial"], From 739080271e813b3a78ace62163f4cf65afbe6415 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 28 Jul 2022 09:22:28 -0500 Subject: [PATCH 0803/1119] Fix bugs related to Teresa reality, fixes #2854 --- javascripts/core/reality.js | 4 ++++ src/components/tabs/glyphs/RealityButton.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/javascripts/core/reality.js b/javascripts/core/reality.js index d6eedf0ff..64f2282df 100644 --- a/javascripts/core/reality.js +++ b/javascripts/core/reality.js @@ -284,6 +284,10 @@ function giveRealityRewards(realityProps) { const current = Teresa.runRewardMultiplier; const newMultiplier = Teresa.rewardMultiplier(player.antimatter); const isHigher = newMultiplier > current; + // If the RealityModal for glyph choices shows up because the player hasn't disabled it, at this point of the code + // it's still on the queue. If we don't specifically remove it before showing this message modal, it gets pushed + // back and then isn't removed properly once reality processing is done + ui.view.modal.queue.shift(); Modal.message.show(`You have completed Teresa's Reality! ${isHigher ? `Since you gained more Antimatter, you increased your Glyph Sacrifice multiplier from ${format(current, 2, 2)} to ${format(newMultiplier, 2, 2)}` diff --git a/src/components/tabs/glyphs/RealityButton.vue b/src/components/tabs/glyphs/RealityButton.vue index 1ee40b12b..f7b9194de 100644 --- a/src/components/tabs/glyphs/RealityButton.vue +++ b/src/components/tabs/glyphs/RealityButton.vue @@ -73,6 +73,7 @@ export default { this.isDoomed = Pelle.isDoomed; this.hasRealityStudy = TimeStudy.reality.isBought; this.canReality = isRealityAvailable() && !this.isDoomed; + this.showSpecialEffect = this.hasSpecialReward(); if (!this.canReality) { this.shardsGained = 0; return; @@ -88,7 +89,6 @@ export default { return result; } - this.showSpecialEffect = this.hasSpecialReward(); const multiplier = simulatedRealityCount(false) + 1; this.projectedRM = MachineHandler.gainedRealityMachines.times(multiplier); this.newIMCap = MachineHandler.projectedIMCap; From ed840093c0ed518c10720eb78eeadb9d8e35d01a Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 28 Jul 2022 10:18:58 -0500 Subject: [PATCH 0804/1119] Make relative prestige gain coloring depend on theme text color, fixes #2858 --- public/stylesheets/new-ui-styles.css | 2 +- public/stylesheets/styles.css | 10 ++++--- .../ui-modes/HeaderBigCrunchButton.vue | 28 ++++++++++++----- .../ui-modes/HeaderEternityButton.vue | 30 ++++++++++++++----- 4 files changed, 50 insertions(+), 20 deletions(-) diff --git a/public/stylesheets/new-ui-styles.css b/public/stylesheets/new-ui-styles.css index a7ace91d9..011e5f68f 100644 --- a/public/stylesheets/new-ui-styles.css +++ b/public/stylesheets/new-ui-styles.css @@ -13,7 +13,7 @@ :root .t-normal, :root .t-s9 { - --color-text: white; + --color-text: #ffffff; --color-text-inverted: black; --color-base: #1d1b22; --color-accent: #df5050; diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 73d465e14..85e2cd084 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -48,7 +48,9 @@ html { } :root { - --color-text: black; + /* Don't change this instance of --color-text or any of its values in other themes to not be hex; it's parsed as hex + elsewhere to provide theme-dependent color gradients */ + --color-text: #000000; --color-text-inverted: white; --color-base: #f2f2f2; --color-disabled: #a3a3a3; @@ -94,7 +96,7 @@ html { :root .t-metro, :root .t-inverted-metro, :root .t-s8 { - --color-text: black; + --color-text: #000000; --color-text-inverted: white; --color-base: #eeeeee; --color-disabled: #9e9e9e; @@ -151,7 +153,7 @@ html { } :root .t-s1 { - --color-text: black; + --color-text: #000000; --color-text-inverted: #dbd242; --color-base: #dbd242; --color-disabled: #9a921d; @@ -172,7 +174,7 @@ html { } :root .t-s4 { - --color-text: black; + --color-text: #000000; --color-text-inverted: white; --color-base: #1b00ff; --color-accent: #1b00ff; diff --git a/src/components/ui-modes/HeaderBigCrunchButton.vue b/src/components/ui-modes/HeaderBigCrunchButton.vue index e9bcebaf2..bd4031bf6 100644 --- a/src/components/ui-modes/HeaderBigCrunchButton.vue +++ b/src/components/ui-modes/HeaderBigCrunchButton.vue @@ -36,14 +36,28 @@ export default { "transition-duration": "0.2s" }; - const ratio = this.gainedIP.log10() / this.currentIP.log10(); - const rgb = [ - Math.round(255 - (ratio - 1) * 10 * 255), - Math.round(255 - (1 - ratio) * 10 * 255), - ratio > 1 - ? Math.round(255 - (ratio - 1) * 10 * 255) - : Math.round(255 - (1 - ratio) * 10 * 255) + // Dynamically generate red-text-green based on the CSS entry for text color. This returns a string + // as " #xxxxxx" (Yes, there's a leading space). stepRGB is an array specifying the three RGB codes, + // which is then interpolated in order to generate the final color; only ratios between 0.9-1.1 give + // a color gradient + const textHexCode = getComputedStyle(document.body).getPropertyValue("--color-text").substring(2); + const stepRGB = [ + [255, 0, 0], + [ + parseInt(textHexCode.substring(0, 2), 16), + parseInt(textHexCode.substring(2, 4), 16), + parseInt(textHexCode.substring(4), 16) + ], + [0, 255, 0] ]; + const ratio = this.gainedIP.log10() / this.currentIP.log10(); + const interFn = index => { + if (ratio < 0.9) return stepRGB[0][index]; + if (ratio < 1) return Math.round(stepRGB[0][index] + stepRGB[1][index] * 10 * (ratio - 0.9)); + if (ratio < 1.1) return Math.round(stepRGB[1][index] + stepRGB[2][index] * 10 * (ratio - 1)); + return stepRGB[2][index]; + }; + const rgb = [interFn(0), interFn(1), interFn(2)]; return { color: `rgb(${rgb.join(",")})`, "transition-duration": "0.2s" diff --git a/src/components/ui-modes/HeaderEternityButton.vue b/src/components/ui-modes/HeaderEternityButton.vue index 2f98c2fd4..ea5da8809 100644 --- a/src/components/ui-modes/HeaderEternityButton.vue +++ b/src/components/ui-modes/HeaderEternityButton.vue @@ -45,18 +45,32 @@ export default { "transition-duration": "0s" }; if (this.hover) return { - color: "black", + color: "var(--color-text)", "transition-duration": "0.2s" }; - const ratio = this.gainedEP.log10() / this.currentEP.log10(); - const rgb = [ - Math.round(255 - (ratio - 1) * 10 * 255), - Math.round(255 - (1 - ratio) * 10 * 255), - ratio > 1 - ? Math.round(255 - (ratio - 1) * 10 * 255) - : Math.round(255 - (1 - ratio) * 10 * 255) + // Dynamically generate red-text-green based on the CSS entry for text color. This returns a string + // as " #xxxxxx" (Yes, there's a leading space). stepRGB is an array specifying the three RGB codes, + // which is then interpolated in order to generate the final color; only ratios between 0.9-1.1 give + // a color gradient + const textHexCode = getComputedStyle(document.body).getPropertyValue("--color-text").substring(2); + const stepRGB = [ + [255, 0, 0], + [ + parseInt(textHexCode.substring(0, 2), 16), + parseInt(textHexCode.substring(2, 4), 16), + parseInt(textHexCode.substring(4), 16) + ], + [0, 255, 0] ]; + const ratio = this.gainedEP.log10() / this.currentEP.log10(); + const interFn = index => { + if (ratio < 0) return stepRGB[0][index]; + if (ratio < 1) return Math.round(stepRGB[0][index] + stepRGB[1][index] * ratio); + if (ratio < 2) return Math.round(stepRGB[1][index] + stepRGB[2][index] * (ratio - 1)); + return stepRGB[2][index]; + }; + const rgb = [interFn(0), interFn(1), interFn(2)]; return { color: `rgb(${rgb.join(",")})`, "transition-duration": "0.2s" From 7f759c78276e7895d84c012ea52380516c4be650 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Fri, 29 Jul 2022 11:16:00 -0500 Subject: [PATCH 0805/1119] Expand text in UI choice modal --- src/components/modals/UiChoiceModal.vue | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/modals/UiChoiceModal.vue b/src/components/modals/UiChoiceModal.vue index f8ca0a59b..93d54dda0 100644 --- a/src/components/modals/UiChoiceModal.vue +++ b/src/components/modals/UiChoiceModal.vue @@ -17,11 +17,22 @@ export default { + + From 1c62f47da4b9a26ee2a9559fc91f7d2ff6177c22 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Fri, 29 Jul 2022 11:16:58 -0500 Subject: [PATCH 0806/1119] Make catchup modal openable again, fixes #2855 --- javascripts/core/app/modal.js | 2 +- src/components/modals/catchup/CatchupModal.vue | 11 ++++++++--- src/components/tabs/statistics/StatisticsTab.vue | 7 +++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/javascripts/core/app/modal.js b/javascripts/core/app/modal.js index 478fc7be8..cd734d443 100644 --- a/javascripts/core/app/modal.js +++ b/javascripts/core/app/modal.js @@ -149,7 +149,7 @@ Modal.startEternityChallenge = new ChallengeConfirmationModal(EternityChallengeS Modal.startInfinityChallenge = new ChallengeConfirmationModal(InfinityChallengeStartModal); Modal.startNormalChallenge = new ChallengeConfirmationModal(NormalChallengeStartModal); -Modal.catchup = new TimeModal(CatchupModal); +Modal.catchup = new TimeModal(CatchupModal, -1); Modal.dimensionBoost = new Modal(DimensionBoostModal, 1); Modal.antimatterGalaxy = new Modal(AntimatterGalaxyModal, 1); diff --git a/src/components/modals/catchup/CatchupModal.vue b/src/components/modals/catchup/CatchupModal.vue index aae788db6..77ccfb721 100644 --- a/src/components/modals/catchup/CatchupModal.vue +++ b/src/components/modals/catchup/CatchupModal.vue @@ -28,7 +28,12 @@ export default { return GameProgress(this.progressStage).suggestedResource; }, timeString() { - return TimeSpan.fromMilliseconds(this.diff).toStringShort(); + // If diff is zero, that means we opened it up via the button and don't need the text for last opening + if (!this.diff) return null; + return `It has been ${TimeSpan.fromMilliseconds(this.diff).toStringShort()} since you last loaded up the game.`; + }, + titleText() { + return this.diff ? "Content Catch-up" : "Content Summary"; } }, created() { @@ -53,9 +58,9 @@ export default { From 245b63ee7b02ffbbec52dda6b1b732fd91f8fa8d Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Wed, 13 Jul 2022 03:44:48 -0500 Subject: [PATCH 0843/1119] Handle converting scripts with errors more gracefully, fixes #2771 --- javascripts/core/automator/compiler.js | 38 ++++++++++++++++--- .../modals/AutomatorScriptTemplate.vue | 2 +- .../modals/SwitchAutomatorEditorModal.vue | 20 ++++++---- .../tabs/automator/AutomatorBlockEditor.vue | 11 ++++-- .../tabs/automator/AutomatorDocs.vue | 8 +++- .../tabs/automator/AutomatorEditor.vue | 7 ++-- .../tabs/automator/AutomatorModeSwitch.vue | 31 +++++++-------- 7 files changed, 76 insertions(+), 41 deletions(-) diff --git a/javascripts/core/automator/compiler.js b/javascripts/core/automator/compiler.js index ba125a526..261fed618 100644 --- a/javascripts/core/automator/compiler.js +++ b/javascripts/core/automator/compiler.js @@ -500,13 +500,39 @@ import { AutomatorLexer } from "./lexer"; function blockifyTextAutomator(input) { const validator = new Validator(input); - if (validator.errorCount === 0) { - const b = new Blockifier(); - const blocks = b.visit(validator.parseResult); - return blocks; - } + const blockifier = new Blockifier(); + const blocks = blockifier.visit(validator.parseResult); - return null; + // The Validator grabs all the lines from the visible script, but the Blockifier will fail to visit any lines + // associated with unparsable commands. This results in a discrepancy in line count whenever a line can't be + // parsed as a specific command, and in general this is a problem we can't try to guess a fix for, so we just + // don't convert it at all. In both cases nested commands are stored recursively, but with different structure. + const validatedCount = entry => { + if (!entry) return 0; + const commandDepth = entry.children; + let foundChildren = 0; + // Inner nested commands are found within a prop given the same name as the command itself - this should only + // actually evaluate to nonzero for at most one key, and will be undefined for all others + for (const key of Object.keys(commandDepth)) { + const nestedBlock = commandDepth[key][0]?.children.block; + const nestedCommands = nestedBlock ? nestedBlock[0].children.command : []; + foundChildren += nestedCommands + ? nestedCommands.map(c => validatedCount(c) + 1).reduce((sum, val) => sum + val, 0) + : 0; + } + return foundChildren; + }; + const visitedCount = block => { + if (!block.nest) return 1; + return 1 + block.nest.map(b => visitedCount(b)).reduce((sum, val) => sum + val, 0); + }; + // Note: top-level structure is slightly different than the nesting structure + const validatedBlocks = validator.parseResult.children.block[0].children.command + .map(c => validatedCount(c) + 1) + .reduce((sum, val) => sum + val, 0); + const visitedBlocks = blocks.map(b => visitedCount(b)).reduce((sum, val) => sum + val, 0); + + return { blocks, validatedBlocks, visitedBlocks }; } AutomatorGrammar.blockifyTextAutomator = blockifyTextAutomator; diff --git a/src/components/modals/AutomatorScriptTemplate.vue b/src/components/modals/AutomatorScriptTemplate.vue index 8b5a5a9bd..61f95c002 100644 --- a/src/components/modals/AutomatorScriptTemplate.vue +++ b/src/components/modals/AutomatorScriptTemplate.vue @@ -124,7 +124,7 @@ export default { if (this.isBlock) { const newTemplateBlock = { name: `Template: ${this.name}`, - blocks: AutomatorGrammar.blockifyTextAutomator(this.templateScript.script) + blocks: AutomatorGrammar.blockifyTextAutomator(this.templateScript.script).blocks }; AutomatorData.blockTemplates.push(newTemplateBlock); GameUI.notify.info("Custom template block created"); diff --git a/src/components/modals/SwitchAutomatorEditorModal.vue b/src/components/modals/SwitchAutomatorEditorModal.vue index 1f1df6028..9b82fd34b 100644 --- a/src/components/modals/SwitchAutomatorEditorModal.vue +++ b/src/components/modals/SwitchAutomatorEditorModal.vue @@ -11,6 +11,11 @@ export default { type: Function, required: false, default: () => ({}) + }, + hasInvalidCommands: { + type: Boolean, + required: false, + default: false, } }, data() { @@ -27,9 +32,6 @@ export default { this.$viewModel.tabs.reality.automator.editorScriptID = value; } }, - destinationType() { - return player.reality.automator.type === AUTOMATOR_TYPE.TEXT ? "blocks" : "text"; - } }, methods: { update() { @@ -42,11 +44,9 @@ export default { // This saves the script after converting it. BlockAutomator.parseTextFromBlocks(); player.reality.automator.type = AUTOMATOR_TYPE.TEXT; - } else if (BlockAutomator.fromText(player.reality.automator.scripts[this.currentScriptID].content)) { + } else { AutomatorBackend.saveScript(scriptID, AutomatorTextUI.editor.getDoc().getValue()); player.reality.automator.type = AUTOMATOR_TYPE.BLOCK; - } else { - Modal.message.show(`Automator script has errors, cannot convert to ${this.destinationType}.`); } this.callback?.(); } @@ -63,8 +63,14 @@ export default { Change Automator to {{ isCurrentlyBlocks ? "text" : "block" }} editor
+ This will stop your current script if it is running! +
+ Additionally, your script currently has some lines which cannot interpreted as particular commands. Switching + to the block editor will cause these lines to be automatically deleted, since blocks only exist for valid + commands. +
+
Are you sure you want to change to the {{ isCurrentlyBlocks ? "text" : "block" }} editor? - This will stop your current script!
diff --git a/src/components/tabs/automator/AutomatorErrorPage.vue b/src/components/tabs/automator/AutomatorErrorPage.vue index ee8668c37..a85679bbb 100644 --- a/src/components/tabs/automator/AutomatorErrorPage.vue +++ b/src/components/tabs/automator/AutomatorErrorPage.vue @@ -12,7 +12,7 @@ export default { }, scrollToLine(line) { AutomatorScroller.scrollToLine(line); - AutomatorHighlighter.updateHighlightedLine(line, "Error"); + AutomatorHighlighter.updateHighlightedLine(line, LineEnum.Error); } } }; diff --git a/src/components/tabs/automator/AutomatorEventLog.vue b/src/components/tabs/automator/AutomatorEventLog.vue index a443c5c0b..2609eecf7 100644 --- a/src/components/tabs/automator/AutomatorEventLog.vue +++ b/src/components/tabs/automator/AutomatorEventLog.vue @@ -100,7 +100,7 @@ export default { }, scrollToLine(line) { AutomatorScroller.scrollToLine(line); - AutomatorHighlighter.updateHighlightedLine(line, "Event"); + AutomatorHighlighter.updateHighlightedLine(line, LineEnum.Event); } } }; diff --git a/src/components/tabs/automator/AutomatorModeSwitch.vue b/src/components/tabs/automator/AutomatorModeSwitch.vue index 712893398..9d194beae 100644 --- a/src/components/tabs/automator/AutomatorModeSwitch.vue +++ b/src/components/tabs/automator/AutomatorModeSwitch.vue @@ -1,4 +1,6 @@ + + + + diff --git a/src/components/tabs/autobuyers/AutobuyersTab.vue b/src/components/tabs/autobuyers/AutobuyersTab.vue index ae81241f2..d1308537d 100644 --- a/src/components/tabs/autobuyers/AutobuyersTab.vue +++ b/src/components/tabs/autobuyers/AutobuyersTab.vue @@ -70,9 +70,9 @@ export default {
by anything which may alter how fast the game itself is running.
- - - + + + @@ -88,5 +88,19 @@ export default { diff --git a/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue b/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue index c978945f6..217660902 100644 --- a/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue +++ b/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue @@ -1,14 +1,18 @@ @@ -93,20 +95,22 @@ export default { v-else-if="postBreak" #intervalSlot > - + + + + {{ modeProps(mode).title }}: diff --git a/src/components/tabs/autobuyers/EternityAutobuyerBox.vue b/src/components/tabs/autobuyers/EternityAutobuyerBox.vue index 5f825d109..bae2b351b 100644 --- a/src/components/tabs/autobuyers/EternityAutobuyerBox.vue +++ b/src/components/tabs/autobuyers/EternityAutobuyerBox.vue @@ -1,12 +1,16 @@ @@ -77,20 +79,22 @@ export default { name="Automatic Eternity" > @@ -104,4 +119,8 @@ export default { .l-selected-script { background-color: var(--color-automator-active-line-background); } + +.l-max-scripts { + background-color: var(--color-automator-error-background); +} From b1211289c1b52702803b6e813d490945d56cd9e3 Mon Sep 17 00:00:00 2001 From: SpectralFlame <4493131+cyip92@users.noreply.github.com> Date: Thu, 4 Aug 2022 05:52:58 -0500 Subject: [PATCH 0874/1119] Address PR feedback (fancy-dropdowns) --- src/components/ExpandingControlBox.vue | 29 +++++++++++++++++-- .../autobuyers/AutobuyerDropdownEntry.vue | 13 ++++++++- .../tabs/autobuyers/BigCrunchAutobuyerBox.vue | 7 +++-- .../tabs/autobuyers/EternityAutobuyerBox.vue | 7 +++-- .../tabs/autobuyers/RealityAutobuyerBox.vue | 4 +-- .../tabs/automator/AutomatorDocs.vue | 14 ++------- .../AutomatorScriptDropdownEntryList.vue | 18 ++++++++++-- 7 files changed, 68 insertions(+), 24 deletions(-) diff --git a/src/components/ExpandingControlBox.vue b/src/components/ExpandingControlBox.vue index f4e4de149..66b5599fa 100644 --- a/src/components/ExpandingControlBox.vue +++ b/src/components/ExpandingControlBox.vue @@ -29,6 +29,11 @@ export default { required: false, default: "l-expanding-control-box__button", }, + autoClose: { + type: Boolean, + required: false, + default: false, + } }, data() { return { @@ -36,6 +41,8 @@ export default { openRequest: false, closedHeight: "1em", openHeight: "1em", + hasMouse: false, + closeTime: 0, }; }, computed: { @@ -113,6 +120,10 @@ export default { this.updateBaseWidth(); }, methods: { + update() { + const secSinceMouseOff = this.hasMouse ? 0 : (Date.now() - this.closeTime) / 1000; + if (this.autoClose && this.state === this.states.OPEN && secSinceMouseOff > 1) this.openRequest = false; + }, processRequest(state, request) { if (request && (state === this.states.CLOSED || state === this.states.CLOSE_REQUESTED)) { this.state = this.states.OPEN_REQUESTED; @@ -142,6 +153,17 @@ export default { this.state = this.states.CLOSED; } }, + handleClick() { + this.openRequest = !this.openRequest; + this.hasMouse = this.openRequest; + }, + mouseOn() { + this.hasMouse = true; + }, + mouseOff() { + this.hasMouse = false; + this.closeTime = Date.now(); + } } }; @@ -164,12 +186,14 @@ export default { :class="containerClassObject" :style="containerStyle" @transitionend="transitionEnd" + @mouseenter="mouseOn" + @mouseleave="mouseOff" >
{{ label }} @@ -179,7 +203,7 @@ export default {
@@ -193,7 +217,6 @@ export default { diff --git a/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue b/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue index 217660902..9f94dfbe3 100644 --- a/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue +++ b/src/components/tabs/autobuyers/BigCrunchAutobuyerBox.vue @@ -95,9 +95,12 @@ export default { v-else-if="postBreak" #intervalSlot > - +