mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
commands results and variables
This commit is contained in:
parent
0a45987811
commit
5b2b89c778
7 changed files with 39 additions and 8 deletions
|
|
@ -1,3 +1,15 @@
|
|||
function submit(text)
|
||||
local x,y,z = player.get_pos(0)
|
||||
console.set('pos.x', x)
|
||||
console.set('pos.y', y)
|
||||
console.set('pos.z', z)
|
||||
local status, result = pcall(function() return console.execute(text) end)
|
||||
if result ~= nil then
|
||||
document.log.text = document.log.text..tostring(result)..'\n'
|
||||
end
|
||||
document.prompt.text = ""
|
||||
end
|
||||
|
||||
function on_open()
|
||||
document.prompt.focused = true
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue