mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 11:59:11 +00:00
30 lines
793 B
TypeScript
30 lines
793 B
TypeScript
const loadingTexts = [
|
|
'Loading Roleypoly...',
|
|
'Reticulating splines...',
|
|
'Mining cryptocoins...',
|
|
'Going to Mars...',
|
|
'Building the Box Signature Edition...',
|
|
'Hiring a new CEO...',
|
|
'Firing the new CEO...',
|
|
'Doing a calculation...',
|
|
'Doin a fixy boi...',
|
|
'Feeling like a plastic bag...',
|
|
'Levelling up...',
|
|
'Your Roleypoly is evolving!!!',
|
|
'Adding subtitles...',
|
|
'Rolling... Rolling...',
|
|
];
|
|
|
|
export const LoadingFill = (props: { forceIndex?: keyof typeof loadingTexts }) => {
|
|
const useEasterEgg = Math.floor(Math.random() * 10) === 0;
|
|
const index =
|
|
props.forceIndex !== undefined
|
|
? props.forceIndex
|
|
: useEasterEgg
|
|
? Math.floor(Math.random() * loadingTexts.length)
|
|
: 0;
|
|
|
|
const text = loadingTexts[index];
|
|
|
|
return <>{text}</>;
|
|
};
|