actor picker 1

This commit is contained in:
François-Xavier Guillois
2023-09-01 19:59:44 +02:00
parent 918b7c0b0c
commit e11525564a
13 changed files with 136 additions and 20 deletions
-1
View File
@@ -253,7 +253,6 @@ export class VermineActorSheet extends ActorSheet {
weapons.push(i);
}
else if (i.type === 'ability') {
console.log('ability', i);
if (i.system.type == 'totem'){
totem_abilities.push(i);
} else {
+18 -1
View File
@@ -1,6 +1,6 @@
import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs";
import { VermineActorSheet } from "./actor-sheet.mjs";
import { TotemPicker } from "../system/applications.mjs";
import { TotemPicker, ActorPicker } from "../system/applications.mjs";
/**
* Extend the basic ActorSheet with some very simple modifications
@@ -147,6 +147,9 @@ export class VermineGroupSheet extends VermineActorSheet {
// Choose Totem
html.find('.chooseTotem').click(this._onTotemButton.bind(this));
// Choose Members / Encounters
html.find('.chooseActor').click(this._onRoadButton.bind(this));
if (this.actor.isOwner) {
let handler = ev => this._onDragStart(ev);
html.find('li.item').each((i, li) => {
@@ -230,4 +233,18 @@ export class VermineGroupSheet extends VermineActorSheet {
totemPicker.render(true);
}
/**
* Handle actor pick
* @param {Event} event The originating click event
* @private
*/
_onRoadButton(event) {
event.preventDefault();
const el = event.currentTarget;
// const dataset = el.dataset;
const actorPicker = new ActorPicker(el, this.actor);
actorPicker.render(true);
}
}