Upgrade item sheets

This commit is contained in:
2024-12-03 13:51:38 +01:00
parent df8995f8b7
commit 9775ec9fa1
38 changed files with 1095 additions and 506 deletions

View File

@ -44,9 +44,11 @@ Hooks.once("init", function () {
gift: models.LethalFantasyGift,
weapon: models.LethalFantasyWeapon,
armor: models.LethalFantasyArmor,
shield: models.LethalFantasyShield,
spell: models.LethalFantasySpell,
save: models.LethalFantasySave,
vulnerability: models.LethalFantasyVulnerability
vulnerability: models.LethalFantasyVulnerability,
equipment: models.LethalFantasyEquipment
}
// Register sheet application classes
@ -62,6 +64,8 @@ Hooks.once("init", function () {
Items.registerSheet("lethalFantasy", applications.LethalFantasyWeaponSheet, { types: ["weapon"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasySpellSheet, { types: ["spell"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasyArmorSheet, { types: ["armor"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasyShieldSheet, { types: ["shield"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasyEquipmentSheet, { types: ["equipment"], makeDefault: true })
// Other Document Configuration
CONFIG.ChatMessage.documentClass = documents.LethalFantasyChatMessage
@ -69,26 +73,6 @@ Hooks.once("init", function () {
// Dice system configuration
CONFIG.Dice.rolls.push(documents.LethalFantasyRoll)
// Register system settings
game.settings.register("lethalFantasy", "displayOpponentMalus", {
name: "TENEBRIS.Setting.displayOpponentMalus",
hint: "TENEBRIS.Setting.displayOpponentMalusHint",
scope: "world",
config: true,
type: Boolean,
default: true,
})
game.settings.register("lethalFantasy", "fortune", {
name: "TENEBRIS.Setting.fortune",
hint: "TENEBRIS.Setting.fortuneHint",
scope: "world",
config: true,
type: Number,
default: 0,
requiresReload: true,
})
game.settings.register("lethalFantasy", "worldKey", {
name: "Unique world key",
scope: "world",
@ -100,9 +84,6 @@ Hooks.once("init", function () {
// Activate socket handler
game.socket.on(`system.${SYSTEM.id}`, handleSocketEvent)
// Pre-localize configuration objects
// TODO : encore d'actualité ?
// preLocalizeConfig()
initControlButtons()
@ -121,7 +102,7 @@ Hooks.once("init", function () {
applications.LethalFantasyManager.askRollForAll(type, target, title, avantage)
})
console.info("CTHULHU TENEBRIS | System Initialized")
console.info("LETHAL FANTASY | System Initialized")
})
/**
@ -146,7 +127,7 @@ Hooks.once("ready", function () {
console.info("LETHAL FANTASY | Ready")
game.system.applicationManager = new applications.LethalFantasyManager()
if (game.user.isGM) {
game.system.applicationManager.render(true)
//game.system.applicationManager.render(true)
}
if (!SYSTEM.DEV_MODE) {