Part progress on adding config tab to scene config

This commit is contained in:
Chris Ryan 2025-08-19 20:58:48 +10:00
parent fcf35ac17e
commit 55edd6b3ac
7 changed files with 49 additions and 1 deletions

View file

@ -0,0 +1,19 @@
export default class DhSceneConfig extends foundry.applications.sheets.SceneConfig {
/** @inheritDoc */
async _preparePartContext(partId, context, options) {
console.log("_preparePartContext", partId, context, options);
context = await super._preparePartContext(partId, context, options);
switch ( partId ) {
case "dh":
context.fields.rangeMeasurementSettingsOverride = "Override Global Range Measurement Settings";
break;
default:
context = await super._preparePartContext(partId, context, options);
}
if ( partId in context.tabs ) context.tab = context.tabs[partId];
return context;
}
}