Reorganized structure
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"id": "on-site-vtt",
|
"id": "on-site-vtt",
|
||||||
"title": "On-Site VTT - Virtual Tabletop, now with less virtual",
|
"title": "On-Site VTT - Virtual Tabletop, now with less virtual",
|
||||||
"description": "A simple module adding functionality to improve playability for multiple players on a single screen/digital map.",
|
"description": "A simple module adding functionality to improve playability for multiple players on a single screen/digital map.",
|
||||||
"version": "0.0.5",
|
"version": "0.0.6",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "11"
|
"verified": "11"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"url": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT",
|
"url": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT",
|
||||||
"manifest": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/on-site-vtt/module.json",
|
"manifest": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/on-site-vtt/module.json",
|
||||||
"download": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/archive/0.0.5.zip",
|
"download": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/archive/0.0.6.zip",
|
||||||
"bugs": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/issues",
|
"bugs": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/issues",
|
||||||
"readme": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/README.md",
|
"readme": "https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/README.md",
|
||||||
"license" :"https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/LICENSE.txt",
|
"license" :"https://gitea.aweleczka.de/aweleczka/On-Site-VTT/raw/branch/main/LICENSE.txt",
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
if(game.modules.get("on-site-vtt")?.active) {
|
|
||||||
console.log("on-site-vtt active");
|
|
||||||
|
|
||||||
Hooks.on("init", function () {
|
function inti() {
|
||||||
|
if (game.modules.get("on-site-vtt")?.active) {
|
||||||
|
console.log("on-site-vtt | Enabled");
|
||||||
|
|
||||||
Hooks.on(
|
Hooks.on(
|
||||||
"getSceneControlButtons",
|
"getSceneControlButtons",
|
||||||
(controls: SceneControl[]) => {
|
(controls: SceneControl[]) => {
|
||||||
@@ -15,16 +16,22 @@ if(game.modules.get("on-site-vtt")?.active) {
|
|||||||
button: true,
|
button: true,
|
||||||
onClick: () => rotateView(),
|
onClick: () => rotateView(),
|
||||||
});
|
});
|
||||||
|
console.log("on-site-vtt | Added control button");
|
||||||
});
|
});
|
||||||
});
|
} else {
|
||||||
|
console.log("on-site-vtt | Disabled");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function rotateView() {
|
function rotateView() {
|
||||||
if(document.getElementsByTagName("body")[0].className.includes("nsvRotate")) {
|
if (document.getElementsByTagName("body")[0].className.includes("nsvRotate")) {
|
||||||
document.getElementsByTagName("body")[0].className = document.getElementsByTagName("body")[0].className.replace( /(?:^|\s)nsvRotate(?!\S)/g , '' )
|
document.getElementsByTagName("body")[0].className = document.getElementsByTagName("body")[0].className.replace(/(?:^|\s)nsvRotate(?!\S)/g, '')
|
||||||
document.getElementById("board").className = document.getElementById("board").className.replace( /(?:^|\s)nsvRotate(?!\S)/g , '' )
|
document.getElementById("board").className = document.getElementById("board").className.replace(/(?:^|\s)nsvRotate(?!\S)/g, '')
|
||||||
} else {
|
} else {
|
||||||
document.getElementsByTagName("body")[0].className += " nsvRotate";
|
document.getElementsByTagName("body")[0].className += " nsvRotate";
|
||||||
document.getElementById("board").className += " nsvRotate";
|
document.getElementById("board").className += " nsvRotate";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Hooks.on("init", init);
|
||||||
Reference in New Issue
Block a user