Added shortcut for initiative rolls on conflict Tab (character only)

This commit is contained in:
Vlyan
2020-12-29 17:18:57 +01:00
parent e98bf67680
commit 301be94075
13 changed files with 65 additions and 18 deletions

View File

@@ -140,11 +140,12 @@ export class BaseSheetL5r5e extends ActorSheet {
}
// *** Dice event on Skills clic ***
html.find(".skill-name").on("click", (event) => {
const li = $(event.currentTarget).parents(".skill");
html.find(".dice-picker").on("click", (event) => {
const li = $(event.currentTarget);
new game.l5r5e.DicePickerDialog({
skillId: li.data("skill"),
skillCatId: li.data("skillcat"),
skillId: li.data("skill") || null,
skillCatId: li.data("skillcat") || null,
difficulty: li.data("diff") || 2,
actor: this.actor,
}).render(true);
});

View File

@@ -1,10 +1,9 @@
import { RollL5r5e } from "./roll.js";
/**
* L5R Dice picker dialog
* @extends {FormApplication}
*/
import { L5R5E } from "../config.js";
import { RollL5r5e } from "./roll.js";
export class DicePickerDialog extends FormApplication {
/**
* Current Actor
@@ -161,12 +160,12 @@ export class DicePickerDialog extends FormApplication {
name: "",
};
this.skillCatId = L5R5E.skills.get(skillId);
this.skillCatId = CONFIG.l5r5e.skills.get(skillId);
}
/**
* Set and load skill's required data from actor and skillCatId
* @param skillId
* @param skillCatId
*/
set skillCatId(skillCatId) {
if (!skillCatId) {

View File

@@ -1,4 +1,3 @@
import { L5R5E } from "../config.js";
import { L5rBaseDie } from "./dietype/l5r-base-die.js";
/**