This commit is contained in:
OTCv8
2020-06-09 18:19:20 +02:00
parent 76d6f2ce7d
commit 541e189d3f
154 changed files with 2540 additions and 1221 deletions

View File

@@ -313,6 +313,13 @@ function addLine(text, color)
table.insert(cachedLines, {text=text, color=color})
end
function terminalPrint(value)
if type(value) == "table" then
return print(json.encode(value, 2))
end
print(tostring(value))
end
function executeCommand(command)
if command == nil or #string.gsub(command, '\n', '') == 0 then return end
@@ -337,7 +344,7 @@ function executeCommand(command)
-- detect and convert commands with simple syntax
local realCommand
if string.sub(command, 1, 1) == '=' then
realCommand = 'print(tostring(' .. string.sub(command,2) .. '))'
realCommand = 'modules.client_terminal.terminalPrint(' .. string.sub(command,2) .. ')'
else
realCommand = command
end

View File

@@ -94,6 +94,7 @@ UIWindow
border-width-left: 0
border-width-top: 0
multiline: false
text-auto-submit: true
$on:
border-width-left: 1