From 647727f1ae42c6574cdd7143b07b476b49499478 Mon Sep 17 00:00:00 2001 From: U~man Date: Sun, 28 Jun 2020 20:30:30 +0200 Subject: [PATCH] FIX: lang and fixes --- src/lang/fr.json | 63 +++++++++++++++++++++++++++++ src/module/actor/character-sheet.js | 6 --- src/module/actor/entity.js | 61 ---------------------------- src/module/actor/monster-sheet.js | 1 - src/scss/actor-base.scss | 2 +- src/system.json | 2 +- 6 files changed, 65 insertions(+), 70 deletions(-) diff --git a/src/lang/fr.json b/src/lang/fr.json index 7a73a41..1ff3656 100644 --- a/src/lang/fr.json +++ b/src/lang/fr.json @@ -1,2 +1,65 @@ { + "OSE.Edit": "Modifier", + "OSE.Delete": "Supprimer", + "OSE.Add": "Ajouter", + + "OSE.Name": "Nom", + "OSE.Class": "Classe", + "OSE.Title": "Titre", + "OSE.Alignment": "Alignement", + "OSE.Level": "Niveau", + "OSE.Experience": "Expérience", + "OSE.Treasure": "Butin", + "OSE.Size": "Taille", + "OSE.Morale": "Moral", + "OSE.Appearing": "NA", + + "OSE.scores.str.long": "Force", + "OSE.scores.str.short": "FOR", + "OSE.scores.wis.long": "Sagesse", + "OSE.scores.wis.short": "SAG", + "OSE.scores.int.long": "Intelligence", + "OSE.scores.int.short": "INT", + "OSE.scores.dex.long": "Dextérité", + "OSE.scores.dex.short": "DEX", + "OSE.scores.con.long": "Constitution", + "OSE.scores.con.short": "CON", + "OSE.scores.cha.long": "Charisme", + "OSE.scores.cha.short": "CHA", + + "OSE.saves.death.short": "D", + "OSE.saves.death.long": "Mort", + "OSE.saves.wands.short": "W", + "OSE.saves.wands.long": "Baguettes", + "OSE.saves.paralysis.short": "P", + "OSE.saves.paralysis.long": "Paralysie", + "OSE.saves.breath.short": "B", + "OSE.saves.breath.long": "Souffle", + "OSE.saves.spells.short": "S", + "OSE.saves.spells.long": "Sorts", + + "OSE.Health": "Points de Vie", + "OSE.HealthShort": "PV", + "OSE.HitDice": "Dés de Vie", + "OSE.HitDiceShort": "DV", + "OSE.Movement": "Mouvement", + "OSE.MovementShort": "MOUV", + "OSE.SpecialMovement": "Mouvement Spécial", + "OSE.ArmorClass": "Classe d'Armure", + "OSE.ArmorClassShort": "CA", + "OSE.SpellDC": "DF", + "OSE.Thac0": "THAC0", + "OSE.Initiative": "Initiative", + "OSE.InitiativeShort": "INIT", + "OSE.Attacks": "Attaques par Round", + "OSE.AttacksShort": "ATT", + + + "OSE.category.attributes": "Attributs", + "OSE.category.inventory": "Inventaire", + "OSE.category.spells": "Sorts", + "OSE.category.notes": "Notes", + + "OSE.panel.abilities": "Aptitudes", + "OSE.panel.equipment": "Equipement" } \ No newline at end of file diff --git a/src/module/actor/character-sheet.js b/src/module/actor/character-sheet.js index dbbb461..f99fa3b 100644 --- a/src/module/actor/character-sheet.js +++ b/src/module/actor/character-sheet.js @@ -108,12 +108,6 @@ export class OseActorSheetCharacter extends ActorSheet { li.toggleClass("expanded"); } - _onRollAttribute(event) { - event.preventDefault(); - let attribute = event.currentTarget.dataset.attribute; - this.actor.rollAttribute(attribute, { event: event }); - } - /** * Activate event listeners using the prepared sheet HTML * @param html {HTML} The prepared HTML object ready to be rendered into the DOM diff --git a/src/module/actor/entity.js b/src/module/actor/entity.js index 2489c99..42d55c8 100644 --- a/src/module/actor/entity.js +++ b/src/module/actor/entity.js @@ -17,65 +17,4 @@ export class OseActor extends Actor { /* -------------------------------------------- */ /* Rolls */ /* -------------------------------------------- */ - - rollAttribute(attributeId, options = {}) { - const label = CONFIG.MAJI.attributes[attributeId]; - - const abl = this.data.data.attributes[attributeId]; - let parts = []; - if (abl.value <= 4) { - parts.push("2d4"); - } else if (abl.value <= 7) { - parts.push("2d6"); - } else { - parts.push("2d8"); - } - let rollMode = game.settings.get("core", "rollMode"); - let roll = new Roll(parts.join(" + "), {}).roll(); - roll.toMessage( - { - speaker: ChatMessage.getSpeaker({ actor: this }), - flavor: `${label} Attribute Test`, - }, - { rollMode } - ); - return roll; - } - - rollInit(monsterId, options = {}) { - let monster = game.actors.get(monsterId); - let speed = monster.data.data.attributes.speed.value + monster.data.data.attributes.speed.mod; - if (!game.combats.active) return; - let combatant = game.combats.active.getCombatant(this.actor); - console.log(combatant); - } - - static async applyDamage(roll, options = {}) { - let value = Math.floor(parseFloat(roll.find(".dice-total").text())); - const promises = []; - for (let t of canvas.tokens.controlled) { - let a = t.actor, - hp = a.data.data.hp; - let delta = 0; - if (a.data.type == "monster") { - if (options.vulnerable) { - delta -= value + a.data.data.affinity.value; - } else if (options.resistant) { - delta -= Math.max(0, value - a.data.data.resistance.value); - } else if (options.healing) { - delta += value; - } else { - delta -= value; - } - } else { - delta -= options.healing ? -value : value; - } - promises.push( - t.actor.update({ - "data.hp.value": Math.clamped(hp.value + delta, 0, hp.max), - }) - ); - } - return Promise.all(promises); - } } diff --git a/src/module/actor/monster-sheet.js b/src/module/actor/monster-sheet.js index 6b29973..4918b4a 100644 --- a/src/module/actor/monster-sheet.js +++ b/src/module/actor/monster-sheet.js @@ -36,7 +36,6 @@ export class OseActorSheetMonster extends ActorSheet { // Override to set resizable initial size async _renderInner(...args) { const html = await super._renderInner(...args); - console.log(html); this.form = html[0]; // Resize resizable classes diff --git a/src/scss/actor-base.scss b/src/scss/actor-base.scss index 4ee7e6d..628191e 100644 --- a/src/scss/actor-base.scss +++ b/src/scss/actor-base.scss @@ -171,7 +171,7 @@ } .item-summary { font-size: 12px; - padding: 4px; + padding: 0 4px; } &:nth-child(odd) { background: rgba(0, 0, 0, 0.1); diff --git a/src/system.json b/src/system.json index 8f9b5b6..1a04213 100644 --- a/src/system.json +++ b/src/system.json @@ -2,7 +2,7 @@ "name": "ose", "title": "Old-School Essentials", "description": "Play OSR modules with Old-School Essentials on Foundry VTT", - "version": 0.1, + "version": 0.2, "minimumCoreVersion": "0.6.2", "compatibleCoreVersion": "0.6.4", "templateVersion": 2,