Skip to content

Commit 88d36fd

Browse files
author
Wil Thieme
committed
case insensitive weapon name matching
1 parent 60f5657 commit 88d36fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extension.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<loadorder>34</loadorder>
2727
</properties>
2828

29-
<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" />
29+
<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" />
3030

3131
<base>
3232
<!-- Campaign Records -->

scripts/manager_ammunition.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ local function writeAmmoRemaining(nodeWeapon, nodeAmmoLink, nAmmoRemaining, sWea
164164
end
165165

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

0 commit comments

Comments
 (0)