mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-14 16:02:57 +00:00

Unfortunately we can't apply the config changes due to backwards compatibility. This'll be something we may need to PR into Forge. CraftTweaker support still needs to be added.
27 lines
550 B
Lua
27 lines
550 B
Lua
local tArgs = { ... }
|
|
local sTopic
|
|
if #tArgs > 0 then
|
|
sTopic = tArgs[1]
|
|
else
|
|
sTopic = "intro"
|
|
end
|
|
|
|
if sTopic == "index" then
|
|
print( "Help topics available:" )
|
|
local tTopics = help.topics()
|
|
textutils.pagedTabulate( tTopics )
|
|
return
|
|
end
|
|
|
|
local sFile = help.lookup( sTopic )
|
|
local file = sFile ~= nil and io.open( sFile ) or nil
|
|
if file then
|
|
local sContents = file:read("*a")
|
|
file:close()
|
|
|
|
local _, nHeight = term.getSize()
|
|
textutils.pagedPrint( sContents, nHeight - 3 )
|
|
else
|
|
print( "No help available" )
|
|
end
|