Don't open days until they're implemented

This commit is contained in:
thepaperpilot 2022-12-08 07:50:52 -06:00
parent ef6f9935a5
commit 132ef32525
2 changed files with 17 additions and 9 deletions

View file

@ -19,7 +19,10 @@
<div class="doors"></div>
<div class="date">Dec<br />{{ day }}</div>
<div v-if="!canOpen" class="material-icons lock">lock</div>
<div v-if="main.day.value === day && !canOpen" class="timer">{{ formatTime(main.timeUntilNewDay.value, 0) }}</div>
<div v-if="main.day.value === day && !canOpen" class="timer">
{{ formatTime(main.timeUntilNewDay.value, 0) }}
</div>
<div v-else-if="main.day.value === day && layer == null" class="timer">NYI</div>
<Notif v-if="canOpen" />
</div>
</template>
@ -36,6 +39,7 @@ import { main } from "./projEntry";
const props = defineProps<{
day: number;
symbol: string;
layer: string | null;
opened: Ref<boolean>;
recentlyUpdated: Ref<boolean>;
shouldNotify: ProcessedComputable<boolean>;
@ -49,6 +53,7 @@ const emit = defineEmits<{
const canOpen = computed(
() =>
props.layer &&
Decimal.gte(main.day.value, props.day) &&
new Date().getMonth() === 11 &&
new Date().getDate() >= props.day

View file

@ -99,6 +99,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
return {
day,
symbol,
layer,
opened,
recentlyUpdated,
shouldNotify,
@ -131,6 +132,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
}
},
onUnlockLayer() {
if (layer) {
opened.value = true;
setTimeout(() => {
loreScene.value = -1;
@ -140,6 +142,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
showLoreModal.value = true;
}, 1000);
}
}
};
}
};