Module cleanup and tests
CI / ci (push) Failing after 7s

This commit is contained in:
2026-05-24 23:13:45 +02:00
parent 63d83e999a
commit 5dc9b3b8d4
72 changed files with 2545 additions and 1220 deletions
+2 -13
View File
@@ -4,8 +4,8 @@
* Privacy settings control player opt-in/out for automation features that affect
* their on-screen presence. Settings are stored as user flags on the user document.
*
* Storage key: game.user.setFlag('video-view-manager', key, value)
* Shape: { reactionCamEnabled: boolean, hpReactiveCamStylingEnabled: boolean, customPortraitFallback: string | null }
* Storage key: game.user.setFlag('scrying-pool', key, value)
* Shape: { reactionCamEnabled: boolean, customPortraitFallback: string | null }
*
* @module contracts/privacy-settings
*/
@@ -31,7 +31,6 @@ export const VALID_PORTRAIT_FORMATS = Object.freeze([
/**
* @typedef {Object} PrivacySettings
* @property {boolean} reactionCamEnabled - Whether Reaction Cam automation is enabled for this user.
* @property {boolean} hpReactiveCamStylingEnabled - Whether HP-Reactive Cam Styling is enabled for this user.
* @property {string|null} customPortraitFallback - DataURL string for custom portrait fallback image, or null if not set.
*/
@@ -43,7 +42,6 @@ export const PRIVACY_SETTINGS_VERSION = 1;
*/
export const PRIVACY_SETTINGS_DEFAULT = {
reactionCamEnabled: false,
hpReactiveCamStylingEnabled: false,
customPortraitFallback: null,
};
@@ -53,7 +51,6 @@ export const PRIVACY_SETTINGS_DEFAULT = {
*/
export const PRIVACY_SETTING_KEYS = Object.freeze([
"reactionCamEnabled",
"hpReactiveCamStylingEnabled",
"customPortraitFallback",
]);
@@ -63,7 +60,6 @@ export const PRIVACY_SETTING_KEYS = Object.freeze([
*/
export const FEATURE_NAME_MAP = Object.freeze({
reactionCam: "reactionCamEnabled",
hpReactiveCamStyling: "hpReactiveCamStylingEnabled",
});
/**
@@ -164,13 +160,6 @@ export function isValidPrivacySettings(data) {
);
}
}
if ("hpReactiveCamStylingEnabled" in obj) {
if (typeof obj.hpReactiveCamStylingEnabled !== "boolean") {
throw new TypeError(
`PrivacySettings: hpReactiveCamStylingEnabled must be a boolean, got ${typeof obj.hpReactiveCamStylingEnabled}`
);
}
}
if ("customPortraitFallback" in obj) {
if (obj.customPortraitFallback !== null && typeof obj.customPortraitFallback !== "string") {
throw new TypeError(
+1 -1
View File
@@ -4,7 +4,7 @@
* A Scene Preset is a named snapshot of the Visibility Matrix, stored as a
* flag on a FoundryVTT Scene document. Up to 50 presets per world.
*
* Storage key: scene.getFlag('video-view-manager', 'preset')
* Storage key: scene.getFlag('scrying-pool', 'preset')
* Shape: { _version: 1, presets: { [name: string]: ScenePreset } }
*
* @module contracts/scene-preset