From 68da6c352e729a26c7ca25a44517fd9e66452606 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 11 Dec 2024 13:58:14 -0600 Subject: [PATCH] Complete the rewrite Renderables no longer get wrapped in computed refs, because JSX.Elements don't like that (desyncs with the DOM) Relatedly, a lot of display functions got fairly simplified, removing unnecessary local components Added `MaybeGetter` utility type for something that may be a getter function or a static value (but not a ref) Made Achievement.vue use a Renderable for the display. The object of components can still be passed to `createAchievement` Made Challenge.vue use a Renderable for the display. The object of components can still be passed to `createChallenge` Fixed some issues introduced by the rewrite that broke particles systems --- src/components/fields/Select.vue | 5 +- src/components/fields/Text.vue | 5 +- src/components/fields/Toggle.vue | 5 +- src/components/layout/Collapsible.vue | 7 +- src/data/common.tsx | 78 ++-- src/data/layers/board.tsx | 424 ---------------------- src/features/VueFeature.vue | 3 +- src/features/achievements/Achievement.vue | 30 +- src/features/achievements/achievement.tsx | 93 +++-- src/features/bars/bar.tsx | 8 +- src/features/challenges/Challenge.vue | 30 +- src/features/challenges/challenge.tsx | 91 +++-- src/features/clickables/action.tsx | 66 ++-- src/features/clickables/clickable.tsx | 42 ++- src/features/clickables/repeatable.tsx | 48 +-- src/features/clickables/upgrade.tsx | 55 +-- src/features/conversion.ts | 4 +- src/features/feature.ts | 27 +- src/features/grids/grid.tsx | 84 +++-- src/features/infoboxes/infobox.tsx | 14 +- src/features/particles/Particles.vue | 1 + src/features/particles/particles.tsx | 9 +- src/features/resources/MainDisplay.vue | 5 +- src/features/tabs/tab.ts | 14 +- src/features/tabs/tabFamily.tsx | 25 +- src/features/trees/tree.tsx | 16 +- src/game/boards/board.tsx | 15 +- src/game/layers.tsx | 24 +- src/game/modifiers.tsx | 51 ++- src/game/requirements.tsx | 16 +- src/game/settings.ts | 22 +- src/util/computed.ts | 2 + src/util/vue.tsx | 28 +- src/wrappers/marks/mark.tsx | 5 +- src/wrappers/tooltips/tooltip.tsx | 14 +- tests/game/modifiers.test.ts | 5 +- 36 files changed, 478 insertions(+), 893 deletions(-) delete mode 100644 src/data/layers/board.tsx diff --git a/src/components/fields/Select.vue b/src/components/fields/Select.vue index eda049a..30f4eb5 100644 --- a/src/components/fields/Select.vue +++ b/src/components/fields/Select.vue @@ -15,15 +15,16 @@