Begin work on the most basic item sheet version

This commit is contained in:
Oliver 2026-03-13 01:05:52 -06:00
parent f91c3d2419
commit 2518c7cf05
6 changed files with 120 additions and 0 deletions

View file

@ -2,6 +2,7 @@
import { AttributeOnlyPlayerSheet } from "../apps/AttributeOnlyPlayerSheet.mjs";
import { PlayerSheet } from "../apps/PlayerSheet.mjs";
import { SingleModePlayerSheet } from "../apps/SingleModePlayerSheet.mjs";
import { GenericItemSheet } from "../apps/GenericItemSheet.mjs";
// Data Models
import { PlayerData } from "../data/Player.mjs";
@ -25,13 +26,18 @@ import { registerSockets } from "../sockets/_index.mjs";
Hooks.on(`init`, () => {
Logger.debug(`Initializing`);
// #region Documents
CONFIG.Token.documentClass = TAFTokenDocument;
CONFIG.Actor.documentClass = TAFActor;
CONFIG.Combatant.documentClass = TAFCombatant;
// #endregion Documents
// #region Data Models
CONFIG.Actor.dataModels.player = PlayerData;
CONFIG.Item.dataModels.generic = GenericItemData;
// #endregion Data Models
// #region Sheets
foundry.documents.collections.Actors.registerSheet(
__ID__,
PlayerSheet,
@ -51,6 +57,16 @@ Hooks.on(`init`, () => {
{ label: `taf.sheet-names.AttributeOnlyPlayerSheet` },
);
foundry.documents.collections.Items.registerSheet(
__ID__,
GenericItemSheet,
{
makeDefault: true,
label: `taf.sheet-names.GenericItemSheet`,
},
);
// #endregion Sheets
registerWorldSettings();
registerSockets();