mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Combat and CombatTracker (#108)
* Added Combat and CombatTracker * Some cleneaup * Fixing and cleaning up * Added categories for combatants * Style improvements * Layout change
This commit is contained in:
parent
32730b3aac
commit
aa8fe6a7a1
23 changed files with 730 additions and 684 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import DhAppearance from '../data/settings/Appearance.mjs';
|
||||
import DHAppearanceSettings from './settings/appearanceSettings.mjs';
|
||||
import DhVariantRules from '../data/settings/VariantRules.mjs';
|
||||
import DHVariantRuleSettings from './settings/variantRuleSettings.mjs';
|
||||
|
||||
class DhpAutomationSettings extends FormApplication {
|
||||
constructor(object = {}, options = {}) {
|
||||
|
|
@ -181,7 +183,8 @@ export const registerDHSettings = () => {
|
|||
type: Number,
|
||||
default: 0,
|
||||
onChange: () => {
|
||||
if(ui.resources) ui.resources.render({force: true});
|
||||
if (ui.resources) ui.resources.render({ force: true });
|
||||
ui.combat.render({ force: true });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -193,7 +196,7 @@ export const registerDHSettings = () => {
|
|||
type: Number,
|
||||
default: 12,
|
||||
onChange: () => {
|
||||
if(ui.resources) ui.resources.render({force: true});
|
||||
if (ui.resources) ui.resources.render({ force: true });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -204,15 +207,15 @@ export const registerDHSettings = () => {
|
|||
config: true,
|
||||
type: String,
|
||||
choices: {
|
||||
'token': 'Tokens',
|
||||
'bar': 'Bar',
|
||||
'hide': 'Hide'
|
||||
token: 'Tokens',
|
||||
bar: 'Bar',
|
||||
hide: 'Hide'
|
||||
},
|
||||
default: 'token',
|
||||
onChange: value => {
|
||||
if(ui.resources) {
|
||||
if(value === 'hide') ui.resources.close({allowed: true});
|
||||
else ui.resources.render({force: true});
|
||||
if (ui.resources) {
|
||||
if (value === 'hide') ui.resources.close({ allowed: true });
|
||||
else ui.resources.render({ force: true });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -251,6 +254,13 @@ export const registerDHSettings = () => {
|
|||
}
|
||||
});
|
||||
|
||||
game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.variantRules, {
|
||||
scope: 'world',
|
||||
config: false,
|
||||
type: DhVariantRules,
|
||||
default: DhVariantRules.defaultSchema
|
||||
});
|
||||
|
||||
game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance, {
|
||||
scope: 'client',
|
||||
config: false,
|
||||
|
|
@ -291,4 +301,13 @@ export const registerDHSettings = () => {
|
|||
type: DHAppearanceSettings,
|
||||
restricted: false
|
||||
});
|
||||
|
||||
game.settings.registerMenu(SYSTEM.id, SYSTEM.SETTINGS.menu.VariantRules.Name, {
|
||||
name: game.i18n.localize('DAGGERHEART.Settings.Menu.VariantRules.title'),
|
||||
label: game.i18n.localize('DAGGERHEART.Settings.Menu.VariantRules.label'),
|
||||
hint: game.i18n.localize('DAGGERHEART.Settings.Menu.VariantRules.hint'),
|
||||
icon: SYSTEM.SETTINGS.menu.VariantRules.Icon,
|
||||
type: DHVariantRuleSettings,
|
||||
restricted: false
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue