change to game.modules.get(name) method

This commit is contained in:
2023-10-01 12:07:27 -05:00
parent 41e1ade442
commit d9917ac5c8
24 changed files with 87 additions and 90 deletions
+3 -8
View File
@@ -9,15 +9,10 @@ export class api {
}
static globals () {
globalThis.swadeMBHelpers = {
const moduleName = 'swade-mb-helpers'
game.modules.get(moduleName).api = {
DEBUG: true,
powerEffects,
createEffectDocument: shim.createEffectDocument,
createMutationWithEffect: helpers.createMutationWithEffect,
defaultMutationOptions: helpers.defaultMutationOptions,
getActorFolderByPath: shim.getActorFolderByPath,
getActorsInFolder: shim.getActorsInFolder,
runOnTargetOrSelectedTokens: helpers.runOnTargetOrSelectedTokens
powerEffects
}
}
}
+2
View File
@@ -2,6 +2,8 @@ import { api } from './api.js'
import { shapeChangeOnDismiss } from './powerEffects.js'
import { log } from './shim.js'
const moduleName = 'swade-mb-helpers'
function _checkModule (name) {
if (!game.modules.get(name)?.active && game.user.isGM) {
let action = 'install and activate'