1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00

Add .txt extension to all help files

This commit is contained in:
Wilma456 2017-05-20 12:20:27 +02:00
parent d822147704
commit e8ecf5dcd5
100 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,8 @@ function lookup( _sTopic )
sPath = fs.combine( sPath, _sTopic )
if fs.exists( sPath ) and not fs.isDir( sPath ) then
return sPath
elseif fs.exists( sPath..".txt" ) and not fs.isDir( sPath..".txt" ) then
return sPath..".txt"
end
end
@ -35,6 +37,9 @@ function topics()
for n,sFile in pairs( tList ) do
if string.sub( sFile, 1, 1 ) ~= "." 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
end
end