diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/lang/de.json @@ -0,0 +1 @@ +{} diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/lang/en.json @@ -0,0 +1 @@ +{} diff --git a/lang/hr.json b/lang/hr.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/lang/hr.json @@ -0,0 +1 @@ +{} diff --git a/module.json b/module.json index ccd4ab7..a70945f 100644 --- a/module.json +++ b/module.json @@ -14,6 +14,9 @@ "minimum": 12, "verified": 12 }, + "esmodules": [ + "src/timer.js" + ], "languages": [ { "lang": "en", @@ -21,17 +24,17 @@ "path": "lang/en.json" }, { - "lang": "en", - "name": "English", - "path": "lang/en.json" + "lang": "de", + "name": "Deutsch", + "path": "lang/de.json" }, { - "lang": "en", - "name": "English", - "path": "lang/en.json" + "lang": "hr", + "name": "Hrvatski", + "path": "lang/hr.json" } ], "url": "https://zlatko.dev/projects/vtt-timer", "manifest": "https://gitea.zlatko.dev/vtt/timer", - "download": "missing-url" + "download": "https://gitea.zlatko.dev/vtt/timer/archive/v0.1.0.zip" } diff --git a/package.json b/package.json index 42d36f4..d671db0 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@zladuric/timer", "version": "0.0.1", "main": "index.js", + "type": "module", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/src/timer.js b/src/timer.js new file mode 100644 index 0000000..b4901d8 --- /dev/null +++ b/src/timer.js @@ -0,0 +1,21 @@ +console.log('We just booted!'); + +Hooks.on('init', function() { + console.log('Timer module init'); +}); + +Hooks.on('ready', function() { + console.log('Timer module ready'); +}); + +Hooks.on('error', function(location, error, payload) { + console.error(`Timer module error at ${location}`, error, payload ?? 'no payload'); +}); + +Hooks.on('pauseGame', function(paused) { + if (paused) { + console.log('Game paused.'); + } else { + console.log('Game unpaused'); + } +});