Add roll to global game var

This commit is contained in:
Vlyan
2021-01-04 15:58:23 +01:00
parent 911e7f4415
commit 0bcfb699c0
6 changed files with 6 additions and 5 deletions

View File

@@ -18,6 +18,7 @@
"other.text.color": "Other Text Color", "other.text.color": "Other Text Color",
"def.chat.pref": "Default Chat Prefix", "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.)", "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.TypeCharacter": "Player Character",
"ACTOR.TypeNpc": "Non-Player Character", "ACTOR.TypeNpc": "Non-Player Character",
"ITEM.TypeItem": "Item", "ITEM.TypeItem": "Item",

View File

@@ -18,6 +18,7 @@
"other.text.color": "Otro color de texto", "other.text.color": "Otro color de texto",
"def.chat.pref": "Prefijo del chat por defecto", "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.)", "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.TypeCharacter": "Player Character",
"ACTOR.TypeNpc": "Non-Player Character", "ACTOR.TypeNpc": "Non-Player Character",
"ITEM.TypeItem": "Item", "ITEM.TypeItem": "Item",

View File

@@ -18,6 +18,7 @@
"other.text.color": "Autre couleur de texte", "other.text.color": "Autre couleur de texte",
"def.chat.pref": "Préfixe de Chat par défaut", "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.)", "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.TypeCharacter": "Personnage Joueur",
"ACTOR.TypeNpc": "Personnage non Joueur", "ACTOR.TypeNpc": "Personnage non Joueur",
"ITEM.TypeItem": "Objet", "ITEM.TypeItem": "Objet",

View File

@@ -1,5 +1,4 @@
import { TwentyQuestions } from "./twenty-questions.js"; import { TwentyQuestions } from "./twenty-questions.js";
import { RollL5r5e } from "../dice/roll.js";
/** /**
* L5R Twenty Questions form * L5R Twenty Questions form
@@ -366,7 +365,7 @@ export class TwentyQuestionsDialog extends FormApplication {
* @private * @private
*/ */
async _rollHeritage(stepName, formula, flavor) { async _rollHeritage(stepName, formula, flavor) {
const roll = new RollL5r5e(formula); const roll = new game.l5r5e.RollL5r5e(formula);
roll.actor = this._actor; roll.actor = this._actor;
await roll.roll(); await roll.roll();

View File

@@ -1,5 +1,3 @@
import { RollL5r5e } from "./roll.js";
/** /**
* L5R Dice picker dialog * L5R Dice picker dialog
* @extends {FormApplication} * @extends {FormApplication}
@@ -366,7 +364,7 @@ export class DicePickerDialog extends FormApplication {
} }
// Let's roll ! // Let's roll !
const roll = await new RollL5r5e(formula.join("+")); const roll = await new game.l5r5e.RollL5r5e(formula.join("+"));
roll.actor = this._actor; roll.actor = this._actor;
roll.l5r5e.stance = this.object.ring.id; roll.l5r5e.stance = this.object.ring.id;

View File

@@ -61,6 +61,7 @@ Hooks.once("init", async function () {
// Add some helper classes in game // Add some helper classes in game
game.l5r5e = { game.l5r5e = {
HelpersL5r5e, HelpersL5r5e,
RollL5r5e,
DicePickerDialog, DicePickerDialog,
}; };