Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79cfc5769a | ||
|
|
fc7dcff3b0 | ||
|
|
abb883c8b8 |
@@ -8,7 +8,7 @@ import {SoundboardControl} from "./src/soundboard.js";
|
||||
import {OtherControls} from "./src/othercontrols.js";
|
||||
import {ExternalModules} from "./src/external.js";
|
||||
import {SceneControl} from "./src/scene.js";
|
||||
import {downloadUtility, compatibleCore} from "./src/misc.js";
|
||||
import {downloadUtility, compatibleCore, compareVersions} from "./src/misc.js";
|
||||
import {TokenHelper} from "./src/systems/tokenHelper.js";
|
||||
export var streamDeck;
|
||||
export var tokenControl;
|
||||
@@ -70,9 +70,9 @@ async function analyzeWSmessage(msg){
|
||||
system: gamingSystem
|
||||
}
|
||||
ws.send(JSON.stringify(msg));
|
||||
|
||||
if (data.MSversion) msVersion = data.MSversion;
|
||||
|
||||
console.log("streamdeck connected to server");
|
||||
console.log("streamdeck connected to server", msVersion);
|
||||
streamDeck.resetImageBuffer();
|
||||
}
|
||||
|
||||
@@ -90,10 +90,10 @@ async function analyzeWSmessage(msg){
|
||||
|
||||
sdVersion = data.version;
|
||||
|
||||
if (data.version < minimumSDversion && updateDialog == undefined) {
|
||||
if (!compareVersions(minimumSDversion,data.version) && updateDialog == undefined) {
|
||||
updateDialog = new Dialog({
|
||||
title: "Material Deck: Update Needed",
|
||||
content: "<p>The Stream Deck plugin version you're using is v" + data.version + ", which is incompatible with this verion of the module.<br>Update to v" + minimumSDversion + " or newer.</p>",
|
||||
content: "<p>The Stream Deck plugin version you're using is v" + data.version + ", which is incompatible with this version of the module.<br>Update to v" + minimumSDversion + " or newer.</p>",
|
||||
buttons: {
|
||||
download: {
|
||||
icon: '<i class="fas fa-download"></i>',
|
||||
|
||||
12
changelog.md
12
changelog.md
@@ -1,4 +1,16 @@
|
||||
# Changelog Material Deck Module
|
||||
### v1.4.10 - 30-05-2022
|
||||
Fixes:
|
||||
<ul>
|
||||
<li>Stream Deck plugin v1.4.10 was not properly recognized as compatible</li>
|
||||
</ul>
|
||||
|
||||
Additions;
|
||||
<ul>
|
||||
<li>Material Server version is now displayed in the Download Utility (MS v1.1.0+)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
### v1.4.9 - 16-04-2022
|
||||
Fixes:
|
||||
<ul>
|
||||
|
||||
@@ -205,7 +205,8 @@
|
||||
"MaterialDeck.DownloadUtility.SDplugin": "SD Plugin",
|
||||
"MaterialDeck.DownloadUtility.MSserver": "Material Server",
|
||||
"MaterialDeck.DownloadUtility.Windows": "Windows",
|
||||
"MaterialDeck.DownloadUtility.Macos": "MacOS",
|
||||
"MaterialDeck.DownloadUtility.MacosM1": "MacOS (M1)",
|
||||
"MaterialDeck.DownloadUtility.MacosIntel": "MacOS (Intel)",
|
||||
"MaterialDeck.DownloadUtility.Linux": "Linux",
|
||||
"MaterialDeck.DownloadUtility.Source": "Source",
|
||||
"MaterialDeck.DownloadUtility.Profiles": "Profiles",
|
||||
|
||||
@@ -200,7 +200,8 @@
|
||||
"MaterialDeck.DownloadUtility.SDplugin": "SDプラグイン",
|
||||
"MaterialDeck.DownloadUtility.MSserver": "Material Server",
|
||||
"MaterialDeck.DownloadUtility.Windows": "Windows",
|
||||
"MaterialDeck.DownloadUtility.Macos": "MacOS",
|
||||
"MaterialDeck.DownloadUtility.MacosM1": "MacOS (M1)",
|
||||
"MaterialDeck.DownloadUtility.MacosIntel": "MacOS (Intel)",
|
||||
"MaterialDeck.DownloadUtility.Linux": "Linux",
|
||||
"MaterialDeck.DownloadUtility.Source": "ソース",
|
||||
"MaterialDeck.DownloadUtility.Profiles": "プロファイル",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "MaterialDeck",
|
||||
"title": "Material Deck",
|
||||
"description": "Material Deck allows you to control Foundry using an Elgato Stream Deck",
|
||||
"version": "1.4.9",
|
||||
"version": "1.4.10",
|
||||
"author": "CDeenen",
|
||||
"authors": {
|
||||
"name": "CDeenen",
|
||||
|
||||
25
src/misc.js
25
src/misc.js
@@ -1,8 +1,26 @@
|
||||
import {sdVersion, msVersion, moduleName, getPermission, enableModule, streamDeck} from "../MaterialDeck.js";
|
||||
import {macroControl,soundboard,playlistControl} from "../MaterialDeck.js";
|
||||
|
||||
export function compareVersions(checkedVersion, requiredVersion) {
|
||||
requiredVersion = requiredVersion.split(".");
|
||||
checkedVersion = checkedVersion.split(".");
|
||||
for (let i=0; i<3; i++) {
|
||||
requiredVersion[i] = isNaN(parseInt(requiredVersion[i])) ? 0 : parseInt(requiredVersion[i]);
|
||||
checkedVersion[i] = isNaN(parseInt(checkedVersion[i])) ? 0 : parseInt(checkedVersion[i]);
|
||||
}
|
||||
|
||||
if (checkedVersion[0] > requiredVersion[0]) return false;
|
||||
if (checkedVersion[0] < requiredVersion[0]) return true;
|
||||
if (checkedVersion[1] > requiredVersion[1]) return false;
|
||||
if (checkedVersion[1] < requiredVersion[1]) return true;
|
||||
if (checkedVersion[2] > requiredVersion[2]) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function compatibleCore(compatibleVersion){
|
||||
let coreVersion = game.version == undefined ? game.data.version : `0.${game.version}`;
|
||||
return compareVersions(compatibleVersion, coreVersion);
|
||||
/*
|
||||
coreVersion = coreVersion.split(".");
|
||||
compatibleVersion = compatibleVersion.split(".");
|
||||
if (compatibleVersion[0] > coreVersion[0]) return false;
|
||||
@@ -11,6 +29,7 @@ export function compatibleCore(compatibleVersion){
|
||||
if (compatibleVersion[1] < coreVersion[1]) return true;
|
||||
if (compatibleVersion[2] > coreVersion[2]) return false;
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
export class playlistConfigForm extends FormApplication {
|
||||
@@ -1165,7 +1184,7 @@ export class downloadUtility extends FormApplication {
|
||||
let parent = this;
|
||||
let url;
|
||||
if (reqType == 'SD') url = 'https://raw.githubusercontent.com/CDeenen/MaterialDeck_SD/master/Plugin/com.cdeenen.materialdeck.sdPlugin/manifest.json';
|
||||
else if (reqType == 'MS') url = 'https://raw.githubusercontent.com/CDeenen/MaterialServer/master/src/Windows/package.json';
|
||||
else if (reqType == 'MS') url = 'https://raw.githubusercontent.com/CDeenen/MaterialServer/master/package.json';
|
||||
const elementId = reqType == 'SD' ? 'masterSdVersion' : 'masterMsVersion';
|
||||
|
||||
var request = new XMLHttpRequest();
|
||||
@@ -1219,8 +1238,9 @@ export class deviceConfig extends FormApplication {
|
||||
dConfig = {};
|
||||
game.settings.set(moduleName, 'devices', dConfig);
|
||||
}
|
||||
|
||||
|
||||
for (let d of streamDeck.buttonContext) {
|
||||
if (d == undefined) continue;
|
||||
let type;
|
||||
if (d.type == 0) type = 'Stream Deck';
|
||||
else if (d.type == 1) type = 'Stream Deck Mini';
|
||||
@@ -1243,6 +1263,7 @@ export class deviceConfig extends FormApplication {
|
||||
this.devices.push(device);
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
devices: this.devices
|
||||
}
|
||||
|
||||
@@ -130,8 +130,8 @@ export class starfinder{
|
||||
await effect.delete();
|
||||
}
|
||||
else {
|
||||
const effect = CONFIG.statusEffects.find(e => e.id === condition);
|
||||
await token.toggleEffect(effect);
|
||||
if (this.getConditionActive(token,condition)) token.actor.setCondition(condition,false);
|
||||
else token.actor.setCondition(condition,true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
<td class='columnVersion' id='masterMsVersion'>{{masterMsVersion}}</td>
|
||||
<td class='columnOS'>
|
||||
<select id="os" default="" {{#if msDlDisable}}disabled{{/if}}>
|
||||
<option value="win">{{localize "MaterialDeck.DownloadUtility.Windows"}}</option>
|
||||
<option value="macos">{{localize "MaterialDeck.DownloadUtility.Macos"}}</option>
|
||||
<option value="linux">{{localize "MaterialDeck.DownloadUtility.Linux"}}</option>
|
||||
<option value="win32-x64">{{localize "MaterialDeck.DownloadUtility.Windows"}}</option>
|
||||
<option value="macos-x64">{{localize "MaterialDeck.DownloadUtility.MacosIntel"}}</option>
|
||||
<option value="macos-arm64">{{localize "MaterialDeck.DownloadUtility.MacosM1"}}</option>
|
||||
<option value="linux-x64">{{localize "MaterialDeck.DownloadUtility.Linux"}}</option>
|
||||
<option value="source">{{localize "MaterialDeck.DownloadUtility.Source"}}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user