Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Remove version comparison.
- Add removed translations to module.
  • Loading branch information
Larkinabout committed Dec 5, 2023
1 parent 81eea71 commit 2e89fde
Show file tree
Hide file tree
Showing 17 changed files with 104 additions and 42 deletions.
9 changes: 8 additions & 1 deletion languages/br.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Armadura",
"tokenActionHud.pf2e.attribute": "Atributo",
"tokenActionHud.pf2e.attributes": "Atributos",
"tokenActionHud.pf2e.consumables": "Consumíveis",
"tokenActionHud.pf2e.containers": "Recipientes",
"tokenActionHud.pf2e.equipment": "Equipamento",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inventário",
"tokenActionHud.pf2e.noAmmo": "Sem Munição",
"tokenActionHud.pf2e.rests": "Descansos",
"tokenActionHud.pf2e.save": "Salvar",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Ações de Perícia Agrupadas",
"tokenActionHud.pf2e.skillActionsUngrouped": "Ações de Perícia Não Agrupadas",
"tokenActionHud.pf2e.takeBreather": "Fazer uma Pausa",
"tokenActionHud.pf2e.toggle": "Alternar"
"tokenActionHud.pf2e.toggle": "Alternar",
"tokenActionHud.pf2e.treasure": "Tesouro",
"tokenActionHud.pf2e.weapons": "Armas"
}
9 changes: 8 additions & 1 deletion languages/cn.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "盔甲",
"tokenActionHud.pf2e.attribute": "属性",
"tokenActionHud.pf2e.attributes": "属性",
"tokenActionHud.pf2e.consumables": "消耗品",
"tokenActionHud.pf2e.containers": "容器",
"tokenActionHud.pf2e.equipment": "装备",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "库存",
"tokenActionHud.pf2e.noAmmo": "无弹药",
"tokenActionHud.pf2e.rests": "休息",
"tokenActionHud.pf2e.save": "保存",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "分组的技能动作",
"tokenActionHud.pf2e.skillActionsUngrouped": "未分组的技能动作",
"tokenActionHud.pf2e.takeBreather": "休息一下",
"tokenActionHud.pf2e.toggle": "切换"
"tokenActionHud.pf2e.toggle": "切换",
"tokenActionHud.pf2e.treasure": "财宝",
"tokenActionHud.pf2e.weapons": "武器"
}
9 changes: 8 additions & 1 deletion languages/de.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Rüstung",
"tokenActionHud.pf2e.attribute": "Attribut",
"tokenActionHud.pf2e.attributes": "Attribute",
"tokenActionHud.pf2e.consumables": "Verbrauchsgüter",
"tokenActionHud.pf2e.containers": "Behälter",
"tokenActionHud.pf2e.equipment": "Ausrüstung",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inventar",
"tokenActionHud.pf2e.noAmmo": "Keine Munition",
"tokenActionHud.pf2e.rests": "Erholung",
"tokenActionHud.pf2e.save": "Speichern",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Gruppierte Fertigkeitsaktionen",
"tokenActionHud.pf2e.skillActionsUngrouped": "Ungruppierte Fertigkeitsaktionen",
"tokenActionHud.pf2e.takeBreather": "Verschnaufen",
"tokenActionHud.pf2e.toggle": "Umschalten"
"tokenActionHud.pf2e.toggle": "Umschalten",
"tokenActionHud.pf2e.treasure": "Schätze",
"tokenActionHud.pf2e.weapons": "Waffen"
}
9 changes: 8 additions & 1 deletion languages/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Armor",
"tokenActionHud.pf2e.attribute": "Attribute",
"tokenActionHud.pf2e.attributes": "Attributes",
"tokenActionHud.pf2e.consumables": "Consumables",
"tokenActionHud.pf2e.containers": "Containers",
"tokenActionHud.pf2e.equipment": "Equipment",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inventory",
"tokenActionHud.pf2e.noAmmo": "No Ammo",
"tokenActionHud.pf2e.rests": "Rests",
"tokenActionHud.pf2e.save": "Save",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Grouped Skill Actions",
"tokenActionHud.pf2e.skillActionsUngrouped": "Ungrouped Skill Actions",
"tokenActionHud.pf2e.takeBreather": "Take a Breather",
"tokenActionHud.pf2e.toggle": "Toggle"
"tokenActionHud.pf2e.toggle": "Toggle",
"tokenActionHud.pf2e.treasure": "Treasure",
"tokenActionHud.pf2e.weapons": "Weapons"
}
9 changes: 8 additions & 1 deletion languages/es.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Armadura",
"tokenActionHud.pf2e.attribute": "Atributo",
"tokenActionHud.pf2e.attributes": "Atributos",
"tokenActionHud.pf2e.consumables": "Consumibles",
"tokenActionHud.pf2e.containers": "Contenedores",
"tokenActionHud.pf2e.equipment": "Equipo",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inventario",
"tokenActionHud.pf2e.noAmmo": "Sin munición",
"tokenActionHud.pf2e.rests": "Descansos",
"tokenActionHud.pf2e.save": "Guardar",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Acciones de Habilidad Agrupadas",
"tokenActionHud.pf2e.skillActionsUngrouped": "Acciones de Habilidad sin Agrupar",
"tokenActionHud.pf2e.takeBreather": "Tomar un Respiro",
"tokenActionHud.pf2e.toggle": "Alternar"
"tokenActionHud.pf2e.toggle": "Alternar",
"tokenActionHud.pf2e.treasure": "Tesoro",
"tokenActionHud.pf2e.weapons": "Armas"
}
9 changes: 8 additions & 1 deletion languages/fr.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Armure",
"tokenActionHud.pf2e.attribute": "Attribut",
"tokenActionHud.pf2e.attributes": "Attributs",
"tokenActionHud.pf2e.consumables": "Consommables",
"tokenActionHud.pf2e.containers": "Contenants",
"tokenActionHud.pf2e.equipment": "Équipement",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inventaire",
"tokenActionHud.pf2e.noAmmo": "Pas de munition",
"tokenActionHud.pf2e.rests": "Repos",
"tokenActionHud.pf2e.save": "Enregistrer",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Actions de Compétence Groupées",
"tokenActionHud.pf2e.skillActionsUngrouped": "Actions de Compétence Non Groupées",
"tokenActionHud.pf2e.takeBreather": "Prendre une Pause",
"tokenActionHud.pf2e.toggle": "Basculer"
"tokenActionHud.pf2e.toggle": "Basculer",
"tokenActionHud.pf2e.treasure": "Trésor",
"tokenActionHud.pf2e.weapons": "Armes"
}
9 changes: 8 additions & 1 deletion languages/it.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Armatura",
"tokenActionHud.pf2e.attribute": "Attributo",
"tokenActionHud.pf2e.attributes": "Attributi",
"tokenActionHud.pf2e.consumables": "Consumabili",
"tokenActionHud.pf2e.containers": "Contenitori",
"tokenActionHud.pf2e.equipment": "Attrezzatura",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inventario",
"tokenActionHud.pf2e.noAmmo": "Nessuna Munizione",
"tokenActionHud.pf2e.rests": "Riposo",
"tokenActionHud.pf2e.save": "Salva",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Azioni di Abilità Raggruppate",
"tokenActionHud.pf2e.skillActionsUngrouped": "Azioni di Abilità Non Raggruppate",
"tokenActionHud.pf2e.takeBreather": "Prenditi una pausa",
"tokenActionHud.pf2e.toggle": "Attiva/Disattiva"
"tokenActionHud.pf2e.toggle": "Attiva/Disattiva",
"tokenActionHud.pf2e.treasure": "Tesoro",
"tokenActionHud.pf2e.weapons": "Armi"
}
9 changes: 8 additions & 1 deletion languages/ja.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "防具",
"tokenActionHud.pf2e.attribute": "属性",
"tokenActionHud.pf2e.attributes": "属性",
"tokenActionHud.pf2e.consumables": "消耗品",
"tokenActionHud.pf2e.containers": "コンテナ",
"tokenActionHud.pf2e.equipment": "装備",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "インベントリ",
"tokenActionHud.pf2e.noAmmo": "弾薬なし",
"tokenActionHud.pf2e.rests": "休憩",
"tokenActionHud.pf2e.save": "保存",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "グループ化されたスキル行動",
"tokenActionHud.pf2e.skillActionsUngrouped": "グループ化されていないスキル行動",
"tokenActionHud.pf2e.takeBreather": "一息入れる",
"tokenActionHud.pf2e.toggle": "トグル"
"tokenActionHud.pf2e.toggle": "トグル",
"tokenActionHud.pf2e.treasure": "宝物",
"tokenActionHud.pf2e.weapons": "武器"
}
9 changes: 8 additions & 1 deletion languages/ko.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "갑옷",
"tokenActionHud.pf2e.attribute": "속성",
"tokenActionHud.pf2e.attributes": "속성",
"tokenActionHud.pf2e.consumables": "소모품",
"tokenActionHud.pf2e.containers": "컨테이너",
"tokenActionHud.pf2e.equipment": "장비",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "인벤토리",
"tokenActionHud.pf2e.noAmmo": "탄약 없음",
"tokenActionHud.pf2e.rests": "휴식",
"tokenActionHud.pf2e.save": "저장",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "그룹화된 스킬 동작",
"tokenActionHud.pf2e.skillActionsUngrouped": "그룹화되지 않은 스킬 동작",
"tokenActionHud.pf2e.takeBreather": "한숨 돌리기",
"tokenActionHud.pf2e.toggle": "토글"
"tokenActionHud.pf2e.toggle": "토글",
"tokenActionHud.pf2e.treasure": "보물",
"tokenActionHud.pf2e.weapons": "무기"
}
9 changes: 8 additions & 1 deletion languages/pl.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "Zbroja",
"tokenActionHud.pf2e.attribute": "Atrybut",
"tokenActionHud.pf2e.attributes": "Atrybuty",
"tokenActionHud.pf2e.consumables": "Artykuły spożywcze",
"tokenActionHud.pf2e.containers": "Kontenery",
"tokenActionHud.pf2e.equipment": "Sprzęt",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "Inwentarz",
"tokenActionHud.pf2e.noAmmo": "Brak amunicji",
"tokenActionHud.pf2e.rests": "Odpoczynek",
"tokenActionHud.pf2e.save": "Zapisz",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "Grupowane działania umiejętności",
"tokenActionHud.pf2e.skillActionsUngrouped": "Niezgrupowane działania umiejętności",
"tokenActionHud.pf2e.takeBreather": "Zrób przerwę",
"tokenActionHud.pf2e.toggle": "Przełącz"
"tokenActionHud.pf2e.toggle": "Przełącz",
"tokenActionHud.pf2e.treasure": "Skarby",
"tokenActionHud.pf2e.weapons": "Bronie"
}
9 changes: 8 additions & 1 deletion languages/zh-tw.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"tokenActionHud.pf2e.armor": "盔甲",
"tokenActionHud.pf2e.attribute": "屬性",
"tokenActionHud.pf2e.attributes": "屬性",
"tokenActionHud.pf2e.consumables": "消耗品",
"tokenActionHud.pf2e.containers": "容器",
"tokenActionHud.pf2e.equipment": "裝備",
"tokenActionHud.pf2e.heroAction": "Hero Action",
"tokenActionHud.pf2e.heroActions": "Hero Actions",
"tokenActionHud.pf2e.inventory": "庫存",
"tokenActionHud.pf2e.noAmmo": "無彈藥",
"tokenActionHud.pf2e.rests": "休息",
"tokenActionHud.pf2e.save": "保存",
Expand Down Expand Up @@ -33,5 +38,7 @@
"tokenActionHud.pf2e.skillActionsGrouped": "分組的技能行動",
"tokenActionHud.pf2e.skillActionsUngrouped": "未分組的技能行動",
"tokenActionHud.pf2e.takeBreather": "休息一下",
"tokenActionHud.pf2e.toggle": "切換"
"tokenActionHud.pf2e.toggle": "切換",
"tokenActionHud.pf2e.treasure": "寶藏",
"tokenActionHud.pf2e.weapons": "武器"
}
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
"type": "system",
"compatibility": [
{
"minimum": "4.6.4",
"verified": "5.9.3"
"minimum": "5.10.0",
"verified": "5.10.3"
}
]
}
Expand Down
14 changes: 2 additions & 12 deletions scripts/action-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,6 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
* Build elemental blasts
*/
async #buildElementalBlasts () {
if (game.system.version < '5.4.0') return

const actionType = 'elementalBlast'

// Create parent group data
Expand Down Expand Up @@ -1375,11 +1373,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
const isMap = `${roll}`.includes(this.mapLabel)
let modifier
if (isMap) {
if ((game.system.version < '5.2.0')) {
modifier = coreModule.api.Utils.getModifier(blast.statistic.mod + parseInt(`${roll}`.split(' ')[1]))
} else {
modifier = `${roll}`.split(' ')[0]
}
modifier = `${roll}`.split(' ')[0]
} else {
modifier = `${roll}`.replace(coreModule.api.Utils.i18n('PF2E.WeaponStrikeLabel'), '').replace(' ', '')
}
Expand Down Expand Up @@ -1564,11 +1558,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
const isMap = variant.label.includes(this.mapLabel)
let modifier
if (isMap) {
if ((game.system.version < '5.2.0')) {
modifier = coreModule.api.Utils.getModifier(strike.totalModifier + parseInt(variant.label.split(' ')[1]))
} else {
modifier = variant.label.split(' ')[0]
}
modifier = variant.label.split(' ')[0]
} else {
modifier = variant.label.replace(coreModule.api.Utils.i18n('PF2E.WeaponStrikeLabel'), '').replace(' ', '')
}
Expand Down
14 changes: 7 additions & 7 deletions scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,20 @@ export const GROUP = {
passives: { id: 'passives', name: 'PF2E.NPC.PassivesLabel', type: 'system' },
skillActionsGrouped: { id: 'skill-actions-grouped', name: 'tokenActionHud.pf2e.skillActions', listName: 'tokenActionHud.pf2e.skillActionsGrouped', type: 'system' },
skillActionsUngrouped: { id: 'skill-actions-ungrouped', name: 'tokenActionHud.pf2e.skillActions', listName: 'tokenActionHud.pf2e.skillActionsUngrouped', type: 'system', settings: { sort: true } },
weapons: { id: 'weapons', name: 'PF2E.InventoryWeaponsHeader', type: 'system' },
armor: { id: 'armor', name: 'PF2E.InventoryArmorHeader', type: 'system' },
equipment: { id: 'equipment', name: 'PF2E.InventoryEquipmentHeader', type: 'system' },
consumables: { id: 'consumables', name: 'PF2E.InventoryConsumablesHeader', type: 'system' },
containers: { id: 'containers', name: 'PF2E.InventoryBackpackHeader', type: 'system' },
treasure: { id: 'treasure', name: 'PF2E.InventoryTreasureHeader', type: 'system' },
weapons: { id: 'weapons', name: 'tokenActionHud.pf2e.weapons', type: 'system' },
armor: { id: 'armor', name: 'tokenActionHud.pf2e.armor', type: 'system' },
equipment: { id: 'equipment', name: 'tokenActionHud.pf2e.equipment', type: 'system' },
consumables: { id: 'consumables', name: 'tokenActionHud.pf2e.consumables', type: 'system' },
containers: { id: 'containers', name: 'tokenActionHud.pf2e.containers', type: 'system' },
treasure: { id: 'treasure', name: 'tokenActionHud.pf2e.treasure', type: 'system' },
ancestryFeatures: { id: 'ancestry-features', name: 'PF2E.FeaturesAncestryHeader', type: 'system' },
classFeatures: { id: 'class-features', name: 'PF2E.FeaturesClassHeader', type: 'system' },
ancestryFeats: { id: 'ancestry-feats', name: 'PF2E.FeatAncestryHeader', type: 'system' },
classFeats: { id: 'class-feats', name: 'PF2E.FeatClassHeader', type: 'system' },
skillFeats: { id: 'skill-feats', name: 'PF2E.FeatSkillHeader', type: 'system' },
generalFeats: { id: 'general-feats', name: 'PF2E.FeatGeneralHeader', type: 'system' },
bonusFeats: { id: 'bonus-feats', name: 'PF2E.FeatBonusHeader', type: 'system' },
spells: { id: 'spells', name: 'PF2E.SpellLabelPlural', type: 'system' },
spells: { id: 'spells', name: 'PF2E.Item.Spell.Plural', type: 'system' },
heroPoints: { id: 'hero-points', name: 'PF2E.HeroPointsLabel', type: 'system' },
initiative: { id: 'initiative', name: 'PF2E.InitiativeLabel', type: 'system' },
perceptionCheck: { id: 'perception-check', name: 'PF2E.PerceptionLabel', type: 'system' },
Expand Down
4 changes: 2 additions & 2 deletions scripts/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
{
nestId: 'feats',
id: 'feats',
name: coreModule.api.Utils.i18n('PF2E.TabFeatsLabel'),
name: coreModule.api.Utils.i18n('PF2E.Item.Feat.Plural'),
groups: [
{ ...groups.ancestryFeatures, nestId: 'feats_ancestry-features' },
{ ...groups.classFeatures, nestId: 'feats_class-features' },
Expand All @@ -73,7 +73,7 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
{
nestId: 'spells',
id: 'spells',
name: coreModule.api.Utils.i18n('PF2E.SpellLabelPlural'),
name: coreModule.api.Utils.i18n('PF2E.Item.Spell.Plural'),
groups: [
{ ...groups.spells, nestId: 'spells_spells' }
]
Expand Down
9 changes: 2 additions & 7 deletions scripts/roll-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,8 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
* @param {object} actor The actor
*/
#rollFamiliarAttack (event, actor) {
if (game.system.version >= '5.4.1') {
const args = { rollMode: this.rollMode, skipDialog: this.skipDialog }
actor.attackStatistic.roll(args)
} else {
const options = actor.getRollOptions(['all', 'attack'])
actor.system.attack.roll({ event, options })
}
const args = { rollMode: this.rollMode, skipDialog: this.skipDialog }
actor.attackStatistic.roll(args)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/token-action-hud-pf2e.min.js

Large diffs are not rendered by default.

0 comments on commit 2e89fde

Please sign in to comment.