Skip to content

Commit a44c16d

Browse files
authored
Merge pull request #1060 from ben/fix-v13-issue
Fix v13 issue
2 parents 0c49816 + f1a2024 commit a44c16d

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Next Release
44

5+
- Fix an issue in Foundry v13 that was preventing some chat message cards from working properly ([#1060](https://github.com/ben/foundry-ironsworn/pull/1060))
6+
57
## 1.25.4
68

79
- Fix a styling issue with Foundry rolltable-result editors ([#1059](https://github.com/ben/foundry-ironsworn/pull/1059))

src/module/chat/cards.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ export class IronswornChatCard {
3232
const tables = compact(flatten(await Promise.all(maybeTablePromises)))
3333
if (tables.length === 0) return
3434

35-
ContextMenu.create(
36-
ui.chat!,
35+
new ContextMenu(
3736
html,
38-
`.message-content`,
37+
`.chat-message`,
3938
tables.map((t) => ({
4039
name: t.name ?? '',
4140
icon: '<i class="isicon-oracle inline"></i>',

src/module/roll-table/oracle-table.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export class OracleTable extends RollTable {
4949
...(dvComp.index?.contents ?? []),
5050
...(sfComp.index?.contents ?? [])
5151
]
52-
console.log(allIndexEntries)
5352
const indexItem = allIndexEntries.find(
5453
(x) => x.flags?.['foundry-ironsworn']?.dfid === dfid
5554
)
@@ -305,8 +304,6 @@ export class OracleTable extends RollTable {
305304
messageData
306305
)
307306

308-
// console.log('messageData', messageData)
309-
310307
const templateData = await this._prepareTemplateData(
311308
results,
312309
cursedResults,
@@ -365,8 +362,6 @@ export class OracleTable extends RollTable {
365362
const sourceId = msg.getFlag('foundry-ironsworn', 'sourceId')
366363
const rollTableType = msg.getFlag('foundry-ironsworn', 'rollTableType')
367364

368-
// console.log(rerolls, sourceId, rollTableType)
369-
370365
if (sourceId == null) return
371366
let oracleTable: OracleTable | undefined
372367
if (rollTableType == null)
@@ -379,7 +374,6 @@ export class OracleTable extends RollTable {
379374
// defer render to chat so we can manually set the chat message id
380375
const { results, roll } = await oracleTable.draw({ displayChat: false })
381376
const { cursedResults, cursedDie } = await oracleTable.cursedResults(roll)
382-
console.log(cursedResults)
383377

384378
const templateData = await oracleTable._prepareTemplateData(
385379
results,

0 commit comments

Comments
 (0)