-
Notifications
You must be signed in to change notification settings - Fork 0
/
wfrp-tweaks.mjs
executable file
·59 lines (51 loc) · 1.91 KB
/
wfrp-tweaks.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* This is your JavaScript entry file for Foundry VTT.
* Register custom settings, sheets, and constants using the Foundry API.
* Change this heading to be more descriptive to your module, or remove it.
* Author: DasSauerkraut
* Software License: MIT
*/
// Import JavaScript modules
import { registerSettings } from './modules/settings.mjs';
import { preloadTemplates } from './modules/preloadTemplates.mjs';
import { macroHooks } from './modules/wfrp-macros.mjs'
import { trappingStatus } from './modules/wfrp-trappingStatus.mjs';
import { spendAdvantage } from './modules/wfrp-spendAdvantage.mjs';
import { advantageBonus } from './modules/wfrp-advantageBonus.mjs';
import { integratedPenalties } from './modules/wfrp-integratedPenalties.mjs';
/* ------------------------------------ */
/* Initialize module */
/* ------------------------------------ */
Hooks.on('init', async function() {
console.log('wfrp-tweaks | Initializing wfrp-tweaks');
// Assign custom classes and constants here
// Register custom module settings
registerSettings();
// Preload Handlebars templates
await preloadTemplates();
// Start Tweaks
macroHooks();
if(game.settings.get("wfrp-tweaks", 'trappingStatus'))
trappingStatus();
if(game.settings.get("wfrp-tweaks", 'spendAdvantage'))
spendAdvantage();
else if(game.settings.get("wfrp-tweaks", 'advantageBonus') != 10)
advantageBonus();
// if(game.settings.get("wfrp-tweaks", "integratedPenalties"))
// integratedPenalties();
});
/* ------------------------------------ */
/* Setup module */
/* ------------------------------------ */
Hooks.once('setup', function() {
// Do anything after initialization but before
// ready
});
/* ------------------------------------ */
/* When ready */
/* ------------------------------------ */
Hooks.once('ready', function() {
// Do anything once the module is ready
CONFIG.debug.hooks = true;
});
// Add any additional hooks if necessary