from retail

This commit is contained in:
Bunny67
2021-01-21 00:26:49 +03:00
parent 2994ddedbb
commit 0c4ecc60a2
7 changed files with 41 additions and 17 deletions
+5 -3
View File
@@ -138,9 +138,11 @@ function TestForLongString(trigger, arg)
local name = arg.name;
local test;
if(trigger[name.."_operator"] == "==") then
test = "("..name.."==\""..trigger[name].."\")";
else
test = "("..name.." and "..name..":"..trigger[name.."_operator"]:format(trigger[name])..")";
test = ("(%s == %q)"):format(name, trigger[name])
elseif(trigger[name.."_operator"] == "find('%s')") then
test = "(" .. name .. " and " .. name .. string.format(":find(%q)", trigger[name]) .. ")"
elseif(trigger[name.."_operator"] == "match('%s')") then
test = "(" .. name .. " and " .. name .. string.format(":match(%q)", trigger[name]) .. ")"
end
return test;
end