Compare commits

...

2 Commits
v0.13.7 ... dev

Author SHA1 Message Date
kvan7
c23d9b5eb3 temp detection for fractured items 2025-12-20 20:29:39 -06:00
kvan7
73cd5a4712 remove split mac 2025-12-20 13:02:50 -06:00
2 changed files with 8 additions and 76 deletions

View File

@@ -26,9 +26,8 @@ if (process.platform !== "darwin") {
app.enableSandbox();
let tray: AppTray;
// Ensure accessibility permissions on MacOS.
if (process.platform === "darwin") {
(async () => {
(async () => {
if (process.platform === "darwin") {
async function ensureAccessibilityPermission(): Promise<boolean> {
if (systemPreferences.isTrustedAccessibilityClient(false)) return true;
@@ -60,77 +59,8 @@ if (process.platform === "darwin") {
return;
}
console.log("Accessibility permission granted, starting app");
app.on("ready", async () => {
tray = new AppTray(eventPipe);
const logger = new Logger(eventPipe);
const gameLogWatcher = new GameLogWatcher(eventPipe, logger);
const gameConfig = new GameConfig(eventPipe, logger);
const poeWindow = new GameWindow();
const appUpdater = new AppUpdater(eventPipe);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _httpProxy = new HttpProxy(server, logger);
}
if (process.env.VITE_DEV_SERVER_URL) {
try {
await installExtension(VUEJS_DEVTOOLS);
logger.write("info Vue Devtools installed");
} catch (error) {
logger.write(`error installing Vue Devtools: ${error}`);
console.log(`error installing Vue Devtools: ${error}`);
}
}
process.addListener("uncaughtException", (err) => {
logger.write(`error [uncaughtException] ${err.message}, ${err.stack}`);
});
process.addListener("unhandledRejection", (reason) => {
logger.write(`error [unhandledRejection] ${(reason as Error).stack}`);
});
setTimeout(
async () => {
const overlay = new OverlayWindow(eventPipe, logger, poeWindow);
// eslint-disable-next-line no-new
new OverlayVisibility(eventPipe, overlay, gameConfig);
const shortcuts = await Shortcuts.create(
logger,
overlay,
poeWindow,
gameConfig,
eventPipe,
);
eventPipe.onEventAnyClient(
"CLIENT->MAIN::update-host-config",
(cfg) => {
overlay.updateOpts(cfg.overlayKey, cfg.windowTitle);
shortcuts.updateActions(
cfg.shortcuts,
cfg.stashScroll,
cfg.logKeys,
cfg.restoreClipboard,
cfg.language,
);
gameLogWatcher.restart(cfg.clientLog ?? "", cfg.readClientLog);
gameConfig.readConfig(cfg.gameConfig ?? "");
appUpdater.checkAtStartup();
tray.overlayKey = cfg.overlayKey;
},
);
uIOhook.start();
console.log("uIOhook started");
const port = await startServer(appUpdater, logger);
// TODO: move up (currently crashes)
logger.write(
`info ${os.type()} ${os.release} / v${app.getVersion()}`,
);
overlay.loadAppPage(port);
tray.serverPort = port;
},
// fixes(linux): window is black instead of transparent
process.platform === "linux" ? 1000 : 0,
);
});
})();
} else {
app.on("ready", async () => {
tray = new AppTray(eventPipe);
const logger = new Logger(eventPipe);
@@ -150,7 +80,6 @@ if (process.platform === "darwin") {
console.log(`error installing Vue Devtools: ${error}`);
}
}
process.addListener("uncaughtException", (err) => {
logger.write(`error [uncaughtException] ${err.message}, ${err.stack}`);
});
@@ -199,4 +128,4 @@ if (process.platform === "darwin") {
process.platform === "linux" ? 1000 : 0,
);
});
}
})();

View File

@@ -379,6 +379,7 @@ function parseBlightedMap(item: ParsedItem) {
}
function parseFractured(item: ParserState) {
// NOTE: partially also controlled by parseFracturedText
if (item.newMods.some((mod) => mod.info.type === ModifierType.Fractured)) {
item.isFractured = true;
}
@@ -1222,9 +1223,11 @@ function parsePriceNote(section: string[], item: ParsedItem) {
return "SECTION_SKIPPED";
}
function parseFracturedText(section: string[], _item: ParsedItem) {
function parseFracturedText(section: string[], item: ParsedItem) {
for (const line of section) {
if (line === _$.FRACTURED_ITEM) {
// HACK: remove once bug is fixed (https://www.pathofexile.com/forum/view-thread/3891367)
item.isFractured = true;
return "SECTION_PARSED";
}
}