Boutons créatures/entités #69

Change-Id: I0aeded39e99551dbe09dc988e04c1de185c1dc70
This commit is contained in:
Vincent Vandemeulebrouck
2020-12-27 22:21:08 +01:00
parent 97a6ef408d
commit 5d1cb2abec
5 changed files with 40 additions and 14 deletions

View File

@@ -1,12 +1,12 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
*/
import { HtmlUtility } from "./html-utility.js";
import { RdDUtility } from "./rdd-utility.js";
/* -------------------------------------------- */
/* -------------------------------------------- */
export class RdDActorHumanoideSheet extends ActorSheet {
/** @override */
@@ -64,7 +64,9 @@ export class RdDActorHumanoideSheet extends ActorSheet {
/** @override */
activateListeners(html) {
super.activateListeners(html);
HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
@@ -147,6 +149,16 @@ export class RdDActorHumanoideSheet extends ActorSheet {
this.actor.santeIncDec("endurance", -1);
this.render(true);
});
html.find('#encaisser-direct').click(ev => {
this.actor.encaisser()
});
html.find('#remise-a-neuf').click(ev => {
if (game.user.isGM) {
this.actor.remiseANeuf();
}
});
}