This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,23 @@
function init()
object.setInteractive(true)
self.timer = math.random(0, 2)
end
function onInteraction(args)
local chatOptions = config.getParameter("portraitChatOptions", {})
if #chatOptions > 0 then
local chatChoice = chatOptions[math.random(1, #chatOptions)]
object.sayPortrait(chatChoice[1], chatChoice[2])
end
end
function update(dt)
self.timer = self.timer - dt
if self.timer <= 0 then
self.timer = 6
local chatOptions = config.getParameter("chatOptions", {})
if #chatOptions > 0 then
object.say(chatOptions[math.random(1, #chatOptions)])
end
end
end