From 0bcfb699c032213049e6aceeb3535f486b577ff9 Mon Sep 17 00:00:00 2001 From: Vlyan Date: Mon, 4 Jan 2021 15:58:23 +0100 Subject: [PATCH] Add roll to global game var --- system/lang/en-en.json | 1 + system/lang/es-es.json | 1 + system/lang/fr-fr.json | 1 + system/scripts/actors/twenty-questions-dialog.js | 3 +-- system/scripts/dice/dice-picker-dialog.js | 4 +--- system/scripts/main-l5r5e.js | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/system/lang/en-en.json b/system/lang/en-en.json index cfa08d6..c9f14d9 100644 --- a/system/lang/en-en.json +++ b/system/lang/en-en.json @@ -18,6 +18,7 @@ "other.text.color": "Other Text Color", "def.chat.pref": "Default Chat Prefix", "spe.chat.pref": "If specified, this string will be prefixed to all chat messages that are not already commands (such as /emote.)", + "SETTINGS.None": "No option", "ACTOR.TypeCharacter": "Player Character", "ACTOR.TypeNpc": "Non-Player Character", "ITEM.TypeItem": "Item", diff --git a/system/lang/es-es.json b/system/lang/es-es.json index 2cb4424..c6bb04d 100644 --- a/system/lang/es-es.json +++ b/system/lang/es-es.json @@ -18,6 +18,7 @@ "other.text.color": "Otro color de texto", "def.chat.pref": "Prefijo del chat por defecto", "spe.chat.pref": "Si está configurado, la cadena será prefijada para todos los mensajes de chat que no sean ya comandos (como /emote.)", + "SETTINGS.None": "No option", "ACTOR.TypeCharacter": "Player Character", "ACTOR.TypeNpc": "Non-Player Character", "ITEM.TypeItem": "Item", diff --git a/system/lang/fr-fr.json b/system/lang/fr-fr.json index 3ca0f06..c89f6bf 100644 --- a/system/lang/fr-fr.json +++ b/system/lang/fr-fr.json @@ -18,6 +18,7 @@ "other.text.color": "Autre couleur de texte", "def.chat.pref": "Préfixe de Chat par défaut", "spe.chat.pref": "Si renseignée, la chaîne sera préfixée pour tous les messages de chat qui ne sont pas déjà des commandes (comme /emote.)", + "SETTINGS.None": "Aucune option", "ACTOR.TypeCharacter": "Personnage Joueur", "ACTOR.TypeNpc": "Personnage non Joueur", "ITEM.TypeItem": "Objet", diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index 8f64e44..0d9d1da 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -1,5 +1,4 @@ import { TwentyQuestions } from "./twenty-questions.js"; -import { RollL5r5e } from "../dice/roll.js"; /** * L5R Twenty Questions form @@ -366,7 +365,7 @@ export class TwentyQuestionsDialog extends FormApplication { * @private */ async _rollHeritage(stepName, formula, flavor) { - const roll = new RollL5r5e(formula); + const roll = new game.l5r5e.RollL5r5e(formula); roll.actor = this._actor; await roll.roll(); diff --git a/system/scripts/dice/dice-picker-dialog.js b/system/scripts/dice/dice-picker-dialog.js index b2847ff..b9bad94 100644 --- a/system/scripts/dice/dice-picker-dialog.js +++ b/system/scripts/dice/dice-picker-dialog.js @@ -1,5 +1,3 @@ -import { RollL5r5e } from "./roll.js"; - /** * L5R Dice picker dialog * @extends {FormApplication} @@ -366,7 +364,7 @@ export class DicePickerDialog extends FormApplication { } // Let's roll ! - const roll = await new RollL5r5e(formula.join("+")); + const roll = await new game.l5r5e.RollL5r5e(formula.join("+")); roll.actor = this._actor; roll.l5r5e.stance = this.object.ring.id; diff --git a/system/scripts/main-l5r5e.js b/system/scripts/main-l5r5e.js index cc927e9..5dd1a74 100644 --- a/system/scripts/main-l5r5e.js +++ b/system/scripts/main-l5r5e.js @@ -61,6 +61,7 @@ Hooks.once("init", async function () { // Add some helper classes in game game.l5r5e = { HelpersL5r5e, + RollL5r5e, DicePickerDialog, };