mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Creating a shared method called isItemAvailable and using it in downtime
This commit is contained in:
parent
12d6b7fa4c
commit
459f87f24c
4 changed files with 46 additions and 40 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import DHBaseActorSettings from '../../applications/sheets/api/actor-setting.mjs';
|
||||
import DHItem from '../../documents/item.mjs';
|
||||
import { getScrollTextData } from '../../helpers/utils.mjs';
|
||||
|
||||
const resistanceField = (resistanceLabel, immunityLabel, reductionLabel) =>
|
||||
|
|
@ -106,6 +107,17 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
|
|||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an item is available for use, such as multiclass features being disabled
|
||||
* on a character.
|
||||
*
|
||||
* @param {DHItem} item The item being checked for availability
|
||||
* @return {boolean} whether the item is available
|
||||
*/
|
||||
isItemAvailable(item) {
|
||||
return true;
|
||||
}
|
||||
|
||||
async _preDelete() {
|
||||
/* Clear all partyMembers from tagTeam setting.*/
|
||||
/* Revisit this when tagTeam is improved for many parties */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue