add 'core:chat' event
This commit is contained in:
parent
88ed15c6d8
commit
b0a8e8e001
@ -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…
x
Reference in New Issue
Block a user