CLeanup unused stuff
CI / ci (push) Successful in 44s

This commit is contained in:
2026-05-25 21:35:02 +02:00
parent 6bbde5c1cf
commit 3faab3e3e4
20 changed files with 332 additions and 49 deletions
+12 -4
View File
@@ -36,12 +36,19 @@ import { PlayerPrivacyPanelMenu, initPlayerPrivacyPanelMenu } from './src/ui/pla
import { initGMPlayerPrivacySelector } from './src/ui/gm/GMPlayerPrivacySelector.js';
import { ScryingPoolCameraViews, initScryingPoolCameraViews } from './src/ui/shared/ScryingPoolCameraViews.js';
import { ScryingPoolSettings } from './src/ui/gm/ScryingPoolSettings.js';
import { SOCKET_EVENTS } from './src/contracts/socket-message.js';
// Factory function to create ScryingPoolSettings with roleRenderer dependency
// Returns a class constructor (not a function) that Foundry can use for registerMenu
function initScryingPoolSettings(roleRendererRef) {
return () => new ScryingPoolSettings(roleRendererRef);
return class extends ScryingPoolSettings {
constructor(options = {}) {
super(roleRendererRef, options);
}
};
}
import { SOCKET_EVENTS } from './src/contracts/socket-message.js';
// Module-level references — constructed in init hook, used across hooks
let adapter;
@@ -414,8 +421,8 @@ Hooks.once("ready", () => {
restricted: false,
});
// Story 5.3: Register ScryingPoolSettings in module settings
// Provides button to reopen the strip
// Register ScryingPoolSettings in module settings
// Provides button to reopen the strip when user closes it
game.settings.registerMenu('scrying-pool', 'stripSettings', {
name: 'SCRYING_POOL.Settings.Title',
label: 'SCRYING_POOL.Settings.Title',
@@ -424,6 +431,7 @@ Hooks.once("ready", () => {
type: initScryingPoolSettings(roleRenderer),
restricted: true, // GM only
});
} catch (err) {
console.error('[ScryingPool] Module initialization failed:', err);
throw err; // Re-throw to prevent module from loading in broken state