sc3-rom-dump/rom/programs/command/commands.lua

20 lines
398 B
Lua
Raw Permalink Normal View History

2024-01-15 10:36:50 +01:00
-- SPDX-FileCopyrightText: 2017 Daniel Ratcliffe
--
-- SPDX-License-Identifier: LicenseRef-CCPL
if not commands then
printError("Requires a Command Computer.")
return
end
local tCommands = commands.list()
table.sort(tCommands)
if term.isColor() then
term.setTextColor(colors.green)
end
print("Available commands:")
term.setTextColor(colors.white)
textutils.pagedTabulate(tCommands)