changed setting to a drop down of actor packs
This commit is contained in:
parent
59f9022e43
commit
b7b8b5c54a
@ -1,11 +1,19 @@
|
||||
import { moduleHelpers, settingKeys } from './globals.js';
|
||||
import { moduleHelpers, settingKeys, log } from './globals.js';
|
||||
|
||||
export function registerSettings() {
|
||||
const choices = {};
|
||||
const packs = game.packs.filter((p) => p.documentName === 'Actor');
|
||||
for (const pack of packs) {
|
||||
choices[pack.metadata.id] = pack.metadata.label;
|
||||
}
|
||||
log('found packs', packs);
|
||||
log('found choices', choices);
|
||||
moduleHelpers.registerSetting(settingKeys.powerActorsCompendium, {
|
||||
name: 'mbhelpers.settings.powerActorsCompendiumName',
|
||||
hint: 'mbhelpers.settings.powerActorsCompendiumHint',
|
||||
scope: 'world',
|
||||
config: true,
|
||||
choices,
|
||||
requiresReload: false,
|
||||
type: String,
|
||||
});
|
||||
|
||||
@ -26,9 +26,6 @@ Hooks.once('init', async () => {
|
||||
initVisionModes();
|
||||
// Assign custom classes and constants here
|
||||
|
||||
// Register custom module settings
|
||||
registerSettings();
|
||||
|
||||
// Preload Handlebars templates
|
||||
await preloadTemplates();
|
||||
});
|
||||
@ -36,6 +33,8 @@ Hooks.once('init', async () => {
|
||||
// Setup module
|
||||
Hooks.once('setup', async () => {
|
||||
api.registerFunctions();
|
||||
// Register custom module settings
|
||||
registerSettings();
|
||||
});
|
||||
|
||||
Hooks.once('ready', async () => {
|
||||
|
||||
@ -29,29 +29,30 @@
|
||||
&>label {
|
||||
grid-column: 1 / span 1;
|
||||
justify-self: end;
|
||||
text-align: right;
|
||||
|
||||
&::after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
&.mbcheckbox {
|
||||
grid-column: 2 / span 1;
|
||||
justify-self: start;
|
||||
// &.mbcheckbox {
|
||||
// grid-column: 2 / span 1;
|
||||
// justify-self: start;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
// &::after {
|
||||
// content: "";
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
&>input {
|
||||
grid-column: 2 / span 1;
|
||||
justify-self: start;
|
||||
|
||||
&[type="checkbox"] {
|
||||
grid-column: 1 / span 1;
|
||||
justify-self: end;
|
||||
}
|
||||
// &[type="checkbox"] {
|
||||
// grid-column: 1 / span 1;
|
||||
// justify-self: end;
|
||||
// }
|
||||
}
|
||||
|
||||
&>fieldset {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user