Skip to content

Commit

Permalink
Merge pull request #1560 from snap01/fixes
Browse files Browse the repository at this point in the history
Fix chase item on FoundryVTT v12
  • Loading branch information
snap01 authored Jun 11, 2024
2 parents 3b30214 + 3066efa commit 2e12f8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions module/items/chase/sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ export class CoC7ChaseSheet extends ItemSheet {
participant.data.rollUuid = roll.uuid
}

await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

_onDragEnterParticipant (event) {
Expand All @@ -952,7 +952,7 @@ export class CoC7ChaseSheet extends ItemSheet {
? foundry.utils.duplicate(this.item.system.participants)
: []
participants[index].chaser = !participants[index].chaser
await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

async _onDeleteDriver (event) {
Expand All @@ -965,7 +965,7 @@ export class CoC7ChaseSheet extends ItemSheet {
: []
const participant = participants[index]
delete participant.docUuid
await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

async _onDeleteParticipant (event) {
Expand All @@ -977,7 +977,7 @@ export class CoC7ChaseSheet extends ItemSheet {
? foundry.utils.duplicate(this.item.system.participants)
: []
participants.splice(index, 1)
await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

async _onResetRoll (event) {
Expand All @@ -989,7 +989,7 @@ export class CoC7ChaseSheet extends ItemSheet {
? foundry.utils.duplicate(this.item.system.participants)
: []
delete participants[index].speedCheck.rollDataString
await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

async alterParticipant (data, uuid) {
Expand Down Expand Up @@ -1054,7 +1054,7 @@ export class CoC7ChaseSheet extends ItemSheet {
const oldParticipant = participants[index]
if (oldParticipant.mov) delete oldParticipant.mov
foundry.utils.mergeObject(oldParticipant, participant)
await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

async clearActiveLocationCoordinates () {
Expand Down Expand Up @@ -1160,7 +1160,7 @@ export class CoC7ChaseSheet extends ItemSheet {
}

participants.push(participant)
await this.item.update({ 'data.participants': participants })
await this.item.update({ 'system.participants': participants })
}

async toggleParticipantGun (participantUuid) {
Expand Down

0 comments on commit 2e12f8e

Please sign in to comment.