Skip to content

Commit

Permalink
Merge pull request #61 from Futil/59-upgrade-mergeobject-to-be-foundr…
Browse files Browse the repository at this point in the history
…yutilsmergeobject

59 upgrade mergeobject to be foundryutilsmergeobject
  • Loading branch information
Melon-PieldeSapo authored Jan 6, 2025
2 parents 63c4a3e + 11e2f28 commit 2c41d1e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
7 changes: 1 addition & 6 deletions module/actor/actor-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ export class MothershipActorSheet extends ActorSheet {
height: 820,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
}

if (game.release.generation >= 12) {
return foundry.utils.mergeObject(super.defaultOptions, options);
} else {
return mergeObject(super.defaultOptions, options);
}
return foundry.utils.mergeObject(super.defaultOptions, options);
}

/* -------------------------------------------- */
Expand Down
6 changes: 1 addition & 5 deletions module/actor/creature-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ export class MothershipCreatureSheet extends ActorSheet {
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
};

if (game.release.generation >= 12) {
return foundry.utils.mergeObject(super.defaultOptions, options);
} else {
return mergeObject(super.defaultOptions, options);
}
return foundry.utils.mergeObject(super.defaultOptions, options);
}

/**
Expand Down
7 changes: 1 addition & 6 deletions module/actor/ship-sheet-sbt.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
scrollY: [".sheet-body", "scroll-lock"]
}


if (game.release.generation >= 12) {
return foundry.utils.mergeObject(super.defaultOptions, options);
} else {
return mergeObject(super.defaultOptions, options);
}
return foundry.utils.mergeObject(super.defaultOptions, options);


}
Expand Down
2 changes: 1 addition & 1 deletion module/actor/ship-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class MothershipShipSheet extends ActorSheet {

/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["mosh", "sheet", "actor", "ship"],
template: "systems/mosh/templates/actor/ship-sheet.html",
width: 700,
Expand Down
6 changes: 1 addition & 5 deletions module/item/item-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ export class MothershipItemSheet extends ItemSheet {
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
};

if (game.release.generation >= 12) {
return foundry.utils.mergeObject(super.defaultOptions, options);
} else {
return mergeObject(super.defaultOptions, options);
}
return foundry.utils.mergeObject(super.defaultOptions, options);
}

/** @override */
Expand Down
2 changes: 1 addition & 1 deletion module/mosh.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Hooks.on("preCreateActor", (document, createData, options, userId) => {
}

// Set wounds, advantage, and display name visibility
mergeObject(createData,
foundry.utils.mergeObject(createData,
{
"token.bar1": { "attribute": "health" }, // Default Bar 1 to Health
"token.bar2": { "attribute": "hits" }, // Default Bar 2 to Insanity
Expand Down

0 comments on commit 2c41d1e

Please sign in to comment.