diff --git a/settings.lua b/settings.lua index 431acb9..1b7cf17 100644 --- a/settings.lua +++ b/settings.lua @@ -45,6 +45,19 @@ Cursive:RegisterDefaults("profile", { ignorelist = {}, }) +local function splitString(str, delimiter) + local result = {} + local from = 1 + local delim_from, delim_to = string.find(str, delimiter, from) + while delim_from do + table.insert(result, string.sub(str, from, delim_from - 1)) + from = delim_to + 1 + delim_from, delim_to = string.find(str, delimiter, from) + end + table.insert(result, string.sub(str, from)) + return result +end + local barOptions = { ["showtargetindicator"] = { type = "toggle", @@ -365,7 +378,7 @@ local mobFilters = { if not v or v == "" then Cursive.db.profile.ignorelist = {} else - Cursive.db.profile.ignorelist = string.split(v, ","); + Cursive.db.profile.ignorelist = splitString(v, ","); end end, },