diff --git a/module/windows/actor-generator.js b/module/windows/actor-generator.js index deed63b..badd117 100644 --- a/module/windows/actor-generator.js +++ b/module/windows/actor-generator.js @@ -125,27 +125,24 @@ export class DLActorGenerator extends FormApplication { async rollPatch(html){ if (this.patchTable == null){ - this.patchTable = "Compendium.fvtt_mosh_1e_psg.rolltables_1e.RollTable.Vry1q39PNXR3X4oY"; + ui.notifications.error("You need a class with defined patch table.");//TODO, localize } - let id = "system.class.patch"; - await this.rollTable(html,id,this.patchTable); + await this.rollTable(html,"system.class.patch",this.patchTable); } async rollTrinket(html){ if (this.trinketTable == null){ - this.trinketTable = "Compendium.fvtt_mosh_1e_psg.rolltables_1e.RollTable.3iJxbTylcgZ0BRaQ"; + ui.notifications.error("You need a class with defined trinket table.");//TODO, localize } - let id = "system.class.trinket"; - await this.rollTable(html,id,this.trinketTable); + await this.rollTable(html,"system.class.trinket",this.trinketTable); } async rollLoadout(html){ if (this.loadoutTable == null){ - ui.notifications.error("You need a class with defined loadout table."); + ui.notifications.error("You need a class with defined loadout table.");//TODO, localize return; } - let id = "system.class.loadout"; - await this.rollTable(html,id,this.loadoutTable,"ul"); + await this.rollTable(html,"system.class.loadout",this.loadoutTable,"ul"); } @@ -165,7 +162,7 @@ export class DLActorGenerator extends FormApplication { } - async updateClass(classUuid){ + async updateClass(classUuid,randomCharacter=false){ const droppedObject = await fromUuid(classUuid); if (droppedObject.type != "class"){ @@ -192,15 +189,13 @@ export class DLActorGenerator extends FormApplication { // Skills //try{ //let skills = JSON.parse(droppedObject.system.skills.replaceAll("
","").replaceAll("
","").replaceAll("