mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'core:chat' event
This commit is contained in:
parent
88ed15c6d8
commit
b0a8e8e001
2 changed files with 6 additions and 1 deletions
|
|
@ -260,7 +260,7 @@ console.add_command(
|
|||
"chat text:str",
|
||||
"Send chat message",
|
||||
function (args, kwargs)
|
||||
console.log("[you] "..args[1])
|
||||
console.chat("[you] "..args[1])
|
||||
end
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,11 @@ function console.log(...)
|
|||
log_element:paste(text)
|
||||
end
|
||||
|
||||
function console.chat(...)
|
||||
console.log(...)
|
||||
events.emit("core:chat", ...)
|
||||
end
|
||||
|
||||
function gui.template(name, params)
|
||||
local text = file.read(file.find("layouts/templates/"..name..".xml"))
|
||||
for k,v in pairs(params) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue