Nouveaux items Arme et Armure (DataModel + feuille + CSS)
Items: - CelestopolWeapon : degats (0/1/2/X), portee (contact/courte/longue), description - CelestopolArmure : protection (1-2), malus (0-2), description Config: - WEAPON_DAMAGE_TYPES et WEAPON_RANGE_TYPES ajoutés dans system.mjs - Enregistrement des DataModels, sheets et templates dans fvtt-celestopol.mjs - system.json : types weapon et armure avec htmlFields UI: - weapon.hbs : badge de dégâts avec hint, sélecteurs portée/dégâts - armure.hbs : blocs protection + malus art-déco - items.less : styles .weapon et .armure i18n: clés Weapon.*, Armure.*, Sheet.weapon, Sheet.armure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export { default as CelestopolCharacterSheet } from "./sheets/character-sheet.mjs"
|
||||
export { default as CelestopolNPCSheet } from "./sheets/npc-sheet.mjs"
|
||||
export { CelestopolAnomalySheet, CelestopolAspectSheet, CelestopolEquipmentSheet } from "./sheets/item-sheets.mjs"
|
||||
export { CelestopolAnomalySheet, CelestopolAspectSheet, CelestopolEquipmentSheet, CelestopolWeaponSheet, CelestopolArmureSheet } from "./sheets/item-sheets.mjs"
|
||||
|
||||
@@ -69,3 +69,37 @@ export class CelestopolEquipmentSheet extends CelestopolItemSheet {
|
||||
return ctx
|
||||
}
|
||||
}
|
||||
|
||||
export class CelestopolWeaponSheet extends CelestopolItemSheet {
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["weapon"],
|
||||
position: { width: 480, height: 460 },
|
||||
}
|
||||
static PARTS = {
|
||||
main: { template: "systems/fvtt-celestopol/templates/weapon.hbs" },
|
||||
}
|
||||
async _prepareContext() {
|
||||
const ctx = await super._prepareContext()
|
||||
ctx.damageTypes = SYSTEM.WEAPON_DAMAGE_TYPES
|
||||
ctx.rangeTypes = SYSTEM.WEAPON_RANGE_TYPES
|
||||
ctx.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||
this.document.system.description, { async: true })
|
||||
return ctx
|
||||
}
|
||||
}
|
||||
|
||||
export class CelestopolArmureSheet extends CelestopolItemSheet {
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["armure"],
|
||||
position: { width: 440, height: 380 },
|
||||
}
|
||||
static PARTS = {
|
||||
main: { template: "systems/fvtt-celestopol/templates/armure.hbs" },
|
||||
}
|
||||
async _prepareContext() {
|
||||
const ctx = await super._prepareContext()
|
||||
ctx.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||
this.document.system.description, { async: true })
|
||||
return ctx
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user