mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
add 'write to read-only entry point' warnings
This commit is contained in:
parent
f22108f6b4
commit
71eadb2fde
2 changed files with 30 additions and 14 deletions
|
|
@ -1,12 +1,19 @@
|
|||
history = session.get_entry("commands_history")
|
||||
history_pointer = #history
|
||||
|
||||
local warnings_all = {}
|
||||
|
||||
local warning_id = 0
|
||||
events.on("core:warning", function (wtype, text)
|
||||
local full = wtype..": "..text
|
||||
if table.has(warnings_all, full) then
|
||||
return
|
||||
end
|
||||
document.problemsLog:add(gui.template("problem", {
|
||||
type="warning", text=wtype..": "..text, id=tostring(warning_id)
|
||||
type="warning", text=full, id=tostring(warning_id)
|
||||
}))
|
||||
warning_id = warning_id + 1
|
||||
table.insert(warnings_all, full)
|
||||
end)
|
||||
|
||||
function setup_variables()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue