Revenge/src/index.ts

29 lines
773 B
TypeScript
Raw Normal View History

import { patchLogHook } from "@lib/debug";
import { patchCommands } from "@lib/commands";
import { initPlugins } from "@lib/plugins";
import { patchAssets } from "@ui/assets";
import initSettings from "@ui/settings";
2023-03-07 23:12:41 +00:00
import initFixes from "@lib/fixes";
import logger from "@lib/logger";
2023-03-07 23:12:41 +00:00
import windowObject from "@lib/windowObject";
2022-10-18 22:04:55 +00:00
export default async () => {
// Load everything in parallel
const unloads = await Promise.all([
patchLogHook(),
patchAssets(),
patchCommands(),
initFixes(),
initSettings(),
]);
2022-10-18 22:04:55 +00:00
// Assign window object
window.vendetta = await windowObject(unloads);
// Once done, load plugins
unloads.push(await initPlugins());
// We good :)
logger.log("Vendetta is ready!");
}