mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-11 22:42:52 +00:00

- textures/{block,item}s -> textures/{block,item} - assets/*/{advancements,lua,recipes} -> data/*/...
27 lines
555 B
Lua
27 lines
555 B
Lua
local tArgs = { ... }
|
|
local sTopic
|
|
if #tArgs > 0 then
|
|
sTopic = tArgs[1]
|
|
else
|
|
sTopic = "intro"
|
|
end
|
|
|
|
if sTopic == "index" then
|
|
print( "Help topics availiable:" )
|
|
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
|