Closed SZzip closed 4 years ago
I created a small snippit to access the tables easier. Feel free to add it to the module.
$('.roll-type-select').find('.fa-dice-d20').attr("style", 'cursor: pointer;'); $('.roll-type-select').find('.fa-dice-d20').click(function(){ let chatOptions = {user: game.user._id} if (['gmroll', 'blindroll'].includes(game.settings.get('core', 'rollMode'))) chatOptions['whisper'] = ChatMessage.getWhisperIDs('GM'); if (game.settings.get('core', 'rollMode') === 'blindroll') chatOptions['blind'] = true; var content = '/table Commands' Object.entries(WFRP_Tables).forEach(function(value){ content += '<a data-table=\'' + value[0] + '\' class=\'table-click\'>' + value[0] + ' - ' + value[1].name + '' }) chatOptions['content'] = content; ChatMessage.create(chatOptions,false) })
/table
' + value[0] + '
Am I correct in that this addresses issue #145 ? Is that the purpose here or is there something else added as well?
I ask this because #146 has already been fixed, you can click on tables in the menu to roll them
I created a small snippit to access the tables easier. Feel free to add it to the module.
$('.roll-type-select').find('.fa-dice-d20').attr("style", 'cursor: pointer;'); $('.roll-type-select').find('.fa-dice-d20').click(function(){ let chatOptions = {user: game.user._id} if (['gmroll', 'blindroll'].includes(game.settings.get('core', 'rollMode'))) chatOptions['whisper'] = ChatMessage.getWhisperIDs('GM'); if (game.settings.get('core', 'rollMode') === 'blindroll') chatOptions['blind'] = true; var content = '
/table
Commands' Object.entries(WFRP_Tables).forEach(function(value){ content += '<a data-table=\'' + value[0] + '\' class=\'table-click\'>
' + value[0] + '
- ' + value[1].name + '' }) chatOptions['content'] = content; ChatMessage.create(chatOptions,false) })