mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-13 02:40:28 +00:00
Add .txt extension to all help files
This commit is contained in:
parent
d822147704
commit
e8ecf5dcd5
@ -15,6 +15,8 @@ function lookup( _sTopic )
|
|||||||
sPath = fs.combine( sPath, _sTopic )
|
sPath = fs.combine( sPath, _sTopic )
|
||||||
if fs.exists( sPath ) and not fs.isDir( sPath ) then
|
if fs.exists( sPath ) and not fs.isDir( sPath ) then
|
||||||
return sPath
|
return sPath
|
||||||
|
elseif fs.exists( sPath..".txt" ) and not fs.isDir( sPath..".txt" ) then
|
||||||
|
return sPath..".txt"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -35,6 +37,9 @@ function topics()
|
|||||||
for n,sFile in pairs( tList ) do
|
for n,sFile in pairs( tList ) do
|
||||||
if string.sub( sFile, 1, 1 ) ~= "." then
|
if string.sub( sFile, 1, 1 ) ~= "." then
|
||||||
if not fs.isDir( fs.combine( sPath, sFile ) ) then
|
if not fs.isDir( fs.combine( sPath, sFile ) ) then
|
||||||
|
if #sFile > 4 and sFile:sub(-4) == ".txt" then
|
||||||
|
sFile = sFile:sub(1,-5)
|
||||||
|
end
|
||||||
tItems[ sFile ] = true
|
tItems[ sFile ] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user