This commit is contained in:
@ -22,7 +22,7 @@ export default class CthulhuEternalArcaneSheet extends CthulhuEternalItemSheet {
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalArchetypeSheet extends CthulhuEternalItemShee
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ export default class CthulhuEternalActorSheet extends HandlebarsApplicationMixin
|
||||
actor: this.document,
|
||||
system: this.document.system,
|
||||
source: this.document.toObject(),
|
||||
enrichedDescription: await TextEditor.enrichHTML(this.document.system.description, { async: true }),
|
||||
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }),
|
||||
isEditMode: this.isEditMode,
|
||||
isPlayMode: this.isPlayMode,
|
||||
isEditable: this.isEditable,
|
||||
@ -99,7 +99,7 @@ export default class CthulhuEternalActorSheet extends HandlebarsApplicationMixin
|
||||
dragover: this._onDragOver.bind(this),
|
||||
drop: this._onDrop.bind(this),
|
||||
}
|
||||
return new DragDrop(d)
|
||||
return new foundry.applications.ux.DragDrop.implementation(d)
|
||||
})
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ export default class CthulhuEternalActorSheet extends HandlebarsApplicationMixin
|
||||
_onDragOver(event) {}
|
||||
|
||||
async _onDropItem(item) {
|
||||
console.log("Dropped item", item)
|
||||
console.log("Dropped item", item)
|
||||
let itemData = item.toObject()
|
||||
await this.document.createEmbeddedDocuments("Item", [itemData], { renderSheet: false })
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ export default class CthulhuEternalItemSheet extends HandlebarsApplicationMixin(
|
||||
item: this.document,
|
||||
system: this.document.system,
|
||||
source: this.document.toObject(),
|
||||
enrichedDescription: await TextEditor.enrichHTML(this.document.system.description, { async: true }),
|
||||
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }),
|
||||
isEditMode: this.isEditMode,
|
||||
isPlayMode: this.isPlayMode,
|
||||
isEditable: this.isEditable,
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalGiftSheet extends CthulhuEternalItemSheet {
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ export default class CthulhuEternalCreatureSheet extends CthulhuEternalActorShee
|
||||
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true })
|
||||
|
||||
|
||||
context.tooltipsCharacteristic = {
|
||||
str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"),
|
||||
dex: game.i18n.localize("CTHULHUETERNAL.Characteristic.Dex"),
|
||||
@ -93,8 +93,8 @@ export default class CthulhuEternalCreatureSheet extends CthulhuEternalActorShee
|
||||
break
|
||||
case "biography":
|
||||
context.tab = context.tabs.biography
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(doc.system.description, { async: true })
|
||||
context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(doc.system.notes, { async: true })
|
||||
break
|
||||
}
|
||||
return context
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalInjurySheet extends CthulhuEternalItemSheet {
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalMentalDisorderSheet extends CthulhuEternalIte
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalMotivationSheet extends CthulhuEternalItemShe
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
|
||||
|
@ -76,9 +76,9 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
|
||||
const context = await super._prepareContext()
|
||||
context.tabs = this.#getTabs()
|
||||
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true })
|
||||
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true })
|
||||
|
||||
context.tooltipsCharacteristic = {
|
||||
str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"),
|
||||
dex: game.i18n.localize("CTHULHUETERNAL.Characteristic.Dex"),
|
||||
@ -128,8 +128,8 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
|
||||
break
|
||||
case "biography":
|
||||
context.tab = context.tabs.biography
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(doc.system.description, { async: true })
|
||||
context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(doc.system.notes, { async: true })
|
||||
break
|
||||
}
|
||||
return context
|
||||
@ -143,7 +143,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
|
||||
static #onSetBP(event, target) {
|
||||
this.document.system.setBP()
|
||||
}
|
||||
|
||||
|
||||
static #onCreateGear(event, target) {
|
||||
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newGear"), type: "gear" }])
|
||||
}
|
||||
@ -205,7 +205,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
|
||||
// Debug : console.log(">>>>", event, target, rollType)
|
||||
// Deprecated : if (this.isEditMode) return
|
||||
switch (rollType) {
|
||||
case "resource":
|
||||
case "resource":
|
||||
item = foundry.utils.duplicate(this.actor.system.resources)
|
||||
item.name = game.i18n.localize(`CTHULHUETERNAL.Label.Resources`)
|
||||
item.targetScore = item.permanentRating
|
||||
@ -226,7 +226,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
|
||||
item = this.actor.items.get(li.data("item-id"));
|
||||
item.damageBonus = this.actor.system.damageBonus
|
||||
break
|
||||
case "san":
|
||||
case "san":
|
||||
item = foundry.utils.duplicate(this.actor.system.san)
|
||||
item.name = game.i18n.localize("CTHULHUETERNAL.Label.SAN")
|
||||
item.targetScore = item.value
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalRitualSheet extends CthulhuEternalItemSheet {
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalSkillSheet extends CthulhuEternalItemSheet {
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export default class CthulhuEternalTomeSheet extends CthulhuEternalItemSheet {
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ export default class CthulhuEternalVehicleSheet extends CthulhuEternalActorSheet
|
||||
tabGroups = {
|
||||
sheet: "equipment",
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepare an array of form header tabs.
|
||||
* @returns {Record<string, Partial<ApplicationTab>>}
|
||||
@ -59,9 +59,9 @@ export default class CthulhuEternalVehicleSheet extends CthulhuEternalActorSheet
|
||||
const context = await super._prepareContext()
|
||||
context.tabs = this.#getTabs()
|
||||
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true })
|
||||
|
||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true })
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ export default class CthulhuEternalVehicleSheet extends CthulhuEternalActorSheet
|
||||
context.tab = context.tabs.equipment
|
||||
context.weapons = doc.itemTypes.weapon
|
||||
context.gears = doc.itemTypes.gear
|
||||
break
|
||||
break
|
||||
case "description":
|
||||
context.tab = context.tabs.description
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true })
|
||||
|
Reference in New Issue
Block a user