Skip to content

Commit

Permalink
Release v25
Browse files Browse the repository at this point in the history
  • Loading branch information
aMediocreDad committed Jul 26, 2024
1 parent 9fbf10e commit d8bb03d
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 73 deletions.
2 changes: 1 addition & 1 deletion lang/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@
"adventure": "历练",
"greatness": "伟业",
"Notes": "笔记"
}
}
2 changes: 1 addition & 1 deletion lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@
"adventure": "Erlebnis",
"greatness": "Großartigkeit",
"Notes": "Notizen"
}
}
2 changes: 1 addition & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@
"adventure": "Adventure",
"greatness": "Greatness",
"Notes": "Notes"
}
}
2 changes: 1 addition & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,4 @@
"adventure": "Aventura",
"greatness": "Grandeza",
"Notes": "Notas"
}
}
2 changes: 1 addition & 1 deletion lang/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@
"adventure": "Eventyr",
"greatness": "Storhet",
"Notes": "Beskrivelse"
}
}
74 changes: 38 additions & 36 deletions scripts/system/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
Expand Down Expand Up @@ -377,43 +377,44 @@ export class LitmHooks {
</li>
<li>
<button type="button" data-click="render-character"
data-tooltip="${game.user.character
? game.user.character.name
: t("USER.FIELDS.character.label")
}">
data-tooltip="${
game.user.character
? game.user.character.name
: t("USER.FIELDS.character.label")
}">
<i class="fas fa-user"></i>
</button>
</li>
<li>
<button type="button" data-click="render-roll" aria-label="${t(
"Litm.ui.roll-title",
)}"
"Litm.ui.roll-title",
)}"
data-tooltip="${t("Litm.ui.roll-title")}">
<i class="fas fa-dice"></i>
</button>
</li>
</menu>
`).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);
});
Expand Down Expand Up @@ -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 */ `
<p><strong>Welcome to Legend in the Mist</strong></p>
<p>Before you start playing, you should want to read the <a class="content-link" draggable="true" data-link data-uuid="${uuid
}" data-id="${id}" data-type="JournalEntryPage" data-tooltip="${t("Litm.ui.user-manual")}"><i class="fas fa-file-lines"></i>Legend in the Mist</a> journal entry. It contains some important information about the system, and what to expect.</p>
<p>Before you start playing, you should want to read the <a class="content-link" draggable="true" data-link data-uuid="${
uuid
}" data-id="${id}" data-type="JournalEntryPage" data-tooltip="${t("Litm.ui.user-manual")}"><i class="fas fa-file-lines"></i>Legend in the Mist</a> journal entry. It contains some important information about the system, and what to expect.</p>
<p>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.</p>
<button type="button" id="litm--import-adventure" style="background: var(--litm-color-status-bg);"><strong>${t(
"Litm.ui.import-adventure",
)}</strong></button>
"Litm.ui.import-adventure",
)}</strong></button>
<p style="text-align:center;">Good luck, and have fun!</p>
`,
});
Expand Down
42 changes: 10 additions & 32 deletions system.json
Original file line number Diff line number Diff line change
@@ -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 <strong>Rustic Fantasy</strong> Game for Foundry Virtual Tabletop.",
Expand All @@ -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": {}
}
Expand Down Expand Up @@ -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": {
Expand All @@ -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"
}
}

0 comments on commit d8bb03d

Please sign in to comment.