Skip to content

Commit

Permalink
Fix durability Regex for tooltip parsing (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
drcrazy authored Jan 19, 2025
1 parent bb341ee commit 40070f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ end

-- Turns a game constant with "%d" placeholders into a pattern that can be used to match that string.
function PawnGameConstantIgnoredNumberPlaceholder(Text)
return gsub(PawnGameConstant(Text), "%%%%d", "%%d+")
-- gsub may return second result - amount of substitutions. Just ignore it.
local value, _ = gsub(PawnGameConstant(Text), "%%%%d", "%%d+")
return value
end

-- Escapes a string so that it can be more easily printed.
Expand Down

0 comments on commit 40070f3

Please sign in to comment.