Added EID:ReplaceVariableStr() to make text variable replacements easier

This commit is contained in:
Wofsauge committed 2024-06-03 22:57:38 +02:00
1 parent 2fda4452c5
commit 76a3b18179
5 files changed
+19 -13

No files matched your search

+6
View File
@@ -2048,3 +2048,9 @@ function EID:UpdateAllPlayerPassiveItems()
end
return listUpdatedForPlayers
end
-- Replaces Variable placeholders in string with a given value
-- Example: "My {1} message" --> "My test message"
function EID:ReplaceVariableStr(str, varID, newString)
return str:gsub("{"..varID.."}", newString)
end