-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathqq.js
49 lines (41 loc) · 1.48 KB
/
qq.js
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
import { preloadHandlebarsTemplates } from "./scripts/templates/templates.js";
import ActorSheetCharacter from './scripts/sheets/character.js';
import ItemSheetResource from './scripts/sheets/resource.js';
import ItemSheetPerk from './scripts/sheets/perk.js';
import ActorEntity from './scripts/entities/actor.js';
import ItemEntity from './scripts/entities/item.js';
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.once("init", function() {
console.log(`Giffyglyph's Quick Quest | Initialising`);
CONFIG.Actor.entityClass = ActorEntity;
CONFIG.Item.entityClass = ItemEntity;
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("gqq", ActorSheetCharacter, {
types: ["character"],
makeDefault: true,
label: "sheet.character.label"
});
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("gqq", ItemSheetResource, {
types: ['resource'],
makeDefault: true,
label: "sheet.resource.label"
});
Items.registerSheet("gqq", ItemSheetPerk, {
types: ['perk'],
makeDefault: true,
label: "sheet.perk.label"
});
// Register handlebars helpers
Handlebars.registerHelper('concat', function(...args) {
return args.slice(0, -1).join('');
});
Handlebars.registerHelper('strlen', function(str) {
return String(str).length;
});
preloadHandlebarsTemplates();
console.log(`Giffyglyph's Quick Quest | Initialised`);
});