mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-04-29 18:21:40 -04:00
[#27] Do not throw an error when dropping an item onto a hotbar slot.
This commit is contained in:
parent
d799fb1c56
commit
db34d156af
1 changed files with 1 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
* @returns {Promise}
|
||||
*/
|
||||
export async function createWorldbuildingMacro(data, slot) {
|
||||
if ( !data.roll || !data.label ) return false;
|
||||
const command = `const roll = new Roll("${data.roll}", actor ? actor.getRollData() : {});
|
||||
roll.toMessage({speaker, flavor: "${data.label}"});`;
|
||||
let macro = game.macros.find(m => (m.name === data.label) && (m.command === command));
|
||||
|
|
Loading…
Add table
Reference in a new issue