Skip to content

Commit

Permalink
Close #1937
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-man committed Apr 28, 2024
1 parent 7c3a42a commit 62e8642
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions modules/actor/actor-wfrp4e.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ export default class ActorWfrp4e extends WFRP4eDocumentMixin(Actor)


async _onUpdate(data, options, user) {
if (game.user.id != user) {
await super._onUpdate(data, options, user);

if (game.user.id != user)
{
return
}


await super._onUpdate(data, options, user);
await Promise.all(this.runScripts("update", {data, options, user}))
// this.system.checkSize();
}
Expand Down
3 changes: 2 additions & 1 deletion modules/actor/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ const WFRP4eDocumentMixin = (cls) => class extends cls {
}

async _onUpdate(data, options, user) {
await super._onUpdate(data, options, user);

if (game.user.id != user) {
return;
}

await super._onUpdate(data, options, user);
let update = this.system.updateChecks(data, options, user)
if (!foundry.utils.isEmpty(update)) {
await this.update(update);
Expand Down
5 changes: 3 additions & 2 deletions modules/item/item-wfrp4e.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ export default class ItemWfrp4e extends WFRP4eDocumentMixin(Item)

async _onUpdate(data, options, user)
{
await super._onUpdate(data, options, user)

if (game.user.id != user)
{
return;
}
await super._onUpdate(data, options, user)


if (hasProperty(data, "system.worn") || hasProperty(data, "system.equipped"))
{
await Promise.all(this.runScripts("equipToggle", {equipped : this.isEquipped}))
Expand Down
2 changes: 1 addition & 1 deletion modules/system/opposed-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export default class OpposedTest {
let breakdown = this.result.breakdown;
let accumulator = Number(breakdown.base);

string += `<p><strong>${game.i18n.localize("BREAKDOWN.AttackerBase")</strong>: ${breakdown.base}</p>`;
string += `<p><strong>${game.i18n.localize("BREAKDOWN.AttackerBase")}</strong>: ${breakdown.base}</p>`;
if (breakdown.damaging)
{
accumulator += Number(breakdown.damaging);
Expand Down

0 comments on commit 62e8642

Please sign in to comment.