Neo-Tokyo Neon Noir design pour fiches items

- Nouvelle palette : #080c14 fond, accents néon par type (#00d4d4 item, #ff3d5a kungfu, #4a9eff spell, #cc44ff supernatural)
- Nouveaux composants LESS : .cde-neon-header (clip-path angulaire + accent line), .cde-avatar (clip-path), .cde-stat-grid/.cde-stat-cell (style terminal), .cde-badge (parallélogramme), .cde-neon-tabs (underline néon animé), .cde-check-cell
- Fix layout : .cde-sheet width: 100% + height: 100% + overflow: hidden, .cde-tab-body flex: 1 + min-height: 0, .cde-notes-editor flex stretch
- Fix positions : DEFAULT_OPTIONS height explicite pour tous les types (item 620x580, spell 660x680, kungfu 720x680, supernatural 560x520)
- 4 templates items reécrits avec nouvelles classes et structure épurée

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-26 00:18:04 +01:00
commit 068fca00e5
739 changed files with 7923 additions and 0 deletions

132
src/system.js Normal file
View File

@@ -0,0 +1,132 @@
import { ACTOR_TYPES, ITEM_TYPES, MAGICS, SUBTYPES, SYSTEM_ID } from "./config/constants.js"
import { preLocalizeConfig } from "./config/localize.js"
import { configureRuntime } from "./config/runtime.js"
import { CharacterDataModel, LoksyuDataModel, NpcDataModel, TinjiDataModel } from "./data/actors/index.js"
import { EquipmentDataModel, KungfuDataModel, SpellDataModel, SupernaturalDataModel } from "./data/items/index.js"
import { CDEMessage } from "./documents/chat-message.js"
import { CDEActor } from "./documents/actor.js"
import { CDEItem } from "./documents/item.js"
import { registerDice } from "./ui/dice.js"
import { registerHandlebarsHelpers } from "./ui/helpers.js"
import { preloadPartials } from "./ui/templates.js"
import { CDELoksyuSheet, CDECharacterSheet, CDENpcSheet, CDETinjiSheet } from "./ui/sheets/actors/index.js"
import { CDEItemSheet, CDEKungfuSheet, CDESpellSheet, CDESupernaturalSheet } from "./ui/sheets/items/index.js"
import { migrateIfNeeded, registerSettings } from "./migration.js"
Hooks.once("i18nInit", preLocalizeConfig)
Hooks.once("init", async () => {
console.info(`CHRONIQUESDELETRANGE | Initializing ${SYSTEM_ID}`)
registerSettings()
game.system.CONST = { MAGICS, SUBTYPES }
CONFIG.Actor.systemDataModels = {
[ACTOR_TYPES.character]: CharacterDataModel,
[ACTOR_TYPES.npc]: NpcDataModel,
[ACTOR_TYPES.tinji]: TinjiDataModel,
[ACTOR_TYPES.loksyu]: LoksyuDataModel,
}
CONFIG.Item.systemDataModels = {
[ITEM_TYPES.item]: EquipmentDataModel,
[ITEM_TYPES.kungfu]: KungfuDataModel,
[ITEM_TYPES.spell]: SpellDataModel,
[ITEM_TYPES.supernatural]: SupernaturalDataModel,
}
CONFIG.Actor.documentClass = CDEActor
CONFIG.Item.documentClass = CDEItem
CONFIG.ChatMessage.documentClass = CDEMessage
configureRuntime()
DocumentSheetConfig.unregisterSheet(Actor, "core", ActorSheet)
DocumentSheetConfig.unregisterSheet(Item, "core", ItemSheet)
DocumentSheetConfig.registerSheet(Actor, SYSTEM_ID, CDECharacterSheet, {
types: [ACTOR_TYPES.character],
makeDefault: true,
label: "CDE Character Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Actor, SYSTEM_ID, CDENpcSheet, {
types: [ACTOR_TYPES.npc],
makeDefault: true,
label: "CDE NPC Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Actor, SYSTEM_ID, CDETinjiSheet, {
types: [ACTOR_TYPES.tinji],
makeDefault: true,
label: "CDE Tinji Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Actor, SYSTEM_ID, CDELoksyuSheet, {
types: [ACTOR_TYPES.loksyu],
makeDefault: true,
label: "CDE Loksyu Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Item, SYSTEM_ID, CDEItemSheet, {
types: [ITEM_TYPES.item],
makeDefault: true,
label: "CDE Item Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Item, SYSTEM_ID, CDEKungfuSheet, {
types: [ITEM_TYPES.kungfu],
makeDefault: true,
label: "CDE KungFu Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Item, SYSTEM_ID, CDESpellSheet, {
types: [ITEM_TYPES.spell],
makeDefault: true,
label: "CDE Spell Sheet (V2)",
})
DocumentSheetConfig.registerSheet(Item, SYSTEM_ID, CDESupernaturalSheet, {
types: [ITEM_TYPES.supernatural],
makeDefault: true,
label: "CDE Supernatural Sheet (V2)",
})
await preloadPartials()
registerHandlebarsHelpers()
registerDice()
Hooks.on("renderSettings", (_app, html) => injectCompendiumLink(html))
console.info(`CHRONIQUESDELETRANGE | Initialized`)
})
Hooks.once("ready", async () => {
if (!game.modules.get("lib-wrapper")?.active && game.user.isGM) {
ui.notifications.error("System fvtt-chroniques-de-l-etrange requires the 'libWrapper' module. Please install and activate it.")
}
await migrateIfNeeded()
})
function injectCompendiumLink(html) {
const header = html[0]?.querySelector?.("h4.divider")
if (!header) return
const section = document.createElement("section")
section.classList.add("settings", "flexcol")
section.innerHTML = `
<section class="links flexcol">
<img class="logo-info" src="systems/fvtt-chroniques-de-l-etrange/images/logo_jeu.png" />
<h4 class="divider">&nbsp;Lien utile&nbsp;<i class="fa-light fa-up-right-from-square"></i>&nbsp;</h4>
</section>
<section class="settings flexcol">
<button type="button" data-action="open-cde-link">
<i class="fa fa-download"></i>&nbsp;Compendium pour Les CdE&nbsp;<i class="fa-light fa-up-right-from-square"></i>
</button>
<details>
<summary><small>Guide d'installation</small></summary>
<small style="text-align: center;">
<p>Rendez-vous sur le site de l'éditeur, téléchargez les PDF contenant les liens vers les compendia, puis ajoutez leurs manifestes dans Foundry.</p>
</small>
</details>
</section>
`
section.querySelector("button[data-action='open-cde-link']")?.addEventListener("click", () => {
window.open("https://antre-monde.com/les-chroniques-de-letrengae/", "_blank")
})
header.parentNode.insertBefore(section, header)
}