mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
[Fix] Enriched Description IsOwner (#1577)
* Fixed so that secrets are properly enriched for items * .
This commit is contained in:
parent
cb998860d9
commit
37ae40be8b
4 changed files with 4 additions and 3 deletions
|
|
@ -125,6 +125,7 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
const context = await super._prepareContext(_options, 'action');
|
const context = await super._prepareContext(_options, 'action');
|
||||||
context.source = this.action.toObject(true);
|
context.source = this.action.toObject(true);
|
||||||
|
context.action = this.action;
|
||||||
|
|
||||||
context.summons = [];
|
context.summons = [];
|
||||||
for (const summon of context.source.summon ?? []) {
|
for (const summon of context.source.summon ?? []) {
|
||||||
|
|
|
||||||
|
|
@ -600,7 +600,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
{
|
{
|
||||||
relativeTo: isAction ? doc.parent : doc,
|
relativeTo: isAction ? doc.parent : doc,
|
||||||
rollData: doc.getRollData?.(),
|
rollData: doc.getRollData?.(),
|
||||||
secrets: isAction ? doc.parent.isOwner : doc.isOwner
|
secrets: isAction ? doc.parent.parent.isOwner : doc.isOwner
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {
|
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {
|
||||||
relativeTo: this,
|
relativeTo: this,
|
||||||
rollData: this.getRollData(),
|
rollData: this.getRollData(),
|
||||||
secrets: this.isOwner
|
secrets: this.parent.isOwner
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,6 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="action-category">
|
<fieldset class="action-category">
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
||||||
{{formInput fields.description value=source.description enriched=source.description name="description" toggled=true }}
|
{{formInput fields.description value=source.description enriched=action.description name="description" toggled=true }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</section>
|
</section>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue