Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
257a736c83 | ||
|
|
33f2b372a4 | ||
|
|
7a2587083b |
@@ -6,6 +6,10 @@ Date format : day/month/year
|
|||||||
> - `foundry-version`: Stick to the major version of FoundryVTT.
|
> - `foundry-version`: Stick to the major version of FoundryVTT.
|
||||||
> - `system-version`: System functionalities and Fixes.
|
> - `system-version`: System functionalities and Fixes.
|
||||||
|
|
||||||
|
## 1.12.2 - 16/09/2024 - Bugfixes
|
||||||
|
- Modified : The checkbox `reverseFatigueBar` is now a drop-down with `none`/`fatigue`/`strife`/`both`, and is now an client preference.
|
||||||
|
- Fixed : Character sheet errors when using a non-supported language (Thx to KitCat #56).
|
||||||
|
|
||||||
## 1.12.1 - 19/06/2024 - Compendium update (mostly french)
|
## 1.12.1 - 19/06/2024 - Compendium update (mostly french)
|
||||||
- Updated the names and pages number from the official French translation of `Celestial Realms` and `Fields of Victory`.
|
- Updated the names and pages number from the official French translation of `Celestial Realms` and `Fields of Victory`.
|
||||||
- Added some missing from `Celestial Realms` and `Celestial Realms - Deathly Turns`:
|
- Added some missing from `Celestial Realms` and `Celestial Realms - Deathly Turns`:
|
||||||
|
|||||||
@@ -5,7 +5,14 @@
|
|||||||
},
|
},
|
||||||
"SETTINGS": {
|
"SETTINGS": {
|
||||||
"None": "No option",
|
"None": "No option",
|
||||||
"ReverseFatigueBar": "Reverse token fatigue bar",
|
"ReverseTokenBars": {
|
||||||
|
"Title": "Reverse tokens bar",
|
||||||
|
"Hint": "Change the order in which the bars under the tokens are filled in",
|
||||||
|
"None": "None",
|
||||||
|
"Fatigue": "Fatigue only",
|
||||||
|
"Strife": "Strife",
|
||||||
|
"Both": "Both Fatigue and Strife"
|
||||||
|
},
|
||||||
"RollNKeep": {
|
"RollNKeep": {
|
||||||
"DeleteOldMessage": "RnK Delete previous chat message",
|
"DeleteOldMessage": "RnK Delete previous chat message",
|
||||||
"DeleteOldMessageHint": "Choose to keep or delete the previous message for a RnK series"
|
"DeleteOldMessageHint": "Choose to keep or delete the previous message for a RnK series"
|
||||||
|
|||||||
@@ -5,7 +5,14 @@
|
|||||||
},
|
},
|
||||||
"SETTINGS": {
|
"SETTINGS": {
|
||||||
"None": "Sin opción",
|
"None": "Sin opción",
|
||||||
"ReverseFatigueBar": "Invertir la barra de fatiga de los token",
|
"ReverseTokenBars": {
|
||||||
|
"Title": "Reverse tokens bar",
|
||||||
|
"Hint": "Change the order in which the bars under the tokens are filled in",
|
||||||
|
"None": "None",
|
||||||
|
"Fatigue": "Fatigue only",
|
||||||
|
"Strife": "Strife",
|
||||||
|
"Both": "Both Fatigue and Strife"
|
||||||
|
},
|
||||||
"RollNKeep": {
|
"RollNKeep": {
|
||||||
"DeleteOldMessage": "TyG Eliminar el mensaje anterior del chat",
|
"DeleteOldMessage": "TyG Eliminar el mensaje anterior del chat",
|
||||||
"DeleteOldMessageHint": "Elige si mantener o borrar el mensaje anterior de la serie TyG"
|
"DeleteOldMessageHint": "Elige si mantener o borrar el mensaje anterior de la serie TyG"
|
||||||
@@ -22,6 +29,10 @@
|
|||||||
"Title": "Custom Compendium Name",
|
"Title": "Custom Compendium Name",
|
||||||
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||||
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||||
|
},
|
||||||
|
"CustomItemsHeight": {
|
||||||
|
"Title": "Default items windows height",
|
||||||
|
"Hint": "Set the default height for 'Items' windows types (techniques, weapons...), in pixels"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
|
|||||||
@@ -5,7 +5,14 @@
|
|||||||
},
|
},
|
||||||
"SETTINGS": {
|
"SETTINGS": {
|
||||||
"None": "Aucune option",
|
"None": "Aucune option",
|
||||||
"ReverseFatigueBar": "Inverser la barre de fatigue des token",
|
"ReverseTokenBars": {
|
||||||
|
"Title": "Inverser la barre des tokens",
|
||||||
|
"Hint": "Change l'ordre de remplissage des barres sous les tokens",
|
||||||
|
"None": "Aucun",
|
||||||
|
"Fatigue": "Fatigue uniquement",
|
||||||
|
"Strife": "Conflit uniquement",
|
||||||
|
"Both": "Les deux (Fatigue et Conflit)"
|
||||||
|
},
|
||||||
"RollNKeep": {
|
"RollNKeep": {
|
||||||
"DeleteOldMessage": "RnK Supprime le précédent message du chat",
|
"DeleteOldMessage": "RnK Supprime le précédent message du chat",
|
||||||
"DeleteOldMessageHint": "Si coché, on supprime le message précédent pour la série de jets via le RnK"
|
"DeleteOldMessageHint": "Si coché, on supprime le message précédent pour la série de jets via le RnK"
|
||||||
|
|||||||
@@ -5,7 +5,14 @@
|
|||||||
},
|
},
|
||||||
"SETTINGS": {
|
"SETTINGS": {
|
||||||
"None": "Niente",
|
"None": "Niente",
|
||||||
"ReverseFatigueBar": "Inverti barra della Stanchezza",
|
"ReverseTokenBars": {
|
||||||
|
"Title": "Reverse tokens bar",
|
||||||
|
"Hint": "Change the order in which the bars under the tokens are filled in",
|
||||||
|
"None": "None",
|
||||||
|
"Fatigue": "Fatigue only",
|
||||||
|
"Strife": "Strife",
|
||||||
|
"Both": "Both Fatigue and Strife"
|
||||||
|
},
|
||||||
"RollNKeep": {
|
"RollNKeep": {
|
||||||
"DeleteOldMessage": "Il Tira e Tieni cancella il messaggio in chat precedente",
|
"DeleteOldMessage": "Il Tira e Tieni cancella il messaggio in chat precedente",
|
||||||
"DeleteOldMessageHint": "Scegli se mantenere o eliminare il messaggio precedente in una serie di Tira e Tieni"
|
"DeleteOldMessageHint": "Scegli se mantenere o eliminare il messaggio precedente in una serie di Tira e Tieni"
|
||||||
@@ -22,6 +29,10 @@
|
|||||||
"Title": "Custom Compendium Name",
|
"Title": "Custom Compendium Name",
|
||||||
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||||
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||||
|
},
|
||||||
|
"CustomItemsHeight": {
|
||||||
|
"Title": "Default items windows height",
|
||||||
|
"Hint": "Set the default height for 'Items' windows types (techniques, weapons...), in pixels"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
html,
|
html,
|
||||||
"system.identity.family",
|
"system.identity.family",
|
||||||
CONFIG.l5r5e.families.get(
|
CONFIG.l5r5e.families.get(
|
||||||
Object.entries(game.i18n.translations.l5r5e.clans).find(
|
Object.entries(game.l5r5e.HelpersL5r5e.getLocalizedRawObject("l5r5e.clans")).find(
|
||||||
([k, v]) => v === this.actor.system.identity.clan
|
([k, v]) => v === this.actor.system.identity.clan
|
||||||
)?.[0]
|
)?.[0]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
html,
|
html,
|
||||||
"step2.family",
|
"step2.family",
|
||||||
CONFIG.l5r5e.families.get(
|
CONFIG.l5r5e.families.get(
|
||||||
Object.entries(game.i18n.translations.l5r5e.clans).find(
|
Object.entries(game.l5r5e.HelpersL5r5e.getLocalizedRawObject("l5r5e.clans")).find(
|
||||||
([k, v]) => v === this.object.data.step1.clan
|
([k, v]) => v === this.object.data.step1.clan
|
||||||
)?.[0]
|
)?.[0]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* L5R5e Base Die
|
* L5R5e Base Die
|
||||||
*/
|
*/
|
||||||
export class L5rBaseDie extends DiceTerm {
|
export class L5rBaseDie extends foundry.dice.terms.DiceTerm {
|
||||||
/** Need to be override */
|
/** Need to be overridden */
|
||||||
static DENOMINATION = "";
|
static DENOMINATION = "";
|
||||||
|
|
||||||
/** Need to be override */
|
/** Need to be overridden */
|
||||||
static FACES = {};
|
static FACES = {};
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export class HelpersL5r5e {
|
|||||||
* @return {string[]}
|
* @return {string[]}
|
||||||
*/
|
*/
|
||||||
static getLocalizedClansList() {
|
static getLocalizedClansList() {
|
||||||
return Object.entries(game.i18n.translations.l5r5e.clans)
|
return Object.entries(game.l5r5e.HelpersL5r5e.getLocalizedRawObject("l5r5e.clans"))
|
||||||
.filter(([k, v]) => !["title", "label"].includes(k))
|
.filter(([k, v]) => !["title", "label"].includes(k))
|
||||||
.map(([k, v]) => v);
|
.map(([k, v]) => v);
|
||||||
}
|
}
|
||||||
@@ -101,6 +101,20 @@ export class HelpersL5r5e {
|
|||||||
return Array.from(comp.index).map((v) => v.name);
|
return Array.from(comp.index).map((v) => v.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the raw object from localization, with fallback if the selected language is unknown
|
||||||
|
* @param {string} key
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
static getLocalizedRawObject(key) {
|
||||||
|
let object = foundry.utils.getProperty(game.i18n.translations, key);
|
||||||
|
if (!!object) {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
object = foundry.utils.getProperty(game.i18n._fallback, key);
|
||||||
|
return object ?? key;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the list of Roles
|
* Return the list of Roles
|
||||||
* @return {string[]}
|
* @return {string[]}
|
||||||
|
|||||||
@@ -208,7 +208,8 @@ Hooks.once("init", async () => {
|
|||||||
|
|
||||||
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
||||||
Token.prototype._drawBar = function (number, bar, data) {
|
Token.prototype._drawBar = function (number, bar, data) {
|
||||||
const reverseBar = data.attribute === "fatigue" && game.settings.get(L5R5E.namespace, "token-reverseFatigueBar");
|
const barSettings = game.settings.get(L5R5E.namespace, "token-reverse-token-bars");
|
||||||
|
const reverseBar = barSettings === 'both' || barSettings === data.attribute;
|
||||||
|
|
||||||
// Bar value
|
// Bar value
|
||||||
const pct = Math.clamp(Number(data.value), 0, data.max) / data.max;
|
const pct = Math.clamp(Number(data.value), 0, data.max) / data.max;
|
||||||
|
|||||||
@@ -23,13 +23,6 @@ export const RegisterSettings = function () {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
});
|
});
|
||||||
game.settings.register(CONFIG.l5r5e.namespace, "token-reverseFatigueBar", {
|
|
||||||
name: "SETTINGS.ReverseFatigueBar",
|
|
||||||
scope: "world",
|
|
||||||
config: true,
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
});
|
|
||||||
game.settings.register(CONFIG.l5r5e.namespace, "techniques-customs", {
|
game.settings.register(CONFIG.l5r5e.namespace, "techniques-customs", {
|
||||||
name: "SETTINGS.CustomTechniques.Title",
|
name: "SETTINGS.CustomTechniques.Title",
|
||||||
hint: "SETTINGS.CustomTechniques.Hint",
|
hint: "SETTINGS.CustomTechniques.Hint",
|
||||||
@@ -47,7 +40,7 @@ export const RegisterSettings = function () {
|
|||||||
type: String,
|
type: String,
|
||||||
default: "l5r5e-custom-compendiums",
|
default: "l5r5e-custom-compendiums",
|
||||||
onChange: (name) => {
|
onChange: (name) => {
|
||||||
if (!Babele.get().modules.find((module) => module.module === name)) {
|
if (game.babele && !game.babele.modules.find((module) => module.module === name)) {
|
||||||
ui.notifications.warn(game.i18n.format("SETTINGS.CustomCompendiumName.Notification", { name }), { permanent: true });
|
ui.notifications.warn(game.i18n.format("SETTINGS.CustomCompendiumName.Notification", { name }), { permanent: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,6 +63,20 @@ export const RegisterSettings = function () {
|
|||||||
},
|
},
|
||||||
default: 800,
|
default: 800,
|
||||||
});
|
});
|
||||||
|
game.settings.register(CONFIG.l5r5e.namespace, "token-reverse-token-bars", {
|
||||||
|
name: "SETTINGS.ReverseTokenBars.Title",
|
||||||
|
hint: "SETTINGS.ReverseTokenBars.Hint",
|
||||||
|
scope: "client",
|
||||||
|
config: true,
|
||||||
|
default: "none",
|
||||||
|
choices: {
|
||||||
|
"none": "SETTINGS.ReverseTokenBars.None",
|
||||||
|
"fatigue": "SETTINGS.ReverseTokenBars.Fatigue",
|
||||||
|
"strife": "SETTINGS.ReverseTokenBars.Strife",
|
||||||
|
"both": "SETTINGS.ReverseTokenBars.Both"
|
||||||
|
},
|
||||||
|
type: String,
|
||||||
|
});
|
||||||
|
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* Update */
|
/* Update */
|
||||||
|
|||||||
@@ -7,14 +7,13 @@
|
|||||||
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
||||||
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
||||||
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
||||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.12.1/raw/l5r5e.zip?job=build",
|
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.12.2/raw/l5r5e.zip?job=build",
|
||||||
"version": "1.12.1",
|
"version": "1.12.2",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "12",
|
"minimum": "12",
|
||||||
"verified": "12",
|
"verified": "12",
|
||||||
"maximum": "12"
|
"maximum": "12"
|
||||||
},
|
},
|
||||||
"manifestPlusVersion": "1.2.0",
|
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user