diff --git a/modules/vadentis-actor-sheet.js b/modules/vadentis-actor-sheet.js index 8ca9c42..8e0c41d 100644 --- a/modules/vadentis-actor-sheet.js +++ b/modules/vadentis-actor-sheet.js @@ -11,7 +11,7 @@ export class VadentisActorSheet extends ActorSheet { /** @override */ static get defaultOptions() { return mergeObject(super.defaultOptions, { - classes: ["sos", "sheet", "actor"], + classes: ["vadentis", "sheet", "actor"], template: "systems/foundryvtt-vadentis/templates/actor-sheet.html", width: 640, height: 720, @@ -25,8 +25,9 @@ export class VadentisActorSheet extends ActorSheet { getData() { let data = super.getData(); - this.actor.checkDeck(); - + data.stats = this.actor.stats; + data.combat = this.actor.combat; + data.magie = this.actor.magie; return data; } @@ -128,14 +129,6 @@ export class VadentisActorSheet extends ActorSheet { } - /* -------------------------------------------- */ - async _onDrop(event) { - let toSuper = await SoSUtility.processItemDropEvent(this, event); - if ( toSuper) { - super._onDrop(event); - } - } - /* -------------------------------------------- */ /** @override */ setPosition(options = {}) { diff --git a/modules/vadentis-actor.js b/modules/vadentis-actor.js index 0d92442..9386439 100644 --- a/modules/vadentis-actor.js +++ b/modules/vadentis-actor.js @@ -32,12 +32,12 @@ export class VadentisActor extends Actor { return actor; } - data.items = []; + /*data.items = []; let compendiumName = "foundryvtt-vadentis.competences"; if ( compendiumName ) { let skills = await SoSUtility.loadCompendium(compendiumName); data.items = data.items.concat( skills ); - } + }*/ return super.create(data, options); } diff --git a/modules/vadentis-main.js b/modules/vadentis-main.js index e606e67..c1eff2b 100644 --- a/modules/vadentis-main.js +++ b/modules/vadentis-main.js @@ -8,9 +8,9 @@ /* -------------------------------------------- */ // Import Modules -import { VadentisActor } from "./actor.js"; -import { VadentisItemSheet } from "./item-sheet.js"; -import { VadentisActorSheet } from "./actor-sheet.js"; +import { VadentisActor } from "./vadentis-actor.js"; +import { VadentisItemSheet } from "./vadentis-item-sheet.js"; +import { VadentisActorSheet } from "./vadentis-actor-sheet.js"; import { VadentisUtility } from "./vadentis-utility.js"; import { VadentisCombat } from "./vadentis-combat.js"; @@ -48,7 +48,7 @@ Hooks.once("init", async function () { /* -------------------------------------------- */ // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); - Actors.registerSheet("foundryvtt-vadentis", VadentisActorSheet, { types: ["character"], makeDefault: true }); + Actors.registerSheet("foundryvtt-vadentis", VadentisActorSheet, { types: ["personnage"], makeDefault: true }); Items.unregisterSheet("core", ItemSheet); Items.registerSheet("foundryvtt-vadentis", VadentisItemSheet, { makeDefault: true }); diff --git a/modules/vadentis-utility.js b/modules/vadentis-utility.js index b002086..16b9def 100644 --- a/modules/vadentis-utility.js +++ b/modules/vadentis-utility.js @@ -9,11 +9,18 @@ export class VadentisUtility extends Entity { const templatePaths = [ 'systems/foundryvtt-vadentis/templates/actor-sheet.html', - 'systems/foundryvtt-vadentis/templates/item-sheet.html' + 'systems/foundryvtt-vadentis/templates/item-sheet.html', + 'systems/foundryvtt-vadentis/templates/score-option-list.html', + 'systems/foundryvtt-vadentis/templates/editor-notes-gm.html' ] return loadTemplates(templatePaths); } + /* -------------------------------------------- */ + static registerChatCallbacks( ) { + + } + /* -------------------------------------------- */ static fillRange (start, end) { return Array(end - start + 1).fill().map((item, index) => start + index); diff --git a/system.json b/system.json index 972e166..5ea86ac 100644 --- a/system.json +++ b/system.json @@ -2,13 +2,13 @@ "name": "foundryvtt-vadentis", "title": "Vadentis", "description": "Système Vadentis pour FoundryVTT", - "version": "0.0.1", + "version": "0.0.6", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.9", - "templateVersion": 1, + "templateVersion": 5, "author": "Uberwald", - "esmodules": [ "module/vadentis-main.js" ], + "esmodules": [ "modules/vadentis-main.js" ], "styles": ["styles/simple.css"], "background" : "", "media": [ diff --git a/template.json b/template.json index 3564fa8..73220b7 100644 --- a/template.json +++ b/template.json @@ -1,13 +1,9 @@ { "Actor": { - "types": ["character"], + "types": ["personnage"], "templates": { "common": { "stats": { - "donnee": { - "label": "Données", - "list": [] - }, "experience": { "total": 0, "disponibe": 0, @@ -27,17 +23,15 @@ "value": 0, "max": 0, "label": "Points d'Adrénaline" - }, + } + }, + "combat": { "force": { "base": 0, "malus": 0, "bonus": 0, "label": "Force" }, - "esquive": { - "value": 0, - "label": "Esquive" - }, "attaque": { "base": 0, "malus": 0, @@ -50,6 +44,14 @@ "bonus": 0, "label": "Défense" }, + "esquive": { + "base": 0, + "malus": 0, + "bonus": 0, + "label": "Esquive" + } + }, + "magie": { "matriseelementaire": { "base": 0, "malus": 0, @@ -76,12 +78,36 @@ "age": 0 } }, - "character": { + "personnage": { "templates": [ "background", "common" ] } }, "Item": { - "types": ["competence", "attribut", "technique", "sort", "arme", "tir", "armurebouclier", "equipement" ], + "types": ["competence", "attribut", "technique", "sort", "devotion", "armecc", "tir", "armurebouclier", "equipement", "donnee", "eglise" ], + "templates": { + "sortcommun": { + "xp": 0, + "pe": 0, + "target": "", + "difficulty": 0, + "description": "", + "effect": "", + "critical": "", + "notes": "", + "damage": "" + }, + "equipcommun": { + "description": "", + "enc": 0, + "cost": 0 + } + }, + "donnee": { + "description": "" + }, + "eglise": { + "description": "" + }, "attribut": { "effect": "", "xp": 0, @@ -95,32 +121,25 @@ "notes": "" }, "sort": { - "type": "", - "datachurch": "", - "xp": "", - "pe": "", - "target": "", - "difficulty": "", - "description": "", - "effect": "", - "critical": "", - "notes": "", - "damage": "" + "donnee": "", + "templates": [ "sortcommun" ] + }, + "devotion": { + "eglise": "", + "templates": [ "sortcommun" ] }, "competence": { - "xp": "", - "base": "", - "bonus": "", - "malus": "", + "xp": 0, + "base": 0, + "bonus": 0, + "malus": 0, "description": "" }, - "arme": { + "armecc": { "type": "", "damage": "", "criticaldamage": "", - "description": "", - "enc": 0, - "cost": 0 + "templates": [ "equipcommun" ] }, "tir": { "type": "", @@ -128,21 +147,16 @@ "criticaldamage": "", "munition": "", "distance": "", - "description": "", - "enc": 0, - "cost": 0 + "templates": [ "equipcommun" ] }, "armurebouclier": { "type": "", "bonus": "", "malus": "", - "enc": 0, - "cost": 0 + "templates": [ "equipcommun" ] }, "equipement": { - "description": "", - "enc": 0, - "cost": 0 + "templates": [ "equipcommun" ] } } }