[Feature] RollTable Improvements (#1552)

* Initial - Branch Test

* reorganized path for better usage

* something to mess with

* registration things

* .

* root-template error

* pushing in for the day

* hook?

* help?

* .

* implementation initial

* updated comment

* overcomplicated it

* .

* Added Formula select to view mode

* .

* Prettied up roll-results template

* Removed SRD table descriptions

* Improved draw result description css

* Fallback for default dark dice

* .

---------

Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com>
This commit is contained in:
WBHarry 2026-01-24 20:26:37 +01:00 committed by GitHub
parent fdb6412c8c
commit a78ef1f70c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 660 additions and 10 deletions

View file

@ -58,6 +58,9 @@ CONFIG.Canvas.layers.tokens.layerClass = DhTokenLayer;
CONFIG.MeasuredTemplate.objectClass = placeables.DhMeasuredTemplate;
CONFIG.RollTable.documentClass = documents.DhRollTable;
CONFIG.RollTable.resultTemplate = 'systems/daggerheart/templates/ui/chat/table-result.hbs';
CONFIG.Scene.documentClass = documents.DhScene;
CONFIG.Token.documentClass = documents.DhToken;
@ -105,7 +108,7 @@ Hooks.once('init', () => {
type: game.i18n.localize(typePath)
});
const { Items, Actors } = foundry.documents.collections;
const { Items, Actors, RollTables } = foundry.documents.collections;
Items.unregisterSheet('core', foundry.applications.sheets.ItemSheetV2);
Items.registerSheet(SYSTEM.id, applications.sheets.items.Ancestry, {
types: ['ancestry'],
@ -190,6 +193,12 @@ Hooks.once('init', () => {
label: sheetLabel('TYPES.Actor.party')
});
RollTables.unregisterSheet('core', foundry.applications.sheets.RollTableSheet);
RollTables.registerSheet(SYSTEM.id, applications.sheets.rollTables.RollTableSheet, {
types: ['base'],
makeDefault: true
});
DocumentSheetConfig.unregisterSheet(
CONFIG.ActiveEffect.documentClass,
'core',