mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Added Attribution to DomainCards
This commit is contained in:
parent
f10b00e2b5
commit
af5513d743
191 changed files with 1733 additions and 785 deletions
|
|
@ -85,6 +85,8 @@ export default function DHApplicationMixin(Base) {
|
|||
this._dragDrop = this._createDragDropHandlers();
|
||||
}
|
||||
|
||||
#nonHeaderAttribution = ['environment', 'ancestry', 'community', 'domainCard'];
|
||||
|
||||
/**
|
||||
* The default options for the sheet.
|
||||
* @type {DHSheetV2Configuration}
|
||||
|
|
@ -130,7 +132,7 @@ export default function DHApplicationMixin(Base) {
|
|||
async _renderFrame(options) {
|
||||
const frame = await super._renderFrame(options);
|
||||
|
||||
const headerAttribution = !['environment', 'ancestry', 'community'].includes(this.document.type);
|
||||
const headerAttribution = !this.#nonHeaderAttribution.includes(this.document.type);
|
||||
if (this.document.system.metadata.hasAttribution && headerAttribution) {
|
||||
const { source, page } = this.document.system.attribution;
|
||||
const attribution = [source, page ? `pg ${page}.` : null].filter(x => x).join('. ');
|
||||
|
|
@ -145,7 +147,7 @@ export default function DHApplicationMixin(Base) {
|
|||
* Refresh the custom parts of the application frame
|
||||
*/
|
||||
refreshFrame() {
|
||||
const headerAttribution = !['environment', 'ancestry', 'community'].includes(this.document.type);
|
||||
const headerAttribution = !this.#nonHeaderAttribution.includes(this.document.type);
|
||||
if (this.document.system.metadata.hasAttribution && headerAttribution) {
|
||||
const { source, page } = this.document.system.attribution;
|
||||
const attribution = [source, page ? `pg ${page}.` : null].filter(x => x).join('. ');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue