Manage GM cards
This commit is contained in:
parent
a824a82678
commit
d7131d4675
@ -11,7 +11,7 @@ export class SoSGMDeck extends Dialog {
|
|||||||
title: 'GM Deck Dialog',
|
title: 'GM Deck Dialog',
|
||||||
content: html,
|
content: html,
|
||||||
buttons: {
|
buttons: {
|
||||||
'flip-close': { label: 'Cancel and Close', callback: html => this.onFlipClose() }
|
'flip-close': { label: 'Close', callback: html => this.onFlipClose() }
|
||||||
},
|
},
|
||||||
default: 'flip'
|
default: 'flip'
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,7 @@ Hooks.once("init", async function () {
|
|||||||
// Create useful storage space
|
// Create useful storage space
|
||||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
|
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/gm-deck.html', {} );
|
||||||
let gmDeck = new SoSGMDeck(html);
|
let gmDeck = new SoSGMDeck(html);
|
||||||
gmDeck.render(true);
|
//gmDeck.render(true);
|
||||||
game.system.sos = {
|
game.system.sos = {
|
||||||
gmDeck: gmDeck,
|
gmDeck: gmDeck,
|
||||||
}
|
}
|
||||||
@ -117,13 +117,16 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
|||||||
if (content[0] == '/') {
|
if (content[0] == '/') {
|
||||||
let regExp = /(\S+)/g;
|
let regExp = /(\S+)/g;
|
||||||
let commands = content.toLowerCase().match(regExp);
|
let commands = content.toLowerCase().match(regExp);
|
||||||
if (game.system.sos.commands.processChatCommand(commands, content, msg)) {
|
console.log(commands);
|
||||||
|
if ( commands[0] == '/gmdeck') {
|
||||||
|
game.system.sos.gmDeck.render(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||||
//SoS.pushInitiativeOptions(html, options);
|
//SoS.pushInitiativeOptions(html, options);
|
||||||
|
Loading…
Reference in New Issue
Block a user