Skip to content

Commit

Permalink
allow other weapon types like thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Nov 5, 2021
1 parent 9914a8e commit 4ee920d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/manager_ammunition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ function ammoTracker(rSource, sDesc, sResult, bCountAll)
local nodeWeaponLink = DB.findNode(sWeaponNode)
breakWeapon(rSource, nodeWeaponLink, sWeaponName)
end
local bRangedWeapon = DB.getValue(nodeWeapon, 'type', 0) == 1;
if (sDesc:match('%[ATTACK %(R%)%]') or sDesc:match('%[ATTACK #%d+ %(R%)%]')) and bRangedWeapon then
if (sDesc:match('%[ATTACK %(R%)%]') or sDesc:match('%[ATTACK #%d+ %(R%)%]')) and DB.getValue(nodeWeapon, 'type', 0) ~= 0 then
local nMaxAmmo = DB.getValue(nodeWeapon, 'maxammo', 0);
local nAmmo = DB.getValue(nodeWeapon, 'ammo', 0) + 1;

Expand Down

0 comments on commit 4ee920d

Please sign in to comment.