Pause game between days

This commit is contained in:
thepaperpilot 2022-12-03 10:27:01 -06:00
parent 2c899f6948
commit e9a9ee7d94
4 changed files with 9 additions and 2 deletions

View file

@ -24,6 +24,7 @@ import { computed, ref, unref, watch, watchEffect } from "vue";
import trees from "./trees";
import { createAdditiveModifier, createMultiplicativeModifier, createSequentialModifier } from "game/modifiers";
import { createUpgrade } from "features/upgrades/upgrade";
import player from "game/player";
const id = "coal";
const day = 3;
@ -508,6 +509,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!";
main.day.value = day + 1;
main.minimized.value = false;
player.devSpeed = 0;
}
});

View file

@ -23,6 +23,7 @@ import {
Modifier
} from "game/modifiers";
import { persistent } from "game/persistence";
import player from "game/player";
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
import { Direction, WithRequired } from "util/common";
import { render, renderRow } from "util/vue";
@ -568,6 +569,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!";
main.day.value = day + 1;
main.minimized.value = false;
player.devSpeed = 0;
}
});

View file

@ -11,6 +11,7 @@ import { jsx, showIf } from "features/feature";
import { createMilestone } from "features/milestones/milestone";
import { createResource, displayResource } from "features/resources/resource";
import { BaseLayer, createLayer } from "game/layers";
import player from "game/player";
import Decimal, { DecimalSource, formatWhole } from "util/bignum";
import { Direction } from "util/common";
import { render, renderCol } from "util/vue";
@ -159,6 +160,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!";
main.day.value = day + 1;
main.minimized.value = false;
player.devSpeed = 0;
}
});

View file

@ -80,6 +80,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
setTimeout(() => {
loreTitle.value = unref(layers[layer ?? "trees"]?.name ?? "");
loreBody.value = story;
player.devSpeed = null;
}, 1000);
}
};
@ -108,14 +109,14 @@ export const main = createLayer("main", function (this: BaseLayer) {
shouldNotify: false,
layer: "coal",
symbol: coalSymbol,
story: "Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as coal as you can for him to give out."
story: "Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out."
})),
createDay(() => ({
day: 4,
shouldNotify: false,
layer: null,
symbol: "",
story: "With this unbelievably large workshop complete, it's time to get the elves to work! But it appears they've forgotten how to make toys over the last 11 months - guess it's time to setup training sessions!"
story: "Alright, it seems you finally have enough things setup to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they're out of practice by 11 months!"
})),
createDay(() => ({
day: 5,