Skip to content

Commit 86f93cb

Browse files
committed
a
1 parent e6cf1d0 commit 86f93cb

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/config.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,13 @@ export function initConfig() {
726726
}
727727

728728
get visible() {
729-
if (!this._isWeaponSet || this._isPrimary) return super.visible;
730-
return super.visible && this.item?.system?.type?.value !== "shield";
729+
if (!this._isWeaponSet) return super.visible;
730+
const isReaction = this.parent instanceof DND5eReactionActionPanel;
731+
const isMelee = this.item?.system?.actionType === "mwak";
732+
if (isReaction && !isMelee) return false;
733+
if (this._isPrimary) return super.visible;
734+
if (this.item?.system?.type?.value === "shield") return false;
735+
return super.visible;
731736
}
732737

733738
async getTooltipData() {
@@ -998,7 +1003,7 @@ export function initConfig() {
9981003
}
9991004

10001005
get movementMax() {
1001-
if(!this.actor) return 0;
1006+
if (!this.actor) return 0;
10021007
return this.actor.system.attributes.movement[this.movementMode] / canvas.scene.dimensions.distance;
10031008
}
10041009
}
@@ -1086,8 +1091,8 @@ export function initConfig() {
10861091

10871092
const enableMacroPanel = game.settings.get(MODULE_ID, "macroPanel");
10881093

1089-
const mainPanels = [DND5eActionActionPanel, DND5eBonusActionPanel, DND5eReactionActionPanel, DND5eFreeActionPanel, DND5eLegActionPanel, DND5eLairActionPanel, DND5eMythicActionPanel]
1090-
if(enableMacroPanel) mainPanels.push(ARGON.PREFAB.MacroPanel);
1094+
const mainPanels = [DND5eActionActionPanel, DND5eBonusActionPanel, DND5eReactionActionPanel, DND5eFreeActionPanel, DND5eLegActionPanel, DND5eLairActionPanel, DND5eMythicActionPanel];
1095+
if (enableMacroPanel) mainPanels.push(ARGON.PREFAB.MacroPanel);
10911096
mainPanels.push(ARGON.PREFAB.PassTurnPanel);
10921097

10931098
CoreHUD.definePortraitPanel(DND5ePortraitPanel);

0 commit comments

Comments
 (0)