Fix auto-translation
This commit is contained in:
@ -345,30 +345,9 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
/* Hook for specific command */
|
||||
Hooks.on("chatMessage", (html, content, msg) => {
|
||||
|
||||
if ( content.includes("/auberge") ) {
|
||||
_manage_inn_roll( content, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
/************************************************************************************/
|
||||
/* Additionnal hooks ready */
|
||||
Hooks.once('ready', () => {
|
||||
|
||||
if (game.user.isGM)
|
||||
ChatMessage.create( { title: "Patch en progression", content: "<strong>Les modules WFRP4E sont en cours de patch pour traduction... Merci d'attendre le message de fin...</strong>", whisper: ChatMessage.getWhisperRecipients("GM") } );
|
||||
|
||||
setTimeout( __check_fix_wrong_modules, 2000, true, false);
|
||||
setTimeout( __check_fix_wrong_modules, 10000, false, false);
|
||||
setTimeout( __check_fix_wrong_modules, 20000, false, true);
|
||||
|
||||
const __add_actors_translation = ( ) => {
|
||||
const lang = game.settings.get('core', 'language');
|
||||
if ( lang == "fr" ) {
|
||||
|
||||
if ( lang == "fr" ) {
|
||||
let pack_array = [];
|
||||
game.packs.forEach((pack, name) => {
|
||||
let newpack = pack;
|
||||
@ -408,8 +387,32 @@ Hooks.once('ready', () => {
|
||||
pack_array.push( [name, newpack ] );
|
||||
} );
|
||||
game.packs = new Collection( pack_array );
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
/* Hook for specific command */
|
||||
Hooks.on("chatMessage", (html, content, msg) => {
|
||||
|
||||
if ( content.includes("/auberge") ) {
|
||||
_manage_inn_roll( content, msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
/************************************************************************************/
|
||||
/* Additionnal hooks ready */
|
||||
Hooks.once('ready', () => {
|
||||
|
||||
if (game.user.isGM)
|
||||
ChatMessage.create( { title: "Patch en progression", content: "<strong>Les modules WFRP4E sont en cours de patch pour traduction... Merci d'attendre le message de fin...</strong>", whisper: ChatMessage.getWhisperRecipients("GM") } );
|
||||
|
||||
setTimeout( __check_fix_wrong_modules, 2000, true, false);
|
||||
setTimeout( __check_fix_wrong_modules, 10000, false, false);
|
||||
setTimeout( __check_fix_wrong_modules, 20000, false, true);
|
||||
setTimeout( __add_actors_translation, 21000, false, true);
|
||||
|
||||
let compmod = "wfrp4e";
|
||||
// Check various settings in the installation
|
||||
game.modules.forEach((module, name) => {
|
||||
|
Reference in New Issue
Block a user