foundryvtt / foundryvtt

Public issue tracking and documentation for Foundry Virtual Tabletop - software connecting RPG gamers in a shared multiplayer environment with an intuitive interface and powerful API.
https://foundryvtt.com/
198 stars 10 forks source link

Remove unnecessary arguments in the generated RollTableMacro command. #10261

Closed krbz999 closed 2 weeks ago

krbz999 commented 5 months ago

What happened?

Dragging a table to the hotbar creates a macro such as this:

const table = await fromUuid("RollTable.ARNbJ5b3oQVZNN0p");
await table.draw({roll: true, displayChat: true});

Since roll should be an instance of Roll, this is nonsense, and displayChat: true is the default anyway.

I suggest changing to this:

const table = await fromUuid("RollTable.ARNbJ5b3oQVZNN0p");
await table.draw({rollMode: CONST.DICE_ROLL_MODES.PRIVATE});

or simply table.draw() with no options.

What ways of accessing Foundry can you encounter this issue in?

Reproduction Steps

Drag a table to the hotbar.

What core version are you reporting this for?

11.315

Relevant log output

No response

Bug Checklist