Print index of note
This commit is contained in:
@@ -106,14 +106,18 @@ function shared.Noter.Init()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param index number
|
||||||
---@param note Note
|
---@param note Note
|
||||||
local function PrintNote(note)
|
local function PrintNote(index, note)
|
||||||
print(string.format("[%s] %s: %s", note.source, note.date, note.note))
|
if Heimdall_Data.config.noter.debug then
|
||||||
|
print(string.format("[%s] Printing note at index %d for: %s", ModuleName, index, note.source))
|
||||||
|
print(string.format("[%s] [%s][%d] %s: %s", ModuleName, note.source, index, note.date, note.note))
|
||||||
|
end
|
||||||
---@type Message
|
---@type Message
|
||||||
local msg = {
|
local msg = {
|
||||||
channel = "CHANNEL",
|
channel = "CHANNEL",
|
||||||
data = Heimdall_Data.config.noter.masterChannel,
|
data = Heimdall_Data.config.noter.masterChannel,
|
||||||
message = string.format("[%s] %s: %s", note.source, note.date, note.note)
|
message = string.format("[%s][%d] %s: %s", note.source, index, note.date, note.note)
|
||||||
}
|
}
|
||||||
table.insert(shared.messenger.queue, msg)
|
table.insert(shared.messenger.queue, msg)
|
||||||
end
|
end
|
||||||
@@ -136,7 +140,7 @@ function shared.Noter.Init()
|
|||||||
print(string.format("[%s] Printing notes from %d to %d for: %s", ModuleName, start, finish, name))
|
print(string.format("[%s] Printing notes from %d to %d for: %s", ModuleName, start, finish, name))
|
||||||
end
|
end
|
||||||
for i = start, finish do
|
for i = start, finish do
|
||||||
PrintNote(notes[i])
|
PrintNote(i, notes[i])
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -177,7 +181,7 @@ function shared.Noter.Init()
|
|||||||
print(string.format("[%s] Printing note %s at index %s", ModuleName, name, i))
|
print(string.format("[%s] Printing note %s at index %s", ModuleName, name, i))
|
||||||
shared.dumpTable(Heimdall_Data.config.notes[name][i])
|
shared.dumpTable(Heimdall_Data.config.notes[name][i])
|
||||||
end
|
end
|
||||||
PrintNote(Heimdall_Data.config.notes[name][i])
|
PrintNote(i, Heimdall_Data.config.notes[name][i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user