This commit is contained in:
CDeenen
2021-03-11 02:28:26 +01:00
parent 7d4fd1e8b1
commit cc9bcf4770
14 changed files with 491 additions and 92 deletions

View File

@@ -85,13 +85,13 @@ async function analyzeWSmessage(msg){
const event = data.event;
const context = data.context;
const coordinates = data.payload.coordinates;
if (coordinates == undefined) coordinates = 0;
const settings = data.payload.settings;
if (data.data == 'init'){
}
if (event == 'willAppear' || event == 'didReceiveSettings'){
if (coordinates == undefined) return;
streamDeck.setScreen(action);
streamDeck.setContext(action,context,coordinates,settings);
@@ -118,6 +118,7 @@ async function analyzeWSmessage(msg){
}
else if (event == 'willDisappear'){
if (coordinates == undefined) return;
streamDeck.clearContext(action,coordinates,context);
}
@@ -488,6 +489,16 @@ Hooks.on('NotYourTurn', ()=>{
externalModules.updateAll();
})
Hooks.on('pseudoclockSet', ()=>{
if (enableModule == false || ready == false) return;
externalModules.updateAll();
})
Hooks.on('about-time.clockRunningStatus', ()=>{
if (enableModule == false || ready == false) return;
externalModules.updateAll();
})
Hooks.once('init', ()=>{
//CONFIG.debug.hooks = true;
registerSettings(); //in ./src/settings.js