refactor: use subclasses for different actor types
This commit is contained in:
parent
21f849b464
commit
be616e3be8
23 changed files with 321 additions and 240 deletions
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { isCheck } from "../actor/actor-data-properties";
|
||||
import { isCheck } from "../actor/actor-data-properties-base";
|
||||
import { getGame } from "../helpers";
|
||||
import { DS4Item } from "../item/item";
|
||||
import { createRollCheckMacro } from "../macros/roll-check";
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
import { DS4ActiveEffect } from "../active-effect";
|
||||
import { DS4Actor } from "../actor/actor";
|
||||
import { DS4CharacterActorSheet } from "../actor/sheets/character-sheet";
|
||||
import { DS4CreatureActorSheet } from "../actor/sheets/creature-sheet";
|
||||
import { DS4ActorProxy } from "../actor/proxy";
|
||||
import { DS4CharacterActorSheet } from "../actor/character/character-sheet";
|
||||
import { DS4CreatureActorSheet } from "../actor/creature/creature-sheet";
|
||||
import { DS4ChatMessage } from "../chat-message";
|
||||
import { DS4 } from "../config";
|
||||
import { preloadFonts as preloadFonts } from "../fonts";
|
||||
|
@ -34,7 +35,7 @@ async function init() {
|
|||
logger.info(`Initializing the DS4 Game System\n${DS4.ASCII}`);
|
||||
|
||||
getGame().ds4 = {
|
||||
DS4Actor,
|
||||
DS4Actor: DS4ActorProxy,
|
||||
DS4Item,
|
||||
DS4,
|
||||
createCheckRoll,
|
||||
|
@ -44,7 +45,7 @@ async function init() {
|
|||
|
||||
CONFIG.DS4 = DS4;
|
||||
|
||||
CONFIG.Actor.documentClass = DS4Actor;
|
||||
CONFIG.Actor.documentClass = DS4ActorProxy;
|
||||
CONFIG.Item.documentClass = DS4Item;
|
||||
CONFIG.ActiveEffect.documentClass = DS4ActiveEffect;
|
||||
CONFIG.ChatMessage.documentClass = DS4ChatMessage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue