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 { DS4Actor } from "./actor/actor";
|
||||
import { DS4ActorProxy } from "./actor/proxy";
|
||||
import { getGame } from "./helpers";
|
||||
|
||||
let fallbackData: foundry.data.ActorData["data"] | undefined = undefined;
|
||||
|
@ -13,7 +13,7 @@ function getFallbackData() {
|
|||
for (const type of getGame().system.template.Actor?.types ?? []) {
|
||||
foundry.utils.mergeObject(
|
||||
fallbackData,
|
||||
new DS4Actor({ type: type as foundry.data.ActorData["type"], name: "temporary" }).data.data,
|
||||
new DS4ActorProxy({ type: type as foundry.data.ActorData["type"], name: "temporary" }).data.data,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue