Update to use foundry.utils.mergeObject

This commit is contained in:
Melon-PieldeSapo
2025-01-06 13:22:00 +01:00
parent 2ce7bc4184
commit 11e2f285a8
6 changed files with 6 additions and 24 deletions
+1 -6
View File
@@ -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);
}
/* -------------------------------------------- */
+1 -5
View File
@@ -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);
}
/**
+1 -6
View File
@@ -24,12 +24,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);
}
+1 -1
View File
@@ -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,
+1 -5
View File
@@ -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 */
+1 -1
View File
@@ -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