use methods from the foundry.utils namespaces instead of their global counterparts
This commit is contained in:
parent
8f7f6af359
commit
1ddabc388c
3 changed files with 4 additions and 4 deletions
|
@ -113,7 +113,7 @@ export class DS4Actor extends Actor {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expand the set of final overrides
|
// 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 {
|
protected getOriginatingItemOfActiveEffect(effect: ActiveEffect): DS4Item | undefined {
|
||||||
|
@ -284,7 +284,7 @@ export class DS4Actor extends Actor {
|
||||||
isDelta = false,
|
isDelta = false,
|
||||||
isBar = true,
|
isBar = true,
|
||||||
): Promise<this | undefined> {
|
): 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
|
// Determine the updates to make to the actor data
|
||||||
let updates: Record<string, number>;
|
let updates: Record<string, number>;
|
||||||
|
|
|
@ -169,7 +169,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Options, DS4ActorSheetD
|
||||||
|
|
||||||
// Set new value
|
// Set new value
|
||||||
const newValue = this.getValue(el);
|
const newValue = this.getValue(el);
|
||||||
setProperty(itemObject, property, newValue);
|
foundry.utils.setProperty(itemObject, property, newValue);
|
||||||
this.actor.updateEmbeddedDocuments("Item", [{ ...itemObject }]); // TODO: Improve in upstream
|
this.actor.updateEmbeddedDocuments("Item", [{ ...itemObject }]); // TODO: Improve in upstream
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ export class DS4Roll<D extends Record<string, unknown> = Record<string, unknown>
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
async render(chatOptions: Parameters<Roll["render"]>[0] = {}): Promise<string> {
|
async render(chatOptions: Parameters<Roll["render"]>[0] = {}): Promise<string> {
|
||||||
chatOptions = mergeObject(
|
chatOptions = foundry.utils.mergeObject(
|
||||||
{
|
{
|
||||||
user: game.user?.id,
|
user: game.user?.id,
|
||||||
flavor: null,
|
flavor: null,
|
||||||
|
|
Loading…
Reference in a new issue