mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
add console.log(...)
This commit is contained in:
parent
dd027e38fe
commit
e8ea34fa31
2 changed files with 19 additions and 6 deletions
|
|
@ -38,12 +38,7 @@ function submit(text)
|
|||
document.log.caret = -1
|
||||
local status, result = pcall(function() return console.execute(text) end)
|
||||
if result ~= nil then
|
||||
local prevtext = document.log.text
|
||||
if #prevtext == 0 then
|
||||
document.log:paste(tostring(result))
|
||||
else
|
||||
document.log:paste('\n'..tostring(result))
|
||||
end
|
||||
console.log(result)
|
||||
end
|
||||
document.prompt.text = ""
|
||||
document.prompt.focused = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue