Initial commit
This commit is contained in:
commit
03761d2e2f
17 changed files with 5662 additions and 0 deletions
53
scripts/defaults.js
Normal file
53
scripts/defaults.js
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import { GROUP } from './constants.js'
|
||||
|
||||
/**
|
||||
* Default layout and groups
|
||||
*/
|
||||
export let DEFAULTS = null
|
||||
|
||||
Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
||||
const groups = GROUP
|
||||
Object.values(groups).forEach(group => {
|
||||
group.name = coreModule.api.Utils.i18n(group.name)
|
||||
group.listName = `Group: ${coreModule.api.Utils.i18n(group.listName ?? group.name)}`
|
||||
})
|
||||
const groupsArray = Object.values(groups)
|
||||
debugger;
|
||||
DEFAULTS = {
|
||||
layout: [
|
||||
{
|
||||
nestId: 'inventory',
|
||||
id: 'inventory',
|
||||
name: coreModule.api.Utils.i18n('Template.Inventory'),
|
||||
groups: [
|
||||
{ ...groups.weapons, nestId: 'inventory_weapons' },
|
||||
{ ...groups.armor, nestId: 'inventory_armor' },
|
||||
{ ...groups.equipment, nestId: 'inventory_equipment' },
|
||||
{ ...groups.consumables, nestId: 'inventory_consumables' },
|
||||
{ ...groups.containers, nestId: 'inventory_containers' },
|
||||
{ ...groups.treasure, nestId: 'inventory_treasure' }
|
||||
]
|
||||
},
|
||||
{
|
||||
nestId: 'utility',
|
||||
id: 'utility',
|
||||
name: coreModule.api.Utils.i18n('tokenActionHud.utility'),
|
||||
groups: [
|
||||
{ ...groups.combat, nestId: 'utility_combat' },
|
||||
{ ...groups.token, nestId: 'utility_token' },
|
||||
{ ...groups.rests, nestId: 'utility_rests' },
|
||||
{ ...groups.utility, nestId: 'utility_utility' }
|
||||
]
|
||||
},
|
||||
{
|
||||
nestId: 'attributes',
|
||||
id: 'attributes',
|
||||
name: coreModule.api.Utils.i18n('GURPS.attributes'),
|
||||
groups: [
|
||||
{ ...groups.attributes, nestId: 'attributes_attributes' }
|
||||
]
|
||||
}
|
||||
],
|
||||
groups: groupsArray
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue