army sheet : added ability to drop a actor for commander & warlord, and some fixes

This commit is contained in:
Vlyan
2021-12-02 10:09:47 +01:00
parent 1b1dbbdb2d
commit c265e741b9
12 changed files with 261 additions and 70 deletions

View File

@@ -144,8 +144,8 @@ export class GmMonitor extends FormApplication {
return;
}
// Open sheet
html.find(`.actor-sheet-control`).on("click", this._openActorSheet.bind(this));
// Commons
game.l5r5e.HelpersL5r5e.commonListeners(html);
// Delete
html.find(`.actor-remove-control`).on("click", this._removeActor.bind(this));
@@ -222,24 +222,6 @@ export class GmMonitor extends FormApplication {
);
}
/**
* Open the Sheet for this actor
* @param {Event} event
* @return {Promise<void>}
* @private
*/
async _openActorSheet(event) {
event.preventDefault();
event.stopPropagation();
const id = $(event.currentTarget).data("actor-id");
if (!id) {
return;
}
this.object.actors.find((e) => e.id === id)?.sheet?.render(true);
}
/**
* Remove the link to a property for the current item
* @param {Event} event