Made this gsub case insensitive so it doesn't break in case the mod's filelist has an incorrect case
This commit is contained in:
@@ -78,12 +78,19 @@ end
|
|||||||
local QueueAutorun = ExecutionQueue()
|
local QueueAutorun = ExecutionQueue()
|
||||||
local QueueForcedAutorun = ExecutionQueue()
|
local QueueForcedAutorun = ExecutionQueue()
|
||||||
|
|
||||||
|
local function nocase(s)
|
||||||
|
s = string.gsub(s, "%a", function(c)
|
||||||
|
return string.format("[%s%s]", string.lower(c), string.upper(c))
|
||||||
|
end)
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
|
||||||
local function ProcessPackages(packages, fn)
|
local function ProcessPackages(packages, fn)
|
||||||
for pkg in packages do
|
for pkg in packages do
|
||||||
if pkg then
|
if pkg then
|
||||||
local pkgPath = pkg.Path
|
local pkgPath = pkg.Path
|
||||||
:gsub("\\", "/")
|
:gsub("\\", "/")
|
||||||
:gsub("/filelist.xml", "")
|
:gsub(nocase("/filelist.xml"), "")
|
||||||
fn(pkg, pkgPath)
|
fn(pkg, pkgPath)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -165,7 +172,7 @@ elseif Game.IsMultiplayer then
|
|||||||
local id = package.UgcId
|
local id = package.UgcId
|
||||||
local hash = package.Hash and package.Hash.StringRepresentation or ""
|
local hash = package.Hash and package.Hash.StringRepresentation or ""
|
||||||
|
|
||||||
if id == none then id = 0 end
|
if id == nil then id = 0 end
|
||||||
|
|
||||||
message.WriteString(package.Name)
|
message.WriteString(package.Name)
|
||||||
message.WriteString(package.ModVersion)
|
message.WriteString(package.ModVersion)
|
||||||
|
|||||||
Reference in New Issue
Block a user