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} * @return {Object}
*/ */
getData(options = null) { getData(options = null) {
console.log(game.l5r5e.HelpersL5r5e.getRingsList());
return { return {
...super.getData(options), ...super.getData(options),
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(), ringsList: game.l5r5e.HelpersL5r5e.getRingsList(),

View File

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

View File

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