For now I have ended up with this (a kind of a mix):
Lua Code:
local FoulBaitLeft, FoulSBaitLeft, RiverBaitLeft, RiverSBaitLeft = 0, 0, 0, 0
local OceanBaitLeft, OceanSBaitLeft, LakeBaitLeft, LakeSBaitLeft = 0, 0, 0, 0
local GeneralBait = 0
if DestinationsSV.filters[PINS_FISHING_SHOW_BAIT_LEFT] then
local lureIndex = GetFishingLure()
local numLures = GetNumFishingLures()
for lureIndex=1, numLures do
local name, icon, stack, _, _ = GetFishingLureInfo(lureIndex)
if string.find(icon, "centipede") then --Crawlers
FoulBaitLeft = stack
elseif string.find(icon, "fish_roe") then --Fish Roe
FoulSBaitLeft = stack
elseif string.find(icon, "torchbug") then --Insect Parts
RiverBaitLeft = stack
elseif string.find(icon, "shad") then --Shad
RiverSBaitLeft = stack
elseif string.find(icon, "worms") then --Worms
OceanBaitLeft = stack
elseif string.find(icon, "fish_tail") and not (string.find(name, "simple") or string.find(name, "einfacher") or string.find(name, "appāt")) then --Chub
OceanSBaitLeft = stack
elseif string.find(icon, "guts") then --Guts
LakeBaitLeft = stack
elseif string.find(icon, "river_betty") then --Minnow
LakeSBaitLeft = stack
elseif string.find(icon, "fish_tail") and (string.find(name, "simple") or string.find(name, "einfacher") or string.find(name, "appāt")) then --Simle Bait
GeneralBait = stack
end
end
end
The reason for name comparison is that I found out that Chub and Simple Bat use the same icon.
Testing it right now
Edit: I am slow too lol