-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoidhack.js
More file actions
44 lines (33 loc) · 1.35 KB
/
voidhack.js
File metadata and controls
44 lines (33 loc) · 1.35 KB
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
import { registerPartials } from './module/partials.js';
import { voidhack } from "./module/config.js";
import ghkItemSheet from "./module/sheets/ghkItemSheet.js";
import ghkCharacterSheet from "./module/sheets/ghkCharacterSheet.js";
async function preloadHandlebarsTemplates() {
const templatePaths = [
"systems/voidhack/templates/partials/character-header.html",
"systems/voidhack/templates/partials/character-attributes.html",
"systems/voidhack/templates/partials/character-abilities.html",
"systems/voidhack/templates/partials/character-equipment.html",
"systems/voidhack/templates/partials/character-estate.html"
];
return loadTemplates(templatePaths);
}
Hooks.once("init", function () {
console.log("voidhack | Initialising voidhack")
CONFIG.voidhack = voidhack;
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("voidhack", ghkItemSheet, { makeDefault: true });
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("voidhack", ghkCharacterSheet, { makeDefault: true });
registerPartials();
preloadHandlebarsTemplates()
Handlebars.registerHelper('concat', function() {
var outStr = '';
for (var arg in arguments) {
if (typeof arguments[arg] != 'object') {
outStr += arguments[arg];
}
}
return outStr;
});
});