Skip to content

Commit ba12535

Browse files
committed
Compatibility V12
1 parent 2792aaa commit ba12535

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

module/actor/actor-sheet.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class IntoTheOddActorSheet extends ActorSheet {
66

77
/** @override */
88
static get defaultOptions() {
9-
return mergeObject(super.defaultOptions, {
9+
return foundry.utils.mergeObject(super.defaultOptions, {
1010
classes: ["intotheodd", "sheet", "actor"],
1111
template: "systems/intotheodd/templates/actor/actor-sheet.html",
1212
width: 500,
@@ -38,10 +38,10 @@ export class IntoTheOddActorSheet extends ActorSheet {
3838
}
3939

4040
/** @override */
41-
getData() {
41+
async getData() {
4242
const context = super.getData();
4343
context.systemData = context.actor.system;
44-
context.enrichedBiography = TextEditor.enrichHTML(context.systemData.biography, {async: false});
44+
context.enrichedBiography = await TextEditor.enrichHTML(context.systemData.biography, {async: true});
4545
return context;
4646
}
4747

@@ -87,7 +87,7 @@ export class IntoTheOddActorSheet extends ActorSheet {
8787
// Get the type of item to create.
8888
const type = header.dataset.type;
8989
// Grab any data associated with this control.
90-
const data = duplicate(header.dataset);
90+
const data = foundry.utils.duplicate(header.dataset);
9191
// Initialize a default name.
9292
const name = `New ${type.capitalize()}`;
9393
// Prepare the item object.
@@ -108,15 +108,16 @@ export class IntoTheOddActorSheet extends ActorSheet {
108108
* @param {Event} event The originating click event
109109
* @private
110110
*/
111-
_onRoll(event) {
111+
async _onRoll(event) {
112112
event.preventDefault();
113113
const element = event.currentTarget;
114114
const dataset = element.dataset;
115115

116116
if (dataset.roll) {
117117
let roll = new Roll(dataset.roll, this.actor.system);
118118
let label = dataset.label ? `Rolling ${dataset.label}` : '';
119-
roll.roll({async: false}).toMessage({
119+
await roll.evaluate();
120+
roll.toMessage({
120121
speaker: ChatMessage.getSpeaker({ actor: this.actor }),
121122
flavor: label
122123
});

module/item/item-sheet.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class IntoTheOddItemSheet extends ItemSheet {
66

77
/** @override */
88
static get defaultOptions() {
9-
return mergeObject(super.defaultOptions, {
9+
return foundry.utils.mergeObject(super.defaultOptions, {
1010
classes: ["intotheodd", "sheet", "item"],
1111
width: 420,
1212
height: 320
@@ -27,10 +27,10 @@ export class IntoTheOddItemSheet extends ItemSheet {
2727
/* -------------------------------------------- */
2828

2929
/** @override */
30-
getData() {
30+
async getData() {
3131
const context = super.getData();
3232
context.systemData = context.item.system;
33-
context.enrichedDescription = TextEditor.enrichHTML(context.systemData.description, {async: false});
33+
context.enrichedDescription = await TextEditor.enrichHTML(context.systemData.description, {async: true});
3434
return context;
3535
}
3636

system.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
"description": "The Into the Odd system for FoundryVTT!",
55
"version": "#{VERSION}#",
66
"compatibility": {
7-
"minimum": "10",
8-
"verified": "11",
9-
"maximum": "11"
7+
"minimum": "12",
8+
"verified": "12",
9+
"maximum": "12"
1010
},
11-
"templateVersion": 2,
1211
"authors": [
1312
{
1413
"name": "voidcase"
@@ -30,8 +29,10 @@
3029
}
3130
],
3231
"languages": [],
33-
"gridDistance": 5,
34-
"gridUnits": "ft",
32+
"grid": {
33+
"distance": 5,
34+
"units": "ft"
35+
},
3536
"primaryTokenAttribute": "health",
3637
"url": "#{URL}#",
3738
"manifest": "#{MANIFEST}#",

0 commit comments

Comments
 (0)