Reorganized structure

This commit is contained in:
Alexander
2023-12-10 21:00:31 +01:00
parent e0d435e8d3
commit 453c52ca87
2 changed files with 17 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
"id": "on-site-vtt",
"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.",
"version": "0.0.5",
"version": "0.0.6",
"compatibility": {
"minimum": "10",
"verified": "11"
@@ -27,7 +27,7 @@
],
"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",
"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",
"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",

View File

@@ -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(
"getSceneControlButtons",
(controls: SceneControl[]) => {
@@ -15,9 +16,13 @@ if(game.modules.get("on-site-vtt")?.active) {
button: true,
onClick: () => rotateView(),
});
console.log("on-site-vtt | Added control button");
});
});
} else {
console.log("on-site-vtt | Disabled");
}
}
function rotateView() {
if (document.getElementsByTagName("body")[0].className.includes("nsvRotate")) {
@@ -28,3 +33,5 @@ function rotateView() {
document.getElementById("board").className += " nsvRotate";
}
}
Hooks.on("init", init);