mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
fix conflicts
This commit is contained in:
commit
7178148c80
63 changed files with 1969 additions and 3301 deletions
|
|
@ -11,8 +11,8 @@ export default class ClassSheet extends DaggerheartSheet(ItemSheetV2) {
|
|||
actions: {
|
||||
removeSubclass: this.removeSubclass,
|
||||
viewSubclass: this.viewSubclass,
|
||||
removeFeature: this.removeFeature,
|
||||
viewFeature: this.viewFeature,
|
||||
deleteFeature: this.deleteFeature,
|
||||
editFeature: this.editFeature,
|
||||
removeItem: this.removeItem,
|
||||
viewItem: this.viewItem,
|
||||
removePrimaryWeapon: this.removePrimaryWeapon,
|
||||
|
|
@ -153,13 +153,13 @@ export default class ClassSheet extends DaggerheartSheet(ItemSheetV2) {
|
|||
subclass.sheet.render(true);
|
||||
}
|
||||
|
||||
static async removeFeature(_, button) {
|
||||
static async deleteFeature(_, button) {
|
||||
await this.document.update({
|
||||
'system.features': this.document.system.features.filter(x => x.uuid !== button.dataset.feature)
|
||||
'system.features': this.document.system.features.map(x => x.uuid).filter(x => x !== button.dataset.feature)
|
||||
});
|
||||
}
|
||||
|
||||
static async viewFeature(_, button) {
|
||||
static async editFeature(_, button) {
|
||||
const feature = await fromUuid(button.dataset.feature);
|
||||
feature.sheet.render(true);
|
||||
}
|
||||
|
|
@ -198,15 +198,11 @@ export default class ClassSheet extends DaggerheartSheet(ItemSheetV2) {
|
|||
const item = await fromUuid(data.uuid);
|
||||
if (item.type === 'subclass') {
|
||||
await this.document.update({
|
||||
'system.subclasses': [
|
||||
...this.document.system.subclasses, item.uuid
|
||||
]
|
||||
'system.subclasses': [...this.document.system.subclasses.map(x => x.uuid), item.uuid]
|
||||
});
|
||||
} else if (item.type === 'feature') {
|
||||
await this.document.update({
|
||||
'system.features': [
|
||||
...this.document.system.features, item.uuid
|
||||
]
|
||||
'system.features': [...this.document.system.features.map(x => x.uuid), item.uuid]
|
||||
});
|
||||
} else if (item.type === 'weapon') {
|
||||
if (event.currentTarget.classList.contains('primary-weapon-section')) {
|
||||
|
|
@ -231,25 +227,19 @@ export default class ClassSheet extends DaggerheartSheet(ItemSheetV2) {
|
|||
if (item.type === 'miscellaneous' || item.type === 'consumable') {
|
||||
if (this.document.system.inventory.choiceA.length < 2)
|
||||
await this.document.update({
|
||||
'system.inventory.choiceA': [
|
||||
...this.document.system.inventory.choiceA, item.uuid
|
||||
]
|
||||
'system.inventory.choiceA': [...this.document.system.inventory.choiceA, item.uuid]
|
||||
});
|
||||
}
|
||||
} else if (item.type === 'miscellaneous') {
|
||||
if (event.currentTarget.classList.contains('take-section')) {
|
||||
if (this.document.system.inventory.take.length < 3)
|
||||
await this.document.update({
|
||||
'system.inventory.take': [
|
||||
...this.document.system.inventory.take, item.uuid
|
||||
]
|
||||
'system.inventory.take': [...this.document.system.inventory.take, item.uuid]
|
||||
});
|
||||
} else if (event.currentTarget.classList.contains('choice-b-section')) {
|
||||
if (this.document.system.inventory.choiceB.length < 2)
|
||||
await this.document.update({
|
||||
'system.inventory.choiceB': [
|
||||
...this.document.system.inventory.choiceB, item.uuid
|
||||
]
|
||||
'system.inventory.choiceB': [...this.document.system.inventory.choiceB, item.uuid]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue