From 5572abb7bbbe415c462dbdaba280316bcfa32ea8 Mon Sep 17 00:00:00 2001
From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com>
Date: Fri, 23 Dec 2022 08:27:28 +0000
Subject: [PATCH 01/35] create layer
---
src/data/layers/credits.tsx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 src/data/layers/credits.tsx
diff --git a/src/data/layers/credits.tsx b/src/data/layers/credits.tsx
new file mode 100644
index 0000000..580dbcd
--- /dev/null
+++ b/src/data/layers/credits.tsx
@@ -0,0 +1,17 @@
+import { jsx } from "features/feature";
+import { createLayer } from "game/layers"
+
+const id = "credits"
+const day = 25;
+const name = "Credits"
+const credits = createLayer(id, () => {
+
+ return {
+ display: jsx(() =>
+
+ TODO: layer
+
),
+ name,
+ day
+ }
+})
\ No newline at end of file
From c2125e3c45a054740f01e11e2e3c3eb8be36b8c7 Mon Sep 17 00:00:00 2001
From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com>
Date: Fri, 23 Dec 2022 10:15:41 +0000
Subject: [PATCH 02/35] stuff
---
src/data/projEntry.tsx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx
index 349bac1..534f059 100644
--- a/src/data/projEntry.tsx
+++ b/src/data/projEntry.tsx
@@ -223,6 +223,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
showLoreModal.value = true;
},
onOpenLayer() {
+ if (day == 25) return;
recentlyUpdated.value = false;
// 1468 is because two tabs with minWidth of 700px plus the minimized calendar of 60px plus 2 dividers of 4px each
if (window.matchMedia("(min-width: 1468px)").matches) {
@@ -241,11 +242,11 @@ export const main = createLayer("main", function (this: BaseLayer) {
layers[layer ?? "trees"]!.minimized.value = false;
},
onUnlockLayer() {
- if (layer != null) {
+ if (layer != null || day == 25) {
opened.value = true;
setTimeout(() => {
loreScene.value = -1;
- loreTitle.value = unref(layers[layer ?? "trees"]?.name ?? "");
+ loreTitle.value = day == 25 ? "The End!" : unref(layers[layer ?? "trees"]?.name ?? "");
loreBody.value = story;
if (player.autoPause) player.devSpeed = null;
showLoreModal.value = true;
@@ -505,6 +506,15 @@ export const main = createLayer("main", function (this: BaseLayer) {
story: "",
completedStory: "",
masteredStory: ""
+ })),
+ createDay(() => ({
+ day: 25,
+ shouldNotify: false,
+ layer: null, // credits
+ symbol: "",
+ story: "It's Christmas. Thanks to your efforts, Santa has delivered all the presents to people all over the world. That is, all but one...",
+ completedStory: "",
+ masteredStory: ""
}))
];
From 794e84881495a8b7981719ca2935282272fb2822 Mon Sep 17 00:00:00 2001
From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com>
Date: Fri, 23 Dec 2022 11:33:59 +0000
Subject: [PATCH 03/35] implemented some stuff
---
src/components/Game.vue | 25 ++++++++++++++++++++++
src/data/advent.css | 10 +++++++++
src/data/projEntry.tsx | 9 ++++++--
src/data/symbols/snowflake.svg | 39 ++++++++++++++++++++++++++++++++++
4 files changed, 81 insertions(+), 2 deletions(-)
create mode 100644 src/data/symbols/snowflake.svg
diff --git a/src/components/Game.vue b/src/components/Game.vue
index 238a17a..5a470fd 100644
--- a/src/components/Game.vue
+++ b/src/components/Game.vue
@@ -43,6 +43,31 @@
+ (main.creditsOpen.value = value)"
+ >
+ credits go here
+
+
diff --git a/src/data/advent.css b/src/data/advent.css
index e6eddbd..80129d6 100644
--- a/src/data/advent.css
+++ b/src/data/advent.css
@@ -29,3 +29,13 @@
justify-content: space-around;
margin-bottom: -5%;
}
+
+.present-clickable {
+ cursor: pointer;
+ width: 30%;
+ text-align: center;
+ transition: all .2s ease-in-out;
+}
+.present-clickable:hover {
+ transform: scale(1.2);
+}
\ No newline at end of file
diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx
index 534f059..07f1ef2 100644
--- a/src/data/projEntry.tsx
+++ b/src/data/projEntry.tsx
@@ -55,6 +55,8 @@ import toysSymbol from "./symbols/truck.png";
import advFactorySymbol from "./symbols/teddyBear.png";
import advManagementSymbol from "./symbols/workshopMansion.png";
import wrappingPaperSymbol from "./symbols/wrappingPaper.png";
+import snowflakeSymbol from "./symbols/snowflake.svg";
+import presentSymbol from "./layers/factory-components/present.svg"
export interface Day extends VueFeature {
day: number;
@@ -79,6 +81,8 @@ export const main = createLayer("main", function (this: BaseLayer) {
const loreTitle = ref("");
const loreBody = ref();
+ const creditsOpen = ref(false);
+
const currentlyMastering = computed(() =>
isMastery.value
? Object.values(layers).find(
@@ -511,8 +515,8 @@ export const main = createLayer("main", function (this: BaseLayer) {
day: 25,
shouldNotify: false,
layer: null, // credits
- symbol: "",
- story: "It's Christmas. Thanks to your efforts, Santa has delivered all the presents to people all over the world. That is, all but one...",
+ symbol: snowflakeSymbol,
+ story: `It's Christmas. Thanks to your efforts, Santa has delivered all the presents to people all over the world. That is, all but one...
Open your present
`,
completedStory: "",
masteredStory: ""
}))
@@ -565,6 +569,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
swappingMastery,
currentlyMastering,
masteredDays,
+ creditsOpen,
display: jsx(() => (
<>
{player.devSpeed === 0 ? Game Paused
: null}
diff --git a/src/data/symbols/snowflake.svg b/src/data/symbols/snowflake.svg
new file mode 100644
index 0000000..b77deec
--- /dev/null
+++ b/src/data/symbols/snowflake.svg
@@ -0,0 +1,39 @@
+
+
+
+
From e2af3ed2748f7f8e467c45f704e240ceb15b5f7e Mon Sep 17 00:00:00 2001
From: Chunkybanana <62921243+chunkybanana@users.noreply.github.com>
Date: Sat, 24 Dec 2022 06:03:39 +0000
Subject: [PATCH 04/35] Credits mostly done
---
src/components/Game.vue | 23 +++---
src/data/credits.tsx | 160 ++++++++++++++++++++++++++++++++++++++++
src/data/projEntry.tsx | 121 +++++++++++++++++++++++++++++-
3 files changed, 294 insertions(+), 10 deletions(-)
create mode 100644 src/data/credits.tsx
diff --git a/src/components/Game.vue b/src/components/Game.vue
index 5a470fd..03c1728 100644
--- a/src/components/Game.vue
+++ b/src/components/Game.vue
@@ -47,13 +47,16 @@
:modelValue="main.creditsOpen.value"
@update:model-value="value => (main.creditsOpen.value = value)"
>
- credits go here
-
+ -->
+
+
@@ -78,6 +82,7 @@ import Scene from "data/Scene.vue";
import type { GenericLayer } from "game/layers";
import { layers } from "game/layers";
import player from "game/player";
+import { convertComputable } from "util/computed";
import { computeOptionalComponent } from "util/vue";
import { computed, toRef, unref } from "vue";
import Layer from "./Layer.vue";
@@ -94,7 +99,7 @@ function gatherLayerProps(layer: GenericLayer) {
const { display, minimized, minWidth, name, color, minimizable, nodes, minimizedDisplay } =
layer;
return { display, minimized, minWidth, name, color, minimizable, nodes, minimizedDisplay };
-}
+};