From 3b394323a9bd193fbe6c92c7e3fc0895c8afa70f Mon Sep 17 00:00:00 2001 From: U~man Date: Tue, 14 Jul 2020 11:50:21 +0200 Subject: [PATCH] ENH: Treasure localization --- src/lang/en.json | 2 ++ src/lang/es.json | 2 ++ src/lang/fr.json | 2 ++ src/module/item/entity.js | 1 + src/module/treasure.js | 3 ++- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lang/en.json b/src/lang/en.json index 0642d77..68dbe75 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -36,6 +36,8 @@ "OSE.roll.type.above": "Above", "OSE.roll.type.below": "Below", + "OSE.table.treasure.roll": "Roll Treasure", + "OSE.details.name": "Name", "OSE.details.class": "Class", "OSE.details.title": "Title", diff --git a/src/lang/es.json b/src/lang/es.json index 99c74d0..954086d 100644 --- a/src/lang/es.json +++ b/src/lang/es.json @@ -36,6 +36,8 @@ "OSE.roll.type.above": "Encima", "OSE.roll.type.below": "Debajo", + "OSE.table.treasure.roll": "Roll Treasure", + "OSE.details.name": "Nombre", "OSE.details.class": "Clase", "OSE.details.title": "Titulo", diff --git a/src/lang/fr.json b/src/lang/fr.json index 069551e..0e54994 100644 --- a/src/lang/fr.json +++ b/src/lang/fr.json @@ -36,6 +36,8 @@ "OSE.roll.type.above": "Au-Dessus", "OSE.roll.type.below": "En-Dessous", + "OSE.table.treasure.roll": "Trésor Aléatoire", + "OSE.details.name": "Nom", "OSE.details.class": "Classe", "OSE.details.title": "Titre", diff --git a/src/module/item/entity.js b/src/module/item/entity.js index 9328fb5..fc71005 100644 --- a/src/module/item/entity.js +++ b/src/module/item/entity.js @@ -262,6 +262,7 @@ export class OseItem extends Item { }; // Toggle default roll mode + let rollMode = game.settings.get("core", "rollMode"); if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM"); if (rollMode === "selfroll") chatData["whisper"] = [game.user._id]; diff --git a/src/module/treasure.js b/src/module/treasure.js index d5e7322..d45297f 100644 --- a/src/module/treasure.js +++ b/src/module/treasure.js @@ -21,7 +21,7 @@ export const augmentTable = (table, html, data) => { html.find(".result-weight").first().text("Chance"); // Replace Roll button - const roll = ``; + const roll = ``; html.find(".sheet-footer .roll").replaceWith(roll); } @@ -85,6 +85,7 @@ async function rollTreasure(table, options = {}) { sound: "/systems/ose/assets/coins.mp3" } + let rollMode = game.settings.get("core", "rollMode"); if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM"); if (rollMode === "selfroll") chatData["whisper"] = [game.user._id]; if (rollMode === "blindroll") chatData["blind"] = true;