Files
DEVICE_CONTACT/src/bootsequence/dia.ts

153 lines
2.4 KiB
TypeScript

type ResolvableText = string | ((answers: Record<string, string>) => string);
type Question = {
t: "q",
text: ResolvableText,
answers: {
text: string,
value: string
}[],
id: string
}
type Dia = {
t: "d",
text: ResolvableText
}
type Wai = {
t: "w",
time: number
}
type Fun = {
t: "f",
f: () => any
}
type chrt = "kris" | "susie" | "ralsei" | "noelle"
type desktopt = "hyprland" | "plasma"
let chr: chrt = "kris";
let desktop: desktopt = "hyprland";
export function setChar(newchr: chrt) {
chr = newchr;
}
export function setDesktop(newdesktop: desktopt) {
desktop = newdesktop;
}
// TODO: Work on this a bit more
export const QUESTIONS: (Question | Dia | Wai | Fun)[] = [
{
t: "w",
time: 4000
},
{
t: "q",
id: "char",
text: "SELECT THE VESSEL YOU PREFER.",
answers: [
{
text: "RALSEI",
value: "ralsei"
},
{
text: "SUSIE",
value: "susie"
},
{
text: "KRIS",
value: "kris"
},
{
text: "NOELLE",
value: "noelle"
}
]
},
{
t: "d",
text: "YOU HAVE CHOSEN A WONDERFUL FORM."
},
{
t: "d",
text: () => `NOW LET US SHAPE ${(["noelle", "susie"]).includes(chr) ? "HER" : chr === "ralsei" ? "HIS" : "THEIR"} MIND AS YOUR OWN.`
},
{
t: "q",
id: "desktop",
text: () => `WHAT IS ${(["noelle", "susie"]).includes(chr) ? "HER" : chr === "ralsei" ? "HIS" : "THEIR"} FAVORITE DESKTOP ENVIRONMENT?`,
answers: [
{
text: "HYPRLAND",
value: "hyprland"
},
{
text: "KDE",
value: "plasma"
}
]
},
{
t: "d",
text: () => `${desktop === "hyprland" ? "HYPRLAND" : "KDE"}, INTERESTING CHOICE..`
},
{
t: "q",
id: "color",
text: "YOUR FAVORITE COLOR PALETTE?",
answers: [
{
text: "LATTE",
value: "latte"
},
{
text: "FRAPPE",
value: "frappe"
},
{
text: "MACCHIATO",
value: "macchiato"
},
{
text: "MOCHA",
value: "mocha"
}
]
},
{
t: "q",
id: "gift",
text: () => `PLEASE GIVE ${(["noelle", "susie"]).includes(chr) ? "HER" : chr === "ralsei" ? "HIM" : "THEM"} A GIFT.`,
answers: [
{
text: "KINDNESS",
value: "kindness"
},
{
text: "MIND",
value: "mind"
},
{
text: "AMBITION",
value: "ambition"
},
{
text: "BRAVERY",
value: "bravery"
}
]
},
{
t: "d",
text: "THANK YOU FOR YOUR TIME."
},
{
t: "d",
text: () => `YOUR ANSWERS, YOUR WONDERFUL CREATION`
},
]