use methods from the foundry.utils namespaces instead of their global counterparts

This commit is contained in:
Johannes Loher 2021-07-01 01:08:30 +02:00
parent 8f7f6af359
commit 1ddabc388c
3 changed files with 4 additions and 4 deletions

View file

@ -113,7 +113,7 @@ export class DS4Actor extends Actor {
}
// Expand the set of final overrides
this.overrides = expandObject({ ...flattenObject(this.overrides), ...overrides });
this.overrides = foundry.utils.expandObject({ ...foundry.utils.flattenObject(this.overrides), ...overrides });
}
protected getOriginatingItemOfActiveEffect(effect: ActiveEffect): DS4Item | undefined {
@ -284,7 +284,7 @@ export class DS4Actor extends Actor {
isDelta = false,
isBar = true,
): Promise<this | undefined> {
const current = getProperty(this.data.data, attribute);
const current = foundry.utils.getProperty(this.data.data, attribute);
// Determine the updates to make to the actor data
let updates: Record<string, number>;

View file

@ -169,7 +169,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Options, DS4ActorSheetD
// Set new value
const newValue = this.getValue(el);
setProperty(itemObject, property, newValue);
foundry.utils.setProperty(itemObject, property, newValue);
this.actor.updateEmbeddedDocuments("Item", [{ ...itemObject }]); // TODO: Improve in upstream
}

View file

@ -13,7 +13,7 @@ export class DS4Roll<D extends Record<string, unknown> = Record<string, unknown>
* @override
*/
async render(chatOptions: Parameters<Roll["render"]>[0] = {}): Promise<string> {
chatOptions = mergeObject(
chatOptions = foundry.utils.mergeObject(
{
user: game.user?.id,
flavor: null,