20 lines
515 B
Lua
20 lines
515 B
Lua
|
|
local recs = jarvis.memory.all()
|
|||
|
|
if #recs == 0 then
|
|||
|
|
jarvis.speak("Я пока ничего о вас не запомнил.")
|
|||
|
|
jarvis.audio.play_ok()
|
|||
|
|
return { chain = false }
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
local count = #recs
|
|||
|
|
local sample = math.min(count, 5)
|
|||
|
|
local line = string.format("Помню %d фактов. Первые: ", count)
|
|||
|
|
for i = 1, sample do
|
|||
|
|
line = line .. recs[i].key
|
|||
|
|
if i < sample then line = line .. ", " end
|
|||
|
|
end
|
|||
|
|
line = line .. "."
|
|||
|
|
|
|||
|
|
jarvis.speak(line)
|
|||
|
|
jarvis.audio.play_ok()
|
|||
|
|
return { chain = false }
|