mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-24 09:21:48 +00:00
Don't open days until they're implemented
This commit is contained in:
parent
ef6f9935a5
commit
132ef32525
2 changed files with 17 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -99,6 +99,7 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
return {
|
||||
day,
|
||||
symbol,
|
||||
layer,
|
||||
opened,
|
||||
recentlyUpdated,
|
||||
shouldNotify,
|
||||
|
@ -131,14 +132,16 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
}
|
||||
},
|
||||
onUnlockLayer() {
|
||||
opened.value = true;
|
||||
setTimeout(() => {
|
||||
loreScene.value = -1;
|
||||
loreTitle.value = unref(layers[layer ?? "trees"]?.name ?? "");
|
||||
loreBody.value = story;
|
||||
player.devSpeed = null;
|
||||
showLoreModal.value = true;
|
||||
}, 1000);
|
||||
if (layer) {
|
||||
opened.value = true;
|
||||
setTimeout(() => {
|
||||
loreScene.value = -1;
|
||||
loreTitle.value = unref(layers[layer ?? "trees"]?.name ?? "");
|
||||
loreBody.value = story;
|
||||
player.devSpeed = null;
|
||||
showLoreModal.value = true;
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue