change to game.modules.get(name) method
This commit is contained in:
+3
-8
@@ -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,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'
|
||||
|
||||
Reference in New Issue
Block a user