mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-16 05:31:07 +01:00
Pass the hope value in the button data; skeleton risk it all dialog to fill out.
This commit is contained in:
parent
7e4422dbf4
commit
d414b464b5
7 changed files with 79 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { abilities } from '../../config/actorConfig.mjs';
|
||||
import { emitAsGM, GMUpdateEvent, RefreshType, socketEvent } from '../../systemRegistration/socket.mjs';
|
||||
import RiskItAllDialog from '../dialogs/riskItAllDialog.mjs';
|
||||
|
||||
export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLog {
|
||||
constructor(options) {
|
||||
|
|
@ -82,7 +83,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
element.addEventListener('click', this.groupRollExpandSection)
|
||||
);
|
||||
html.querySelectorAll('.risk-it-all-button').forEach(element =>
|
||||
element.addEventListener('click', event => this.riskItAllClearStressAndHitPoints(event, message))
|
||||
element.addEventListener('click', event => this.riskItAllClearStressAndHitPoints(event, data))
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -375,8 +376,12 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
}
|
||||
|
||||
|
||||
async riskItAllClearStressAndHitPoints(event, message) {
|
||||
console.log("riskItAllClearStressAndHitPoints button hit!", event, message);
|
||||
async riskItAllClearStressAndHitPoints(event, data) {
|
||||
const hopeValue = event.target.dataset.hope;
|
||||
const config = {
|
||||
hope: hopeValue
|
||||
}
|
||||
await new RiskItAllDialog(data.actor, config).render({ force: true });
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue