Update carrières
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
|
Reference in New Issue
Block a user