diff --git a/lang/en.json b/lang/en.json index b7ea94a..2bed4da 100644 --- a/lang/en.json +++ b/lang/en.json @@ -72,6 +72,8 @@ "prohibits": "Interdits", "objectives": "Objectifs", "relations": "Relations", + "morale":"Moral", + "morale_level": "Niveau de moral", "notes": "Notes" }, "VERMINE": { diff --git a/module/sheets/character-sheet.mjs b/module/sheets/character-sheet.mjs index 7c8a4bd..b72a570 100644 --- a/module/sheets/character-sheet.mjs +++ b/module/sheets/character-sheet.mjs @@ -263,7 +263,7 @@ export class VermineCharacterSheet extends VermineActorSheet { } /** - * Handle clickable rolls. + * Handle totem pick * @param {Event} event The originating click event * @private */ diff --git a/module/sheets/npc-group.mjs b/module/sheets/npc-group.mjs index 921669a..480c547 100644 --- a/module/sheets/npc-group.mjs +++ b/module/sheets/npc-group.mjs @@ -1,5 +1,6 @@ import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/effects.mjs"; import { VermineActorSheet } from "./actor-sheet.mjs"; +import { TotemPicker } from "../system/applications.mjs"; /** * Extend the basic ActorSheet with some very simple modifications @@ -129,7 +130,7 @@ export class VermineGroupSheet extends VermineActorSheet { /** @override */ activateListeners(html) { super.activateListeners(html); - + console.log('evenement de groupe'); // Render the item sheet for viewing/editing prior to the editable check. html.find('.item-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); @@ -152,6 +153,9 @@ export class VermineGroupSheet extends VermineActorSheet { li.slideUp(200, () => this.render(false)); }); + // Choose Totem + html.find('.chooseTotem').click(this._onTotemButton.bind(this)); + // Active Effect management html.find(".effect-control").click(ev => onManageActiveEffect(ev, this.actor)); @@ -228,4 +232,18 @@ export class VermineGroupSheet extends VermineActorSheet { } } + /** + * Handle totem pick + * @param {Event} event The originating click event + * @private + */ + _onTotemButton(event) { + event.preventDefault(); + const el = event.currentTarget; + // const dataset = el.dataset; + + const totemPicker = new TotemPicker(el, this.actor); + totemPicker.render(true); + } + } diff --git a/module/system/handlebars-manager.mjs b/module/system/handlebars-manager.mjs index 9b908b3..ad797e1 100644 --- a/module/system/handlebars-manager.mjs +++ b/module/system/handlebars-manager.mjs @@ -22,6 +22,7 @@ "systems/vermine2047/templates/actor/parts/actor-effects.html", // Group partials + "systems/vermine2047/templates/actor/parts/group-header.hbs", "systems/vermine2047/templates/actor/parts/group-vehicles.hbs", "systems/vermine2047/templates/actor/parts/group-info.hbs", "systems/vermine2047/templates/actor/parts/group-items.hbs", diff --git a/template.json b/template.json index b21f651..db68069 100644 --- a/template.json +++ b/template.json @@ -364,9 +364,20 @@ "description": "" }, "level": { - "value": 1, - "min": 1, + "value": 0, + "min": 0, "max": 3 + }, + "reputation": { + "value": 10, + "min": 2, + "max": 10 + }, + "morale": { + "level": "high", + "value": 7, + "min": 1, + "max": 7 }, "members": [] }, @@ -391,7 +402,7 @@ } }, "Item": { - "types": ["item", "weapon", "defense", "vehicle", "ability", "specialty", "trait", "background", "trauma", "evolution", "rumor"], + "types": ["item", "weapon", "defense", "vehicle", "ability", "specialty", "trait", "background", "trauma", "evolution", "rumor", "target"], "templates": { "base": { "description": "", @@ -451,6 +462,10 @@ }, "rumor": { "templates": ["list"] + }, + "target": { + "templates": ["list"], + "level":"minor" } } } diff --git a/templates/actor/actor-group-sheet.html b/templates/actor/actor-group-sheet.html index 31ce37d..53cea8a 100644 --- a/templates/actor/actor-group-sheet.html +++ b/templates/actor/actor-group-sheet.html @@ -1,49 +1,8 @@
{{!-- Sheet Header --}} -
- -
-

- {{!-- The grid classes are defined in scss/global/_grid.scss. To use, - use both the "grid" and "grid-Ncol" class where "N" can be any number - from 1 to 12 and will create that number of columns. --}} -
- - {{!-- "flex-group-center" is also defined in the _grid.scss file - and it will add a small amount of padding, a border, and will - center all of its child elements content and text. --}} -
- -
- - / - -
-
- -
- -
- - / - -
-
- -
- -
- - / - -
-
- -
-
-
- + {{> "systems/vermine2047/templates/actor/parts/group-header.hbs"}} + {{!-- Sheet Tab Navigation --}}