refactor: use subclasses for different item types
This commit is contained in:
parent
be616e3be8
commit
8d2cff77d7
47 changed files with 766 additions and 456 deletions
|
@ -26,6 +26,7 @@ import { DS4Roll } from "../rolls/roll";
|
|||
import registerSlayingDiceModifier from "../rolls/slaying-dice-modifier";
|
||||
import { registerSystemSettings } from "../settings";
|
||||
import { DS4TokenDocument } from "../token-document";
|
||||
import { DS4ItemProxy } from "../item/proxy";
|
||||
|
||||
export default function registerForInitHook(): void {
|
||||
Hooks.once("init", init);
|
||||
|
@ -36,7 +37,7 @@ async function init() {
|
|||
|
||||
getGame().ds4 = {
|
||||
DS4Actor: DS4ActorProxy,
|
||||
DS4Item,
|
||||
DS4Item: DS4ItemProxy,
|
||||
DS4,
|
||||
createCheckRoll,
|
||||
migration,
|
||||
|
@ -46,7 +47,7 @@ async function init() {
|
|||
CONFIG.DS4 = DS4;
|
||||
|
||||
CONFIG.Actor.documentClass = DS4ActorProxy;
|
||||
CONFIG.Item.documentClass = DS4Item;
|
||||
CONFIG.Item.documentClass = DS4ItemProxy;
|
||||
CONFIG.ActiveEffect.documentClass = DS4ActiveEffect;
|
||||
CONFIG.ChatMessage.documentClass = DS4ChatMessage;
|
||||
CONFIG.Token.documentClass = DS4TokenDocument;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue