some minor consumables fixes, more to come later (#429)

* some minor consumables fixes, more to come later

* another typo T_T

* more loot rename fixes

* more loot fixes

* Changed miscellaneous to loot

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
CPTN Cosmo 2025-07-27 15:50:48 +02:00 committed by GitHub
parent 8cb4b7663e
commit 5215212e02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 5254 additions and 1049 deletions

View file

@ -132,14 +132,14 @@ export default class ClassSheet extends DHBaseItemSheet {
});
}
} else if (target.classList.contains('choice-a-section')) {
if (item.type === 'miscellaneous' || item.type === 'consumable') {
if (item.type === 'loot' || item.type === 'consumable') {
const filteredChoiceA = this.document.system.inventory.choiceA;
if (filteredChoiceA.length < 2)
await this.document.update({
'system.inventory.choiceA': [...filteredChoiceA.map(x => x.uuid), item.uuid]
});
}
} else if (item.type === 'miscellaneous') {
} else if (item.type === 'loot') {
if (target.classList.contains('take-section')) {
const filteredTake = this.document.system.inventory.take.filter(x => x);
if (filteredTake.length < 3)