Skip to content

Commit

Permalink
case insensitive weapon name matching
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Jul 3, 2023
1 parent 60f5657 commit 88d36fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<loadorder>34</loadorder>
</properties>

<announcement text="https://github.com/bmos/FG-PFRPG-Ammunition-Manager\nAmmunition Manager v4.3:\nThis extension aids in tracking ammunition and whether ranged weapons are loaded." font="emotefont" icon="archery_ammomanager" />
<announcement text="https://github.com/bmos/FG-PFRPG-Ammunition-Manager\nAmmunition Manager v4.3-hotfix.1:\nThis extension aids in tracking ammunition and whether ranged weapons are loaded." font="emotefont" icon="archery_ammomanager" />

<base>
<!-- Campaign Records -->
Expand Down
2 changes: 1 addition & 1 deletion scripts/manager_ammunition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ local function writeAmmoRemaining(nodeWeapon, nodeAmmoLink, nAmmoRemaining, sWea
end

local function trackWeaponAmmo(rSource, rRoll, nodeWeapon, sWeaponNameFromSource)
if sWeaponNameFromSource ~= DB.getValue(nodeWeapon, 'name', '') then return false end
if sWeaponNameFromSource:lower() ~= DB.getValue(nodeWeapon, 'name', ''):lower() then return false end
if not rRoll.sDesc:match('%[ATTACK%s#?%d*%s?%(R%)%]') then return false end
if DB.getValue(nodeWeapon, 'type', 0) == 0 then return false end

Expand Down

0 comments on commit 88d36fd

Please sign in to comment.