From 04093d752ec3a563a8ebc27814ba1621ffe08d94 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Fri, 31 Jan 2025 05:26:22 +0100 Subject: [PATCH] disable annoying screen resoultion too small warning --- src/main.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.mjs b/src/main.mjs index 916d619..8cb856a 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -8,8 +8,17 @@ Hooks.once("i18nInit", async function() { game.i18n._fallback = foundry.utils.mergeObject(await game.i18n._getTranslations("de"), game.i18n._fallback); }); +class DSA41_Notifications extends Notifications { + notify(message, type="info", {localize=false, permanent=false, console=true}={}) { + if (permanent && message.startsWith("Foundry Virtual Tabletop requires a minimum screen resolution")) + return; + return super.notify(message, type, { localize, permanent, console }); + } +} + Hooks.once("init", async function() { CONFIG.Combat.initiative.formula = "1d6 + @computed.ini_basiswert[INI-Basiswert]"; + CONFIG.ui.notifications = DSA41_Notifications CONFIG.Actor.dataModels.Player = DSA41_CharacterData; CONFIG.Actor.documentClass = DSA41_CharacterDocument;