fix: typo
This commit is contained in:
@@ -208,30 +208,30 @@ local function drawLogs(x0, y0, x1, y1)
|
|||||||
local drawnLines = 0
|
local drawnLines = 0
|
||||||
for i = #log.bufer - logOffset, 1, -1 do
|
for i = #log.bufer - logOffset, 1, -1 do
|
||||||
if drawnLines > y then break end
|
if drawnLines > y then break end
|
||||||
|
|
||||||
local entry = log.buffer[i]
|
local entry = log.buffer[i]
|
||||||
local format = logTypes[entry.type]
|
local format = logTypes[entry.type]
|
||||||
|
|
||||||
term.setCursorPos(1, endY - drawnLines)
|
term.setCursorPos(1, endY - drawnLines)
|
||||||
|
|
||||||
ocal prevColourBg = term.getBackgroundColour()
|
local prevColourBg = term.getBackgroundColour()
|
||||||
local prevColourFg = term.getTextColour()
|
local prevColourFg = term.getTextColour()
|
||||||
|
|
||||||
term.setBackgroundColour(format["BG"])
|
term.setBackgroundColour(format["BG"])
|
||||||
term.setTextColour(format["FG"])
|
term.setTextColour(format["FG"])
|
||||||
term.write(("[%s]"):format(entry.type))
|
term.write(("[%s]"):format(entry.type))
|
||||||
|
|
||||||
if format["AffectContent"] then
|
if format["AffectContent"] then
|
||||||
term.write((" %s\n"):format(entry.message))
|
term.write((" %s\n"):format(entry.message))
|
||||||
term.setBackgroundColour(prevColourBg)
|
term.setBackgroundColour(prevColourBg)
|
||||||
term.setTextColour(prevColourFg)
|
term.setTextColour(prevColourFg)
|
||||||
else
|
else
|
||||||
term.setBackgroundColour(prevColourBg)
|
term.setBackgroundColour(prevColourBg)
|
||||||
term.setTextColour(prevColourFg)
|
term.setTextColour(prevColourFg)
|
||||||
term.write((" %s\n"):format(entry.message))
|
term.write((" %s\n"):format(entry.message))
|
||||||
end
|
end
|
||||||
|
|
||||||
drawnLines = drawnLines + 1
|
drawnLines = drawnLines + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user