Update carrières

This commit is contained in:
2021-08-23 22:55:07 +02:00
parent c9225fad50
commit d40f768909
5 changed files with 3958 additions and 1586 deletions

View File

@ -204,7 +204,35 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
if (game.user.isGM && patchFinished)
ChatMessage.create( { title: "Patch fini !", content: "Les modules WFRP4E ont été patchés <strong>avec succès</strong>. Vous pouvez y aller et que <strong>Shallya vous garde !</strong>", whisper: ChatMessage.getWhisperRecipients("GM") } );
}
/************************************************************************************/
const convertColumnToMulti = (table) => {
let columns = table.columns;
let newTable = duplicate(table)
delete newTable.columns;
newTable.rows = table.rows.map(i => {return {range : {}}})
newTable.multi = table.columns
for(let column of columns)
{
for (let row of newTable.rows)
{
row[column] = {}
row.range[column] = []
}
}
for(let index in newTable.rows)
{
for (let column in table.rows[index].range)
{
newTable.rows[index][column] = {name : table.rows[index].name}
newTable.rows[index].range[column] = table.rows[index].range[column]
}
}
return newTable;
}
/************************************************************************************/