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 = [];
for ( let metadata of game.data.packs ) {
if(!game.babele.isTranslated(metadata) && metadata.documentName === 'Actor') {
console.log("PACK : ", metadata);
//console.log("PACK : ", metadata);
let translations = {
"label": metadata.name,
"mapping": {

View File

@ -34,9 +34,35 @@ Hooks.once('init', () => {
vo_conditions: vo_conditions }
game.wfrp4e.apps.StatBlockParser.parseStatBlock = async function( statString, type = "npc") {
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) {
try {

View File

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

11
wfrp4.code-workspace Normal file
View File

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