update shim const handling
This commit is contained in:
parent
dd9390f15f
commit
202ca09d18
@ -1,5 +1,5 @@
|
||||
import { api } from './api.js'
|
||||
import { log, shim, CONST } from './shim.js'
|
||||
import { log } from './shim.js'
|
||||
|
||||
function _checkModule (name) {
|
||||
if (!game.modules.get(name)?.active && game.user.isGM) {
|
||||
@ -14,7 +14,5 @@ Hooks.on('setup', api.registerFunctions)
|
||||
|
||||
Hooks.on('ready', () => {
|
||||
_checkModule('warpgate')
|
||||
CONST.FOUNDRY = foundry.CONST
|
||||
CONST.SWADE = CONFIG.SWADE.CONST
|
||||
log('Initialized SWADE MB Helpers')
|
||||
})
|
||||
|
||||
@ -1,6 +1,15 @@
|
||||
export const CONST = {
|
||||
SWADE: null,
|
||||
FOUNDRY: null
|
||||
export class CONST {
|
||||
static get SWADE () {
|
||||
return CONFIG.SWADE.CONST
|
||||
}
|
||||
|
||||
static get FOUNDRY () {
|
||||
return foundry.CONST
|
||||
}
|
||||
|
||||
static get WARPGATE () {
|
||||
return warpgate.CONST
|
||||
}
|
||||
}
|
||||
|
||||
export class shim {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user