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
17
src/actor/creature/creature.ts
Normal file
17
src/actor/creature/creature.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// SPDX-FileCopyrightText: 2022 Johannes Loher
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { ItemType } from "../../item/item-data-source";
|
||||
import { DS4Actor } from "../actor";
|
||||
|
||||
export class DS4Creature extends DS4Actor {
|
||||
/** @override */
|
||||
get ownableItemTypes(): Array<ItemType> {
|
||||
return [...super.ownableItemTypes, "specialCreatureAbility"];
|
||||
}
|
||||
}
|
||||
|
||||
export interface DS4Creature {
|
||||
data: foundry.data.ActorData & { type: "creature"; _source: { type: "creature" } };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue