More WIP on 0.8.x migration

This commit is contained in:
Johannes Loher 2021-06-30 04:32:10 +02:00
parent 6b39284164
commit ba493f4f18
13 changed files with 55 additions and 38 deletions

View file

@ -12,10 +12,10 @@ export class DS4Roll<D extends Record<string, unknown> = Record<string, unknown>
* template if the first dice term is a ds4 check.
* @override
*/
async render(chatOptions: Roll.ChatOptions = {}): Promise<string> {
async render(chatOptions: Parameters<Roll["render"]>[0] = {}): Promise<string> {
chatOptions = mergeObject(
{
user: game.user?._id,
user: game.user?.id,
flavor: null,
template: DS4Roll.CHAT_TEMPLATE,
blind: false,
@ -25,7 +25,7 @@ export class DS4Roll<D extends Record<string, unknown> = Record<string, unknown>
const isPrivate = chatOptions.isPrivate;
// Execute the roll, if needed
if (!this._rolled) this.roll();
if (!this._evaluated) this.evaluate();
// Define chat data
const firstDiceTerm = this.dice[0];