From 5d36ea9e0cb4d3a0176b9bc760c3d8a415e4c9c0 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 27 Sep 2022 00:15:34 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20R=C3=A9sistance/structure=20max=20aux?= =?UTF-8?q?=20v=C3=A9hicules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pour qu'on puisse les réparer --- module/actor.js | 6 ++-- module/migrations.js | 21 +++++++++++++- packs/vehicules.db | 18 ++++++------ styles/simple.css | 8 +++++- template.json | 20 ++++++++++++-- templates/actor-vehicule-sheet.html | 41 ++++++++++++++-------------- templates/actor/liens-vehicules.html | 32 +++++++++++++++++----- 7 files changed, 103 insertions(+), 43 deletions(-) diff --git a/module/actor.js b/module/actor.js index 3084d0e9..dcb55db6 100644 --- a/module/actor.js +++ b/module/actor.js @@ -3876,8 +3876,10 @@ export class RdDActor extends Actor { id: vehicle.id, name: vehicle.name, img: vehicle.img, - categorie: vehicle.system.categorie, - structure: vehicle.system.structure, + system: { + categorie: vehicle.system.categorie, + etat: vehicle.system.etat + } }; } diff --git a/module/migrations.js b/module/migrations.js index 0a67d03d..14b0c67c 100644 --- a/module/migrations.js +++ b/module/migrations.js @@ -80,11 +80,30 @@ class _10_0_17_MigrationCompetenceCreature extends Migration { } } +class _10_0_21_VehiculeStructureResistanceMax extends Migration { + get code() { return "vehicule-structure-resistance-max"; } + get version() { return "10.0.21"; } + + async migrate() { + await game.actors + .filter((actor) => actor.type == "vehicule") + .forEach(async (actor) => { + await actor.update({ + 'system.etat.resistance.value': actor.system.resistance, + 'system.etat.resistance.max': actor.system.resistance, + 'system.etat.structure.value': actor.system.structure, + 'system.etat.structure.max': actor.system.structure + }) + }); + } +} + export class Migrations { static getMigrations() { return [ new _10_0_16_MigrationSortsReserve(), - new _10_0_17_MigrationCompetenceCreature() + new _10_0_17_MigrationCompetenceCreature(), + new _10_0_21_VehiculeStructureResistanceMax(), ]; } diff --git a/packs/vehicules.db b/packs/vehicules.db index aae8d57e..12101c63 100644 --- a/packs/vehicules.db +++ b/packs/vehicules.db @@ -1,9 +1,9 @@ -{"_id":"0ZW71u9G8fqnyNfy","name":"Drakkar","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":28,"structure":12,"vitesse":"3/2/1","bonus":"(10)/+10/+14","manoeuvrabilite":"0/-2/-4","equipage":8,"capacite_encombrement":150,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar.webp","token":{"flags":{},"name":"Drakkar","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar_token.webp","tint":"","width":10,"height":10,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"0ZW71u9G8fqnyNfy","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"5FWY38a5emYmqisa","name":"Cariole","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Cariole à Bras","resistance":10,"structure":6,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole.webp","token":{"flags":{},"name":"Cariole","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole_token.webp","tint":"","width":2,"height":2,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"5FWY38a5emYmqisa","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"C0JpbzQSELoml971","name":"Canot","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Barque","resistance":14,"structure":6,"vitesse":"","bonus":"(2)/+3/+5","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot.webp","token":{"flags":{},"name":"Canot","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot_token.webp","tint":"","width":3,"height":3,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"C0JpbzQSELoml971","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"PoQUTsNThYDp6XAW","name":"Nef","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":30,"structure":14,"vitesse":"5/4/2","bonus":"","manoeuvrabilite":"0/-3/-4","equipage":12,"capacite_encombrement":200,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef.webp","token":{"flags":{},"name":"Nef","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef_token.webp","tint":"","width":13,"height":13,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"PoQUTsNThYDp6XAW","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"RFOYL8HBUxd32DXS","name":"Galère","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":36,"structure":14,"vitesse":"2/2/1","bonus":"(12)/+12/+16","manoeuvrabilite":"0/-4/-6","equipage":10,"capacite_encombrement":300,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere.webp","token":{"flags":{},"name":"Galère","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere_token.webp","tint":"","width":14,"height":14,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"RFOYL8HBUxd32DXS","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"TDpSn7GawJ1LCHp7","name":"Charette","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":16,"structure":8,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette.webp","token":{"flags":{},"name":"Charette","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette_token.webp","tint":"","width":3,"height":3,"scale":1.1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"TDpSn7GawJ1LCHp7","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"ZiyRDzz3gGzlpLIc","name":"Barque","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Barque","resistance":20,"structure":10,"vitesse":"3/2/1","bonus":"(4)/+4/+6","manoeuvrabilite":"0/0/-4","equipage":4,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque.webp","token":{"flags":{},"name":"Barque","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque_token.webp","tint":"","width":6,"height":6,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"ZiyRDzz3gGzlpLIc","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"gM77co80kmpVsYg6","name":"Posé par terre","permission":{"default":0,"Q2G6GTdrotKzYGUC":3},"type":"vehicule","data":{"categorie":"Autre","resistance":0,"structure":0,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":0,"capacite_encombrement":100,"description":"

Déposer ici les objets que vous voulez échanger avec d'autres joueurs

","notesmj":""},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","token":{"flags":{},"name":"Posé par terre","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","tint":"","width":1,"height":1,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"gM77co80kmpVsYg6","actorLink":true,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} -{"_id":"idyDmDWYpQ4Eppen","name":"Chariot","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":20,"structure":10,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":150,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot.webp","token":{"flags":{},"name":"Chariot","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot_token.webp","tint":"","width":4,"height":4,"scale":1.4,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"idyDmDWYpQ4Eppen","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} +{"_id":"0ZW71u9G8fqnyNfy","name":"Drakkar","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.0ZW71u9G8fqnyNfy"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar.webp","items":[],"effects":[],"system":{"categorie":"Bateau","resistance":28,"structure":12,"vitesse":"3/2/1","bonus":"(10)/+10/+14","manoeuvrabilite":"0/-2/-4","equipage":8,"capacite_encombrement":150,"etat":{"resistance":{"type":"number","max":28,"value":28,"label":"Résistance","derivee":false},"structure":{"type":"number","max":12,"value":12,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Drakkar","displayName":0,"width":10,"height":10,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/drakkar_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097623,"modifiedTime":1664231486338,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"5FWY38a5emYmqisa","name":"Cariole","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.5FWY38a5emYmqisa"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole.webp","items":[],"effects":[],"system":{"categorie":"Cariole à Bras","resistance":10,"structure":6,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"etat":{"resistance":{"type":"number","max":10,"value":10,"label":"Résistance","derivee":false},"structure":{"type":"number","max":6,"value":6,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Cariole","displayName":0,"width":2,"height":2,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/cariole_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097624,"modifiedTime":1664231486337,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"C0JpbzQSELoml971","name":"Canot","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.C0JpbzQSELoml971"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot.webp","items":[],"effects":[],"system":{"categorie":"Barque","resistance":14,"structure":6,"vitesse":"","bonus":"(2)/+3/+5","manoeuvrabilite":"","equipage":1,"capacite_encombrement":50,"etat":{"resistance":{"type":"number","max":14,"value":14,"label":"Résistance","derivee":false},"structure":{"type":"number","max":6,"value":6,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Canot","displayName":0,"width":3,"height":3,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/canot_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097625,"modifiedTime":1664231486336,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"PoQUTsNThYDp6XAW","name":"Nef","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.PoQUTsNThYDp6XAW"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef.webp","items":[],"effects":[],"system":{"categorie":"Bateau","resistance":30,"structure":14,"vitesse":"5/4/2","bonus":"","manoeuvrabilite":"0/-3/-4","equipage":12,"capacite_encombrement":200,"etat":{"resistance":{"type":"number","max":30,"value":30,"label":"Résistance","derivee":false},"structure":{"type":"number","max":14,"value":14,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Nef","displayName":0,"width":13,"height":13,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/nef_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097626,"modifiedTime":1664231486339,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"RFOYL8HBUxd32DXS","name":"Galère","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.RFOYL8HBUxd32DXS"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere.webp","items":[],"effects":[],"system":{"categorie":"Bateau","resistance":36,"structure":14,"vitesse":"2/2/1","bonus":"(12)/+12/+16","manoeuvrabilite":"0/-4/-6","equipage":10,"capacite_encombrement":300,"etat":{"resistance":{"type":"number","max":36,"value":36,"label":"Résistance","derivee":false},"structure":{"type":"number","max":14,"value":14,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Galère","displayName":0,"width":14,"height":14,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097627,"modifiedTime":1664231486339,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"TDpSn7GawJ1LCHp7","name":"Charette","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.TDpSn7GawJ1LCHp7"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette.webp","items":[],"effects":[],"system":{"categorie":"Chariot","resistance":16,"structure":8,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":100,"etat":{"resistance":{"type":"number","max":16,"value":16,"label":"Résistance","derivee":false},"structure":{"type":"number","max":8,"value":8,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Charette","displayName":0,"width":3,"height":3,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette_token.webp","tint":null,"scaleX":1.1,"scaleY":1.1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097629,"modifiedTime":1664231486337,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"ZiyRDzz3gGzlpLIc","name":"Barque","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.ZiyRDzz3gGzlpLIc"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque.webp","items":[],"effects":[],"system":{"categorie":"Barque","resistance":20,"structure":10,"vitesse":"3/2/1","bonus":"(4)/+4/+6","manoeuvrabilite":"0/0/-4","equipage":4,"capacite_encombrement":100,"etat":{"resistance":{"type":"number","max":20,"value":20,"label":"Résistance","derivee":false},"structure":{"type":"number","max":10,"value":10,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Barque","displayName":0,"width":6,"height":6,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque_token.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097629,"modifiedTime":1664231486336,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"gM77co80kmpVsYg6","name":"Posé par terre","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.gM77co80kmpVsYg6"}},"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","items":[],"effects":[],"system":{"categorie":"Autre","resistance":0,"structure":0,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":0,"capacite_encombrement":100,"etat":{"resistance":{"type":"number","max":0,"value":0,"label":"Résistance","derivee":false},"structure":{"type":"number","max":0,"value":0,"label":"Structure","derivee":false}},"description":"

Déposer ici les objets que vous voulez échanger avec d'autres joueurs

","race":"","notesmj":"","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"Q2G6GTdrotKzYGUC":3},"prototypeToken":{"flags":{},"name":"Posé par terre","displayName":0,"width":1,"height":1,"lockRotation":false,"rotation":0,"actorLink":true,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp","tint":null,"scaleX":1,"scaleY":1,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097630,"modifiedTime":1664231486340,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} +{"_id":"idyDmDWYpQ4Eppen","name":"Chariot","type":"vehicule","sort":100001,"flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.vehicules.idyDmDWYpQ4Eppen"}},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot.webp","items":[],"effects":[],"system":{"categorie":"Chariot","resistance":20,"structure":10,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":150,"etat":{"resistance":{"type":"number","max":20,"value":20,"label":"Résistance","derivee":false},"structure":{"type":"number","max":10,"value":10,"label":"Structure","derivee":false}},"description":"Description ...","race":"","notesmj":"Notes du MJ","attributs":{"malusarmure":{"value":0}}},"ownership":{"default":0,"rYShh2P1DNavdoBD":3},"prototypeToken":{"flags":{},"name":"Chariot","displayName":0,"width":4,"height":4,"lockRotation":false,"rotation":0,"actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":"sante.vie"},"bar2":{"attribute":"sante.endurance"},"randomImg":false,"light":{"dim":0,"bright":0,"angle":360,"color":null,"alpha":1,"animation":{"type":null,"speed":5,"intensity":5,"reverse":false},"coloration":1,"attenuation":0.5,"luminosity":0.5,"saturation":0,"contrast":0,"shadows":0,"darkness":{"min":0,"max":1}},"texture":{"src":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot_token.webp","tint":null,"scaleX":1.4,"scaleY":1.4,"offsetX":0,"offsetY":0,"rotation":0},"sight":{"angle":360,"enabled":false,"range":0,"brightness":1,"visionMode":"basic","color":null,"attenuation":0.1,"saturation":0,"contrast":0},"alpha":1,"detectionModes":[]},"folder":null,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.0.21","coreVersion":"10.286","createdTime":1664231097632,"modifiedTime":1664231486338,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}} diff --git a/styles/simple.css b/styles/simple.css index 67ec038f..40fae084 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -409,6 +409,12 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { flex-wrap: nowrap; justify-content: stretch; } +.rdd.sheet .window-content .sheet-body .carac-list .caracteristique.vehicle { + flex-wrap: nowrap; + justify-content: stretch; + flex-basis: 7.5em; +} + .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .carac-label { flex-basis: 50%; } @@ -1111,7 +1117,7 @@ ul, li { .table-fatigue .fatigue-malus { font-size: 0.8rem; } - .flex-actions-bar { +.flex-actions-bar { flex-grow: 2; } diff --git a/template.json b/template.json index 58a784f2..aac793e0 100644 --- a/template.json +++ b/template.json @@ -31,13 +31,27 @@ }, "vehicule": { "categorie": "", - "resistance": 0, - "structure": 0, "vitesse": "", "bonus": "", "manoeuvrabilite": "", "equipage": 0, - "capacite_encombrement": 0 + "capacite_encombrement": 0, + "etat": { + "resistance" : { + "type": "number", + "max": 20, + "value": 20, + "label": "Résistance", + "derivee": false + }, + "structure":{ + "type": "number", + "max": 10, + "value": 10, + "label": "Structure", + "derivee": false + } + } }, "entite": { "definition": { diff --git a/templates/actor-vehicule-sheet.html b/templates/actor-vehicule-sheet.html index 3a85a905..1adada6c 100644 --- a/templates/actor-vehicule-sheet.html +++ b/templates/actor-vehicule-sheet.html @@ -26,7 +26,7 @@
  1. - Catégorie + Catégorie
  2. - Résistance - + Résistance + + / +
  3. - Structure - + Structure + + / +
  4. - Vitesse - + Vitesse +
  5. - Bonus - + Bonus +
  6. - Manoeuvrabilité - + Manoeuvrabilité +
  7. - Equipage - + Equipage +
  8. - Capacité d'Encombrement - + Capacité d'Encombrement +
- + {{!-- Equipment Tab --}}
- {{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html"}} - +
{{!-- Biography Tab --}}
@@ -79,8 +82,6 @@
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}} - - \ No newline at end of file diff --git a/templates/actor/liens-vehicules.html b/templates/actor/liens-vehicules.html index a95d61bf..6ca72c7d 100644 --- a/templates/actor/liens-vehicules.html +++ b/templates/actor/liens-vehicules.html @@ -1,15 +1,33 @@ -

Véhicules

+{{#if subacteurs.vehicules.length}} +{{else}} +

Véhicules

+{{/if}}