[PR] [Feature] 652 Allow override range measurement settings (#1030)

* Look for rangeMeasurementSettingsOverride on the scene to switch off DH global range measurement settings.

* Part progress on adding config tab to scene config

* Hard coded template; no value applied/saved

* Flag fix

* Use the flags setting

* Clean up

* Remove import

* Better initialisation of PARTS and TABS

* Fix localisation

---------

Co-authored-by: Chris Ryan <chrisr@blackhole>
Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Chris Ryan 2025-08-22 01:05:09 +10:00 committed by GitHub
parent 7a6bbe3488
commit 60b55619e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 82 additions and 15 deletions

View file

@ -2,6 +2,7 @@ export * as characterCreation from './characterCreation/_module.mjs';
export * as dialogs from './dialogs/_module.mjs';
export * as hud from './hud/_module.mjs';
export * as levelup from './levelup/_module.mjs';
export * as scene from './scene/_module.mjs';
export * as settings from './settings/_module.mjs';
export * as sheets from './sheets/_module.mjs';
export * as sheetConfigs from './sheets-configs/_module.mjs';

View file

@ -0,0 +1 @@
export { default as DhSceneConfigSettings } from './sceneConfigSettings.mjs';

View file

@ -0,0 +1,25 @@
export default class DhSceneConfigSettings extends foundry.applications.sheets.SceneConfig {
constructor(options, ...args) {
super(options, ...args);
}
static buildParts() {
const { footer, ...parts } = super.PARTS;
const tmpParts = {
...parts,
dh: { template: "systems/daggerheart/templates/scene/dh-config.hbs" },
footer
}
return tmpParts;
}
static PARTS = DhSceneConfigSettings.buildParts();
static buildTabs() {
super.TABS.sheet.tabs.push({ id: "dh", icon: "fa-solid" });
return super.TABS;
}
static TABS = DhSceneConfigSettings.buildTabs();
}