This commit is contained in:
sladecraven 2021-07-26 23:54:21 +02:00
parent e6e1cbd073
commit 69551f3499
4 changed files with 41 additions and 4 deletions

View File

@ -214,7 +214,7 @@ const __add_actors_translation = ( ) => {
let pack_array = []; let pack_array = [];
for ( let metadata of game.data.packs ) { for ( let metadata of game.data.packs ) {
if(!game.babele.isTranslated(metadata) && metadata.documentName === 'Actor') { if(!game.babele.isTranslated(metadata) && metadata.documentName === 'Actor') {
console.log("PACK : ", metadata); //console.log("PACK : ", metadata);
let translations = { let translations = {
"label": metadata.name, "label": metadata.name,
"mapping": { "mapping": {

View File

@ -37,6 +37,32 @@ Hooks.once('init', () => {
return statParserFR( statString, type); return statParserFR( statString, type);
} }
/*---------------------------------------------------------------------*/
game.wfrp4e.utility.handleConditionClick = function(event) {
let cond = $(event.currentTarget).attr("data-cond")
if (!cond)
cond = event.target.text;
cond = cond.trim();
let condkey
// En vo, les noms d'états sont égaux aux clés en minuscules
if ( game.wfrp4e.config.conditions[cond.toLowerCase()] ) {
condkey = cond.toLowerCase();
} else {
try {
condkey = game.wfrp4e.utility.findKey(cond.toLowerCase(), game.wfrp4e.config.conditions, {caseInsensitive: true});
}
catch {
ui.notifications.error("L'état est inconnu : " + cond);
}
}
let condName = game.wfrp4e.config.conditions[condkey];
let condDescr = game.wfrp4e.config.conditionDescriptions[condkey];
let messageContent = `<b>${condName}</b><br>${condDescr}`
let chatData = game.wfrp4e.utility.chatDataSetup(messageContent)
ChatMessage.create(chatData);
}
/*---------------------------------------------------------------------*/ /*---------------------------------------------------------------------*/
game.wfrp4e.entities.ItemWfrp4e.prototype.computeSpellDamage = function(formula, isMagicMissile) { game.wfrp4e.entities.ItemWfrp4e.prototype.computeSpellDamage = function(formula, isMagicMissile) {
try { try {

View File

@ -2,7 +2,7 @@
"name": "WH4-fr-translation", "name": "WH4-fr-translation",
"title": "WFRP4e - Core Module en français.", "title": "WFRP4e - Core Module en français.",
"description": "Traduction Française pour Warhammer v4.", "description": "Traduction Française pour Warhammer v4.",
"version": "4.0.9", "version": "4.0.10",
"minimumCoreVersion" : "0.8.0", "minimumCoreVersion" : "0.8.0",
"compatibleCoreVersion": "0.8.8", "compatibleCoreVersion": "0.8.8",
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",

11
wfrp4.code-workspace Normal file
View File

@ -0,0 +1,11 @@
{
"folders": [
{
"path": "."
},
{
"path": "../WFRP4e-FoundryVTT"
}
],
"settings": {}
}