[PR] Removing refreshables the user doesn't have during rest actions (#1449)

* Marking up the places that need changing for bug #1160

* Creating a shared method called isItemAvailable and using it in downtime

* Explicitely adding the false value rather than relying on undefined returns. Oops

* Removing spaces

* Removing a needless return line

* Adding missing semicolon
This commit is contained in:
Nick Salyzyn 2025-12-20 14:00:16 -07:00 committed by GitHub
parent 605a23ab58
commit 0508bf4188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 47 additions and 37 deletions

View file

@ -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 */