Prevent item creation and hide the item tab

This commit is contained in:
Eldritch-Oliver 2025-09-04 19:35:11 -06:00
parent f3a3a65be1
commit 92e7ec1c72
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,7 @@
const { Item } = foundry.documents;
export class TAFItem extends Item {
async _preCreate() {
return false;
};
};

View file

@ -6,6 +6,7 @@ import { PlayerData } from "../data/Player.mjs";
// Documents
import { TAFActor } from "../documents/Actor.mjs";
import { TAFItem } from "../documents/Item.mjs";
import { TAFTokenDocument } from "../documents/Token.mjs";
// Settings
@ -25,6 +26,10 @@ Hooks.on(`init`, () => {
CONFIG.Actor.dataModels.player = PlayerData;
// We disable items in the system for now
CONFIG.Item.documentClass = TAFItem;
delete CONFIG.ui.sidebar.TABS.items;
foundry.documents.collections.Actors.registerSheet(
__ID__,
PlayerSheet,