more foundry.utils moves
This commit is contained in:
parent
e240bb5bf1
commit
141b06adea
@ -23,7 +23,7 @@ export function firstOwner(doc) {
|
|||||||
// https://github.com/trioderegion/warpgate/blob/master/src/scripts/module.js
|
// https://github.com/trioderegion/warpgate/blob/master/src/scripts/module.js
|
||||||
if (!doc) return undefined;
|
if (!doc) return undefined;
|
||||||
const corrected = doc instanceof TokenDocument ? doc.actor : doc instanceof Token ? doc.document.actor : doc;
|
const corrected = doc instanceof TokenDocument ? doc.actor : doc instanceof Token ? doc.document.actor : doc;
|
||||||
const permissionObject = getProperty(corrected ?? {}, 'ownership');
|
const permissionObject = foundry.utils.getProperty(corrected ?? {}, 'ownership');
|
||||||
const playerOwners = Object.entries(permissionObject)
|
const playerOwners = Object.entries(permissionObject)
|
||||||
.filter(([id, level]) => !game.users.get(id)?.isGM && game.users.get(id)?.active && level === 3)
|
.filter(([id, level]) => !game.users.get(id)?.isGM && game.users.get(id)?.active && level === 3)
|
||||||
.map(([id]) => id);
|
.map(([id]) => id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user