Item Support #69
3 changed files with 30 additions and 22 deletions
|
|
@ -13,24 +13,18 @@ import { toID } from "./utils/toID.mjs";
|
||||||
|
|
||||||
const { deepFreeze } = foundry.utils;
|
const { deepFreeze } = foundry.utils;
|
||||||
|
|
||||||
Object.defineProperty(
|
export const api = deepFreeze({
|
||||||
globalThis,
|
DialogManager,
|
||||||
`taf`,
|
QueryManager,
|
||||||
{
|
Apps: {
|
||||||
value: deepFreeze({
|
Ask,
|
||||||
DialogManager,
|
AttributeManager,
|
||||||
QueryManager,
|
PlayerSheet,
|
||||||
Apps: {
|
QueryStatus,
|
||||||
Ask,
|
|
||||||
AttributeManager,
|
|
||||||
PlayerSheet,
|
|
||||||
QueryStatus,
|
|
||||||
},
|
|
||||||
utils: {
|
|
||||||
attributeSorter,
|
|
||||||
localizer,
|
|
||||||
toID,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
);
|
utils: {
|
||||||
|
attributeSorter,
|
||||||
|
localizer,
|
||||||
|
toID,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@ import { formatWeight } from "./utils/formatWeight.mjs";
|
||||||
|
|
||||||
const { deepSeal } = foundry.utils;
|
const { deepSeal } = foundry.utils;
|
||||||
|
|
||||||
export const config = CONFIG.TAF = deepSeal({
|
export const config = deepSeal({
|
||||||
weightFormatter: formatWeight,
|
weightFormatter: formatWeight,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,18 @@
|
||||||
import "./api.mjs";
|
|
||||||
import "./hooks/init.mjs";
|
import "./hooks/init.mjs";
|
||||||
import "./hooks/userConnected.mjs";
|
import "./hooks/userConnected.mjs";
|
||||||
import "./hooks/renderSettingsConfig.mjs";
|
import "./hooks/renderSettingsConfig.mjs";
|
||||||
|
import { api } from "./api.mjs";
|
||||||
|
import { config } from "./config.mjs";
|
||||||
|
|
||||||
|
Object.defineProperty(
|
||||||
|
globalThis,
|
||||||
|
`taf`,
|
||||||
|
{
|
||||||
|
value: Object.seal({
|
||||||
|
api,
|
||||||
|
config,
|
||||||
|
}),
|
||||||
|
writable: false,
|
||||||
|
enumerable: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue