Fixed mangement progress bar after completing day 12

This commit is contained in:
thepaperpilot 2022-12-13 10:11:08 -06:00
parent 8b0194ae02
commit 9b4428d42f
2 changed files with 20 additions and 10 deletions

View file

@ -3,14 +3,20 @@
<template v-slot:header>
<h2>Settings</h2>
<div class="option-tabs">
<button :class="{selected: isTab('behaviour')}" @click="setTab('behaviour')">Behaviour</button>
<button :class="{selected: isTab('appearance')}" @click="setTab('appearance')">Appearance</button>
<button :class="{ selected: isTab('behaviour') }" @click="setTab('behaviour')">
Behaviour
</button>
<button :class="{ selected: isTab('appearance') }" @click="setTab('appearance')">
Appearance
</button>
</div>
</template>
<template v-slot:body>
<div v-if="isTab('behaviour')">
<Toggle :title="autosaveTitle" v-model="autosave" />
<FeedbackButton v-if="!autosave" class="button save-button" @click="save()">Manually save</FeedbackButton>
<FeedbackButton v-if="!autosave" class="button save-button" @click="save()"
>Manually save</FeedbackButton
>
<Toggle v-if="projInfo.enablePausing" :title="isPausedTitle" v-model="isPaused" />
<Toggle :title="autoPauseTitle" v-model="autoPause" />
</div>
@ -56,11 +62,11 @@ defineExpose({
}
});
function isTab (tab: string): boolean {
function isTab(tab: string): boolean {
return tab == currentTab.value;
}
function setTab (tab: string) {
function setTab(tab: string) {
currentTab.value = tab;
}
@ -86,7 +92,6 @@ const isPaused = computed({
}
});
const autosaveTitle = jsx(() => (
<span class="option-title">
Autosave<Tooltip display="Save-specific">*</Tooltip>
@ -102,7 +107,10 @@ const isPausedTitle = jsx(() => (
const autoPauseTitle = jsx(() => (
<span class="option-title">
Auto-pause<Tooltip display="Save-specific">*</Tooltip>
<desc>Automatically pause the game when a day is completed. It is best to keep this on to avoid over-grinding.</desc>
<desc>
Automatically pause the game when a day is completed. It is best to keep this on to
avoid over-grinding.
</desc>
</span>
));

View file

@ -52,12 +52,13 @@ const layer = createLayer(id, () => {
main.day.value === day
? day12Elves.reduce((acc, curr) => acc + Math.min(1, curr.level.value / 3), 0) /
day12Elves.length
: main.day.value === advancedDay
: main.day.value === advancedDay && main.days[advancedDay - 1].opened.value
? day13Elves.reduce((acc, curr) => acc + Math.min(1, curr.level.value / 5), 0) /
day13Elves.length
: 1,
display: jsx(() =>
main.day.value === day || main.day.value === advancedDay ? (
main.day.value === day ||
(main.day.value === advancedDay && main.days[advancedDay - 1].opened.value) ? (
<>
{formatWhole(
Decimal.times(
@ -273,7 +274,8 @@ const layer = createLayer(id, () => {
requirement: "Holly Level 3",
effectDisplay: jsx(() => (
<>
Multiply all cloth actions' effectiveness by log<sub>10</sub>(Cutter amount).
Multiply all cloth actions' effectiveness by log<sub>10</sub>(Cutter
amount).
</>
))
},