DataModels + Appv2 migration : OK
This commit is contained in:
@@ -31,7 +31,7 @@ export default class BoLHordeSheet extends BoLBaseActorSheet {
|
||||
context.options = this.options
|
||||
context.editScore = this.options.editScore
|
||||
context.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||
actor.system.description || "", { async: true }
|
||||
actor.system.details?.biography || "", { async: true }
|
||||
)
|
||||
|
||||
console.log("HORDE (AppV2)", context)
|
||||
|
||||
@@ -35,7 +35,7 @@ export default class BoLVehicleSheet extends BoLBaseActorSheet {
|
||||
actor.system.description || "", { async: true }
|
||||
)
|
||||
|
||||
console.log("VEHICLE (AppV2)", context)
|
||||
console.log("VEHICLE (AppV2)", context) // TODO: remove before release
|
||||
return context
|
||||
}
|
||||
|
||||
@@ -56,10 +56,14 @@ export default class BoLVehicleSheet extends BoLBaseActorSheet {
|
||||
})
|
||||
})
|
||||
|
||||
// Create generic item
|
||||
this.element.querySelectorAll(".create_item").forEach((el) => {
|
||||
// Create vehicle weapon
|
||||
this.element.querySelectorAll(".vehicle-weapon-add").forEach((el) => {
|
||||
el.addEventListener("click", () => {
|
||||
this.actor.createEmbeddedDocuments("Item", [{ name: "Nouvel Equipement", type: "item" }], { renderSheet: true })
|
||||
this.actor.createEmbeddedDocuments("Item", [{
|
||||
name: game.i18n.localize("BOL.ui.newEquipment"),
|
||||
type: "item",
|
||||
system: { category: "vehicleweapon" },
|
||||
}], { renderSheet: true })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user