ENH: Treasure localization

master
U~man 2020-07-14 11:50:21 +02:00
parent b253bea1c7
commit 3b394323a9
5 changed files with 9 additions and 1 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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];

View File

@ -21,7 +21,7 @@ export const augmentTable = (table, html, data) => {
html.find(".result-weight").first().text("Chance");
// Replace Roll button
const roll = `<button class="roll-treasure" type="button"><i class="fas fa-gem"></i> Roll Treasure</button>`;
const roll = `<button class="roll-treasure" type="button"><i class="fas fa-gem"></i> ${game.i18n.localize('OSE.table.treasure.roll')}</button>`;
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;