Skip to content

Commit

Permalink
0.9.51 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk123999 committed Feb 2, 2024
1 parent 8ab22a0 commit 8546928
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# 0.9.50 Release:
# 0.9.51 Release:
## Bug Fixes:
- Crusher
- Additional Item Compendiums
- GPR Support
## Update Notes:
- Support for D&D system version 3.0.0 will be in a future update. Do not update your system yet.

# 0.9.50 Release:
## Bug Fixes:
- Crusher

# 0.9.49 Release:
## Bug Fixes:
- Blessed Strikes
Expand Down
4 changes: 1 addition & 3 deletions scripts/compendium.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ export async function additionalCompendiumPriority() {
let startNumber = 1;
if (gambitItems) startNumber++;
if (miscItems) startNumber++;
for (let i = startNumber; inputs.length > i; i++) {
newSettings[packs[i - 1]] = isNaN(selection.inputs[i]) ? 100 : selection.inputs[i];
}
for (let i = startNumber; inputs.length - 1 > i; i++) newSettings[packs[i - startNumber]] = isNaN(selection.inputs[i]) ? 100 : selection.inputs[i];
newSettings['CPR'] = selection.inputs[0];
if (gambitItems && !miscItems) {
newSettings['GPS'] = selection.inputs[1];
Expand Down
14 changes: 7 additions & 7 deletions scripts/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function createHeaderButton(config, buttons) {
});
}
}
export function updateItemButton(app, [elem], options) {
export async function updateItemButton(app, [elem], options) {
let headerButton = elem.closest('.window-app').querySelector('a.header-button.chris-premades');
if (!headerButton) return;
let item = app.object;
Expand All @@ -36,8 +36,8 @@ export function updateItemButton(app, [elem], options) {
return true;
}
}
function gps(item) {
let automation = CONFIG['gambits-premades']?.automations[item.name];
async function gps(item) {
let automation = await game.modules.get('gambits-premades')?.medkitApi()?.automations?.[item.name];
if (!automation) return;
let itemVersion = item.flags['chris-premades']?.info?.gambit?.version;
if (!itemVersion) {
Expand All @@ -51,7 +51,7 @@ export function updateItemButton(app, [elem], options) {
headerButton.style.color = 'orchid';
}
function misc(item) {
let automation = CONFIG['midi-item-showcase-community']?.automations[item.name];
let automation = CONFIG['midi-item-showcase-community']?.automations?.[item.name];
if (!automation) return;
let itemVersion = item.flags['chris-premades']?.info?.misc?.version;
if (!itemVersion) {
Expand All @@ -70,19 +70,19 @@ export function updateItemButton(app, [elem], options) {
cpr(item);
return;
case 'GPS':
gps(item);
await gps(item);
return;
case 'MISC':
misc(item);
return;
default:
headerButton.style.color = 'yellow';
headerButton.style.color = 'pink';
return;
}
} else {
let found = cpr(item);
if (found) return;
let automation = CONFIG['gambits-premades']?.automations[item.name] ?? CONFIG['midi-item-showcase-community']?.automations[item.name];
let automation = await game.modules.get('gambits-premades')?.medkitApi()?.automations?.[item.name] ?? CONFIG['midi-item-showcase-community']?.automations?.[item.name];
if (automation) headerButton.style.color = 'yellow';
}
}
Expand Down

0 comments on commit 8546928

Please sign in to comment.