mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-21 02:03:13 +00:00
Add .txt extension to all help files
This commit is contained in:
parent
d822147704
commit
e8ecf5dcd5
src/main/resources/assets/computercraft/lua/rom
apis
help
adventure.txtalias.txtapis.txtbg.txtbit.txtbundled.txtcd.txtchangelog.txtchat.txtclear.txtcolors.txtcolours.txtcommands.txtcommandsapi.txtcopy.txtcoroutine.txtcraft.txtcredits.txtdance.txtdelete.txtdisk.txtdj.txtdrive.txtdrives.txtearth.txtedit.txteject.txtequip.txtevents.txtexcavate.txtexec.txtexit.txtfalling.txtfg.txtfs.txtgo.txtgps.txtgpsapi.txthello.txthelp.txthelpapi.txthttp.txtid.txtintro.txtio.txtkeys.txtlabel.txtlist.txtlua.txtmath.txtmkdir.txtmodems.txtmonitor.txtmonitors.txtmove.txtmultishell.txtos.txtpaint.txtpaintutils.txtparallel.txtpastebin.txtperipheral.txtperipherals.txtpocket.txtprinters.txtprogramming.txtprograms.txtreboot.txtredirection.txtrednet.txtredstone.txtredstoneapi.txtrefuel.txtrename.txtrepeat.txtrs.txtset.txtsettings.txtshell.txtshellapi.txtshutdown.txtsleep.txtspeakers.txtstring.txttable.txtterm.txttextutils.txttime.txttunnel.txtturn.txtturtle.txttype.txtunequip.txtvector.txtwget.txtwhatsnew.txtwindow.txtworkbench.txtworm.txt
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user