From d8bb03d62358f1db1e10bb8a56ead6b4445361ff Mon Sep 17 00:00:00 2001 From: aMediocreDad Date: Fri, 26 Jul 2024 23:11:30 +0200 Subject: [PATCH] Release v25 --- lang/cn.json | 2 +- lang/de.json | 2 +- lang/en.json | 2 +- lang/es.json | 2 +- lang/no.json | 2 +- scripts/system/hooks.js | 74 +++++++++++++++++++++-------------------- system.json | 42 ++++++----------------- 7 files changed, 53 insertions(+), 73 deletions(-) diff --git a/lang/cn.json b/lang/cn.json index f71fc7c..dbdeba0 100644 --- a/lang/cn.json +++ b/lang/cn.json @@ -258,4 +258,4 @@ "adventure": "历练", "greatness": "伟业", "Notes": "笔记" -} \ No newline at end of file +} diff --git a/lang/de.json b/lang/de.json index 530dbd4..f8416da 100644 --- a/lang/de.json +++ b/lang/de.json @@ -259,4 +259,4 @@ "adventure": "Erlebnis", "greatness": "Großartigkeit", "Notes": "Notizen" -} \ No newline at end of file +} diff --git a/lang/en.json b/lang/en.json index 7664c85..578ff78 100644 --- a/lang/en.json +++ b/lang/en.json @@ -261,4 +261,4 @@ "adventure": "Adventure", "greatness": "Greatness", "Notes": "Notes" -} \ No newline at end of file +} diff --git a/lang/es.json b/lang/es.json index dbf0729..f97b057 100644 --- a/lang/es.json +++ b/lang/es.json @@ -225,4 +225,4 @@ "adventure": "Aventura", "greatness": "Grandeza", "Notes": "Notas" -} \ No newline at end of file +} diff --git a/lang/no.json b/lang/no.json index 7ee1821..6f0d8ea 100644 --- a/lang/no.json +++ b/lang/no.json @@ -261,4 +261,4 @@ "adventure": "Eventyr", "greatness": "Storhet", "Notes": "Beskrivelse" -} \ No newline at end of file +} diff --git a/scripts/system/hooks.js b/scripts/system/hooks.js index 530390f..80fbc26 100644 --- a/scripts/system/hooks.js +++ b/scripts/system/hooks.js @@ -299,11 +299,11 @@ export class LitmHooks { const tokenImg = actor.prototypeToken?.texture?.src; const prototypeToken = isCharacter ? { - sight: { enabled: true }, - actorLink: true, - disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY, - texture: { src: tokenImg || img }, - } + sight: { enabled: true }, + actorLink: true, + disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY, + texture: { src: tokenImg || img }, + } : null; actor.updateSource({ prototypeToken, img }); }); @@ -377,43 +377,44 @@ export class LitmHooks {
  • `).on("click", "[data-click]", (event) => { - const { click } = event.currentTarget.dataset; - switch (click) { - case "toggle-rendered": - if (!app.rendered) app.render(true); - else app.close(); - break; - case "render-character": - if (!game.user.character) - return ui.notifications.warn(t("Litm.ui.warn-no-character")); - if (!game.user.character.sheet.rendered) - game.user.character.sheet.render(true); - else game.user.character.sheet.close(); - break; - case "render-roll": - if (!game.user.character) - return ui.notifications.warn(t("Litm.ui.warn-no-character")); - game.user.character.sheet.renderRollDialog({ toggle: true }); - break; - } - }); + const { click } = event.currentTarget.dataset; + switch (click) { + case "toggle-rendered": + if (!app.rendered) app.render(true); + else app.close(); + break; + case "render-character": + if (!game.user.character) + return ui.notifications.warn(t("Litm.ui.warn-no-character")); + if (!game.user.character.sheet.rendered) + game.user.character.sheet.render(true); + else game.user.character.sheet.close(); + break; + case "render-roll": + if (!game.user.character) + return ui.notifications.warn(t("Litm.ui.warn-no-character")); + game.user.character.sheet.renderRollDialog({ toggle: true }); + break; + } + }); html.before(buttonSection); }); @@ -639,19 +640,20 @@ export class LitmHooks { ], }); - const { uuid, id } = entry.pages.contents[0] + const { uuid, id } = entry.pages.contents[0]; // Create a "welcome" chat message ChatMessage.create({ title: "Welcome to Legend in the Mist!", content: /* html */ `

    Welcome to Legend in the Mist

    -

    Before you start playing, you should want to read the Legend in the Mist journal entry. It contains some important information about the system, and what to expect.

    +

    Before you start playing, you should want to read the Legend in the Mist journal entry. It contains some important information about the system, and what to expect.

    Once you've read the journal entry, you can click the button below to import all the rules and content required to play the Tinderbox Demo.

    + "Litm.ui.import-adventure", + )}

    Good luck, and have fun!

    `, }); diff --git a/system.json b/system.json index b16ed57..b152d8c 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/foundryvtt-system-manifest.json", "id": "litm", - "version": 24, + "version": 25, "license": "LICENSE", "title": "Legend in the Mist Demo", "description": "A Rustic Fantasy Game for Foundry Virtual Tabletop.", @@ -13,32 +13,21 @@ "ko-fi": "amediocredad" } ], - "esmodules": [ - "litm.js" - ], - "styles": [ - "litm.css" - ], + "esmodules": ["litm.js"], + "styles": ["litm.css"], "documentTypes": { "Actor": { "character": { - "htmlFields": [ - "note" - ] + "htmlFields": ["note"] }, "challenge": { - "htmlFields": [ - "note", - "special" - ] + "htmlFields": ["note", "special"] } }, "Item": { "backpack": {}, "theme": { - "htmlFields": [ - "note" - ] + "htmlFields": ["note"] }, "threat": {} } @@ -88,19 +77,8 @@ ], "flags": { "hotReload": { - "extensions": [ - "css", - "html", - "js", - "json" - ], - "paths": [ - "styles", - "templates", - "lang", - "litm.css", - "litm.js" - ] + "extensions": ["css", "html", "js", "json"], + "paths": ["styles", "templates", "lang", "litm.css", "litm.js"] } }, "relationships": { @@ -115,6 +93,6 @@ "url": "https://github.com/aMediocreDad/litm", "bugs": "https://github.com/aMediocreDad/litm/issues?q=is:issue+is:open+sort:updated-desc", "manifest": "https://raw.githubusercontent.com/aMediocreDad/litm/main/system.json", - "download": "https://github.com/aMediocreDad/litm/archive/refs/tags/v24.zip", + "download": "https://github.com/aMediocreDad/litm/archive/refs/tags/v25.zip", "readme": "https://github.com/aMediocreDad/litm/blob/main/README.md" -} \ No newline at end of file +}