Prepare FR module for v8
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
/************************************************************************************/
|
||||
//import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
|
||||
import { WH4FRPatchConfig } from "./config-patch.js";
|
||||
import {TranslatedCompendium} from "../../babele/script/translated-compendium.js";
|
||||
|
||||
/************************************************************************************/
|
||||
const _patch_eis = () => {
|
||||
if (game.wfrp4e.config && game.wfrp4e.config.symptoms && game.wfrp4e.config.symptoms["delirium"] ) {
|
||||
if (game.wfrp4e?.config?.symptoms && game.wfrp4e.config.symptoms["delirium"] ) {
|
||||
game.wfrp4e.config.symptoms["delirium"] = "Délire";
|
||||
|
||||
game.wfrp4e.config.symptomDescriptions["delirium"] = "Votre sensibilité va et vient, avec des moments de clarté remplaçés subitement Your sensibility comes and goes, with moments of clarity replaced suddenly par des accès de délire, des hallucinations et de la terreur. Faites un <b>Test de Force Mentale Intermédiaire (+0)</b> chaque heure, et consultez la table <b><a class='table-click' data-table='delirium'>Délires</a></b> table.";
|
||||
|
@ -268,9 +268,32 @@ Hooks.once('init', () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
return skills_list;
|
||||
return skills_list
|
||||
},
|
||||
"process_effects": (effectsData, translations, data, tc, tc_translations) => {
|
||||
//console.log("Effects :", effectsData, translations, data, tc, tc_translations)
|
||||
for (let e of effectsData) {
|
||||
let origName = e.name
|
||||
e.name = tc_translations.name || game.i18n.localize(e.name)
|
||||
if ( e.flags?.wfrp4e?.scriptData) {
|
||||
for (let script of e.flags.wfrp4e.scriptData) {
|
||||
if (script?.label) {
|
||||
// Quand le label du script est strictement identique au nom de l'item concerné
|
||||
if ( script.label.toLowerCase() == origName.toLowerCase() ) {
|
||||
script.label = e.name
|
||||
} else if (script.label.toLowerCase().includes("tests to affect")) {
|
||||
script.label = script.label.replace("Tests to affect", "Tests relatifs à ")
|
||||
} else if (script.label.toLowerCase().includes("using torn muscle")) {
|
||||
script.label = script.label.replace("Using Torn Muscle", "Utilisation du muscle déchiré ")
|
||||
} else {
|
||||
script.label = game.i18n.localize(script.label)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return effectsData
|
||||
},
|
||||
|
||||
"resultConverter": (results, translated) => {
|
||||
//console.log("STUF PARSING", results, translated)
|
||||
if (translated) {
|
||||
|
Reference in New Issue
Block a user