Skip to content

Commit

Permalink
Update token stats to use template
Browse files Browse the repository at this point in the history
  • Loading branch information
KitCat420 committed Mar 19, 2024
1 parent 06a7a86 commit be53467
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 243 deletions.
5 changes: 5 additions & 0 deletions lang/de.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"ECHPF1": {
"CombatManeuver": "Kampfmanöver",
"Settings": {
"ShowActionPanelStandard": {
"name": "Standardaktionen anzeigen",
Expand All @@ -24,6 +25,10 @@
"ShowMacroPanel": {
"name": "Makro-Panel anzeigen",
"desc": "Zeigt das Makro-Panel an."
},
"ShowWeaponsInFullPanel": {
"name": "Waffen im Aktionspanel für Volle Runde anzeigen",
"desc": "Wenn diese Option aktiviert ist, werden Waffenangriffe ebenfalls im Aktionspanel für Volle Runden angezeigt."
}
},
"MR": "LR",
Expand Down
5 changes: 5 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"ECHPF1": {
"CombatManeuver": "Combat Maneuver",
"Settings": {
"ShowActionPanelStandard": {
"name": "Show Standard Action Panel",
Expand All @@ -24,6 +25,10 @@
"ShowMacroPanel": {
"name": "Show Macro Panel",
"desc": "Show the Macro panel in the Actions tab."
},
"ShowWeaponsInFullPanel": {
"name": "Show Weapons in Full Panel",
"desc": "When active, weapon attacks are also listed in the full action panel."
}
},
"MR": "MR",
Expand Down
18 changes: 17 additions & 1 deletion modules/argon/buttons/specialActionButton.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,26 @@ export function specialActionButton(ARGON) {
}

async getTooltipData() {
let subtitle = null;
switch(this.type) {
case "bullRush":
case "dirtyTrick":
case "disarm":
case "drag":
case "overrun":
case "steal":
case "grapple":
case "reposition":
case "sunder":
case "trip":
subtitle = game.i18n.localize("ECHPF1.CombatManeuver");
break;
}

return {
title: this.label,
description: await TextEditor.enrichHTML(game.i18n.localize(`ECHPF1.ActionDescriptions.${ucFirst(this.type)}`)),
subtitle: null,
subtitle,
details: null,
properties: null,
propertiesLabel: null,
Expand Down
8 changes: 5 additions & 3 deletions modules/argon/panels/panels.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function panels(ARGON) {
break;

default:
if (!game.settings.get(ModuleName, `Show${panel.name}`)) {
if (!game.settings.get(ModuleName, `Show${panel.name.replace("Pathfinder1e", "")}`)) {
return false;
}
}
Expand Down Expand Up @@ -203,8 +203,10 @@ function fullActionPanel(ARGON) {
const ItemButton = itemButton(ARGON);
const SpellButtonPanelActionButton = spellButtonPanelActionButton(ARGON);

buttons.push(new ItemButton({item: null, parent: this, isWeaponSet: true, isPrimary: true}));
buttons.push(new ItemButton({item: null, parent: this, isWeaponSet: true, isPrimary: false}));
if(game.settings.get(ModuleName, `ShowWeaponsInFullPanel`)) {
buttons.push(new ItemButton({item: null, parent: this, isWeaponSet: true, isPrimary: true}));
buttons.push(new ItemButton({item: null, parent: this, isWeaponSet: true, isPrimary: false}));
}

buttons.push(new SpellButtonPanelActionButton({parent: this}));

Expand Down
Loading

0 comments on commit be53467

Please sign in to comment.