59 lines
1.7 KiB
JavaScript
59 lines
1.7 KiB
JavaScript
// Apps
|
|
import { AttributeOnlyPlayerSheet } from "../apps/AttributeOnlyPlayerSheet.mjs";
|
|
import { PlayerSheet } from "../apps/PlayerSheet.mjs";
|
|
import { SingleModePlayerSheet } from "../apps/SingleModePlayerSheet.mjs";
|
|
|
|
// Data Models
|
|
import { PlayerData } from "../data/Player.mjs";
|
|
import { GenericItemData } from "../data/Item/generic.mjs";
|
|
|
|
// Documents
|
|
import { TAFActor } from "../documents/Actor.mjs";
|
|
import { TAFCombatant } from "../documents/Combatant.mjs";
|
|
import { TAFTokenDocument } from "../documents/Token.mjs";
|
|
|
|
// Settings
|
|
import { registerWorldSettings } from "../settings/world.mjs";
|
|
|
|
// Utils
|
|
import { __ID__ } from "../consts.mjs";
|
|
import helpers from "../handlebarsHelpers/_index.mjs";
|
|
import { Logger } from "../utils/Logger.mjs";
|
|
import { registerCustomComponents } from "../apps/elements/_index.mjs";
|
|
import { registerSockets } from "../sockets/_index.mjs";
|
|
|
|
Hooks.on(`init`, () => {
|
|
Logger.debug(`Initializing`);
|
|
|
|
CONFIG.Token.documentClass = TAFTokenDocument;
|
|
CONFIG.Actor.documentClass = TAFActor;
|
|
CONFIG.Combatant.documentClass = TAFCombatant;
|
|
|
|
CONFIG.Actor.dataModels.player = PlayerData;
|
|
CONFIG.Item.dataModels.generic = GenericItemData;
|
|
|
|
foundry.documents.collections.Actors.registerSheet(
|
|
__ID__,
|
|
PlayerSheet,
|
|
{
|
|
makeDefault: true,
|
|
label: `taf.sheet-names.PlayerSheet`,
|
|
},
|
|
);
|
|
foundry.documents.collections.Actors.registerSheet(
|
|
__ID__,
|
|
SingleModePlayerSheet,
|
|
{ label: `taf.sheet-names.SingleModePlayerSheet` },
|
|
);
|
|
foundry.documents.collections.Actors.registerSheet(
|
|
__ID__,
|
|
AttributeOnlyPlayerSheet,
|
|
{ label: `taf.sheet-names.AttributeOnlyPlayerSheet` },
|
|
);
|
|
|
|
registerWorldSettings();
|
|
|
|
registerSockets();
|
|
registerCustomComponents();
|
|
Handlebars.registerHelper(helpers);
|
|
});
|