diff --git a/src/data/main.css b/src/data/main.css index e351c8c..809cc51 100644 --- a/src/data/main.css +++ b/src/data/main.css @@ -21,3 +21,7 @@ .achievement.final { border-color: var(--accent3); } + +.showNotif .body { + filter: drop-shadow(0px 0px 20px var(--foreground)); +} diff --git a/src/data/planes.tsx b/src/data/planes.tsx index fddeb62..784de23 100644 --- a/src/data/planes.tsx +++ b/src/data/planes.tsx @@ -18,14 +18,14 @@ import Decimal, { DecimalSource } from "util/bignum"; import { format } from "util/break_eternity"; import { Direction, WithRequired, camelToTitle } from "util/common"; import { VueFeature, render, renderRow, trackHover } from "util/vue"; -import { ComputedRef, Ref, computed, ref } from "vue"; +import { ComputedRef, Ref, computed, ref, unref } from "vue"; import { createCollapsibleModifierSections, createFormulaPreview, estimateTime } from "./common"; import { main, Resources, resourceNames, mineLootTable, ResourceState } from "./projEntry"; import { getColor, getName, sfc32 } from "./utils"; import ModalVue from "components/Modal.vue"; import { addTooltip } from "features/tooltips/tooltip"; import { GenericAchievement, createAchievement } from "features/achievements/achievement"; -import { Computable } from "util/computed"; +import { Computable, ProcessedComputable } from "util/computed"; import { BoardNode } from "features/boards/board"; import { createExponentialModifier } from "game/modifiers"; @@ -404,6 +404,40 @@ export function createPlane(id: string, tier: Resources, seed: number) { return earned; }); + const showNotif = computed( + () => + Decimal.lt(earnedTreasures.value.length, length) && + features.some(features => + features.some(feature => { + if ( + "earned" in feature && + unref(feature.earned as ProcessedComputable) + ) { + return false; + } + if ( + "bought" in feature && + unref(feature.bought as ProcessedComputable) + ) { + return false; + } + if ( + "canClick" in feature && + unref(feature.canClick as ProcessedComputable) + ) { + return true; + } + if ( + "canPurchase" in feature && + unref(feature.canPurchase as ProcessedComputable) + ) { + return true; + } + return true; + }) + ) + ); + return { tier: persistent(tier), seed: persistent(seed), @@ -420,6 +454,7 @@ export function createPlane(id: string, tier: Resources, seed: number) { links, resourceMultis, earnedTreasures, + showNotif, display: jsx(() => ( <> diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index a83628d..c59c8a7 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -1015,7 +1015,9 @@ export const main = createLayer("main", function (this: BaseLayer) { actionDistance: Math.PI / 4, actions: [togglePoweredAction], classes: node => ({ - running: isPowered(node) + running: isPowered(node), + showNotif: (layers[(node.state as unknown as PortalState).id] as GenericPlane) + .showNotif.value }), outlineColor: node => (layers[(node.state as unknown as PortalState).id] as GenericPlane).background,