fix roll with new helper

This commit is contained in:
Vlyan
2020-12-18 18:37:11 +01:00
parent 79a4f55bee
commit b152018607
3 changed files with 4 additions and 4 deletions

View File

@@ -77,7 +77,6 @@ export class TwentyQuestionsDialog extends FormApplication {
* @return {Object}
*/
getData(options = null) {
console.log(game.l5r5e.HelpersL5r5e.getRingsList());
return {
...super.getData(options),
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(),

View File

@@ -197,7 +197,7 @@ export class DicePickerDialog extends FormApplication {
getData(options = null) {
return {
...super.getData(options),
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(),
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(this._actor),
dicesList: [0, 1, 2, 3, 4, 5, 6],
skillData: this._skillData,
actor: this._actor,

View File

@@ -7,11 +7,12 @@ export class HelpersL5r5e {
/**
* Get Rings/Element for List / Select
*/
static getRingsList() {
static getRingsList(actor = null) {
return CONFIG.l5r5e.stances.map((e) => {
return {
id: e,
label: game.i18n.localize(`l5r5e.rings.${e}`),
value: actor?.data?.data?.rings?.[e] || 0,
};
});
}
@@ -19,7 +20,7 @@ export class HelpersL5r5e {
/**
* Get Skills for List / Select with groups
*/
static getSkillsList(useGroup) {
static getSkillsList(useGroup = false) {
if (!useGroup) {
return Array.from(L5R5E.skills).map(([id, cat]) => {
return {