Allow items links in editors
This commit is contained in:
parent
d94c1a4dce
commit
4b9af6a383
@ -22,7 +22,7 @@ export class SoSActorSheet extends ActorSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getData() {
|
async getData() {
|
||||||
const objectData = this.object
|
const objectData = this.object
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
@ -34,6 +34,9 @@ export class SoSActorSheet extends ActorSheet {
|
|||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
data: foundry.utils.deepClone(this.object.system),
|
data: foundry.utils.deepClone(this.object.system),
|
||||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||||
|
history: await TextEditor.enrichHTML(this.object.system.history, {async: true}),
|
||||||
|
notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}),
|
||||||
|
gmnotes: await TextEditor.enrichHTML(this.object.system.gmnotes, {async: true}),
|
||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner
|
owner: this.document.isOwner
|
||||||
|
@ -56,7 +56,8 @@ export class SoSItemSheet extends ItemSheet {
|
|||||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.system)),
|
effects: this.object.effects.map(e => foundry.utils.deepClone(e.system)),
|
||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner
|
owner: this.document.isOwner,
|
||||||
|
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||||
};
|
};
|
||||||
|
|
||||||
formData.isGM = game.user.isGM;
|
formData.isGM = game.user.isGM;
|
||||||
@ -66,6 +67,12 @@ export class SoSItemSheet extends ItemSheet {
|
|||||||
if ( objectData.type == 'skill' && this.object.options?.actor) {
|
if ( objectData.type == 'skill' && this.object.options?.actor) {
|
||||||
formData.skillExperienceList = this.object.options.actor.getSkillExperience( objectData.name )
|
formData.skillExperienceList = this.object.options.actor.getSkillExperience( objectData.name )
|
||||||
}
|
}
|
||||||
|
if ( objectData.type == 'geneline') {
|
||||||
|
formData.weakness = await TextEditor.enrichHTML(this.object.system.weakness, {async: true})
|
||||||
|
}
|
||||||
|
if ( objectData.type == 'malady') {
|
||||||
|
formData.notes = await TextEditor.enrichHTML(this.object.system.notes, {async: true})
|
||||||
|
}
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "Shadows over Sol for FoundryVTT",
|
"description": "Shadows over Sol for FoundryVTT",
|
||||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/",
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"version": "10.0.6",
|
"version": "10.0.7",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10.285",
|
"verified": "10.285",
|
||||||
@ -109,7 +109,7 @@
|
|||||||
],
|
],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/raw/branch/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/raw/branch/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/archive/foundryvtt-shadows-over-sol-10.0.6.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-shadows-over-sol/archive/foundryvtt-shadows-over-sol-10.0.7.zip",
|
||||||
"gridDistance": 5,
|
"gridDistance": 5,
|
||||||
"gridUnits": "ft"
|
"gridUnits": "ft"
|
||||||
}
|
}
|
@ -390,12 +390,12 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<h3>Biography : </h3>
|
<h3>Biography : </h3>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.history target="system.history" button=true owner=owner editable=editable}}
|
{{editor history target="system.history" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<h3>Notes : </h3>
|
<h3>Notes : </h3>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.notes target="system.notes" button=true owner=owner editable=editable}}
|
{{editor notes target="system.notes" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
{{>"systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html"}}
|
{{>"systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html"}}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#if data.isGM}}
|
{{#if data.isGM}}
|
||||||
<h3>GM Notes : </h3>
|
<h3>GM Notes : </h3>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.gmnotes target="system.gmnotes" button=true owner=owner editable=editable}}
|
{{editor gmnotes target="system.gmnotes" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,6 +46,6 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Weakness</label>
|
<label class="generic-label">Weakness</label>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor data.weakness target="system.weakness" button=true owner=owner editable=editable}}
|
{{editor weakness target="system.weakness" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Notes</label>
|
<label class="generic-label">Notes</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.notes target="system.notes" button=true owner=owner editable=editable}}
|
{{editor notes target="system.notes" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label class="generic-label">Description</label>
|
<label class="generic-label">Description</label>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user