forked from JPMeehan/knw-actors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknw-actors.mjs
35 lines (29 loc) · 1.07 KB
/
knw-actors.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
import OrganizationData from './src/module/data/organizationData.mjs';
import OrganizationSheet from './src/module/sheets/organizationSheet.mjs';
import WarfareData from './src/module/data/warfareData.mjs';
import WarfareSheet from './src/module/sheets/warfareSheet.mjs';
import KNWCONFIG from './src/module/config.mjs';
import OrgDevEditor from './src/module/sheets/orgDevEditor.mjs';
const moduleID = 'knw-actors';
const typeWarfare = 'knw-actors.warfare';
const typeOrganization = 'knw-actors.organization';
Hooks.once('init', () => {
foundry.utils.mergeObject(CONFIG, KNWCONFIG);
Handlebars.registerHelper({
orgDevRangePicker: OrgDevEditor.rangePicker,
});
Object.assign(CONFIG.Actor.dataModels, {
[typeOrganization]: OrganizationData,
[typeWarfare]: WarfareData,
});
Actors.registerSheet(moduleID, OrganizationSheet, {
types: [typeOrganization],
makeDefault: true,
label: 'KNW.Sheets.Organization',
});
Actors.registerSheet(moduleID, WarfareSheet, {
types: [typeWarfare],
makeDefault: true,
label: 'KNW.Sheets.Warfare',
});
});