Prevent item creation and hide the item tab
This commit is contained in:
parent
f3a3a65be1
commit
92e7ec1c72
2 changed files with 12 additions and 0 deletions
7
module/documents/Item.mjs
Normal file
7
module/documents/Item.mjs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const { Item } = foundry.documents;
|
||||
|
||||
export class TAFItem extends Item {
|
||||
async _preCreate() {
|
||||
return false;
|
||||
};
|
||||
};
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue