import { LESOUBLIES_CONFIG } from "./les-oublies-config.js" import { LesOubliesUtility } from "./les-oublies-utility.js" import { LesOubliesActor } from "./les-oublies-actor.js" import { LesOubliesItem } from "./les-oublies-item.js" import { LesOubliesRolls } from "./les-oublies-rolls.js" import * as models from "./models/index.mjs" import * as sheets from "./applications/sheets/_module.mjs" const DEFAULT_PERSONNAGE_TOKEN_TEXTURE = "systems/fvtt-les-oublies/assets/tokens/border_token_oublies.webp" const UBERWALD_URL = "https://www.uberwald.me" const XII_SINGES_URL = "https://www.les12singes.com/84-les-oublies" function ensureSystemStyles() { const href = `systems/${game.system.id}/css/les-oublies.css` const existingLink = document.querySelector(`link[href$="${href}"]`) if (existingLink) return const link = document.createElement("link") link.rel = "stylesheet" link.type = "text/css" link.href = href link.dataset.systemStyle = game.system.id document.head.append(link) } function usesFoundryDefaultTokenTexture(actor, data) { const tokenTexture = foundry.utils.getProperty(data, "prototypeToken.texture.src") ?? foundry.utils.getProperty(actor, "prototypeToken.texture.src") ?? "" return !tokenTexture || tokenTexture === CONST.DEFAULT_TOKEN || tokenTexture === "icons/svg/mystery-man.svg" } async function getHelpJournalEntry() { const pack = game.packs.get(`${game.system.id}.aide-systeme`) if (!pack) return null const documents = await pack.getDocuments() return documents[0] ?? null } async function buildWelcomeMessageContent(helpJournal) { const helpContent = helpJournal ? await foundry.applications.ux.TextEditor.implementation.enrichHTML( `@UUID[${helpJournal.uuid}]{${game.i18n.localize("LESOUBLIES.welcome.helpLinkLabel")}}`, { async: true }, ) : game.i18n.localize("LESOUBLIES.welcome.helpUnavailable") return `
${game.i18n.localize("LESOUBLIES.welcome.eyebrow")}
${game.i18n.localize("LESOUBLIES.welcome.intro")}
${game.i18n.localize("LESOUBLIES.welcome.developerLabel")} Uberwald.
${game.i18n.localize("LESOUBLIES.welcome.publisherLabel")} Les XII Singes.
${game.i18n.localize("LESOUBLIES.welcome.helpLabel")} ${helpContent}