Skip to content
Snippets Groups Projects
Commit 48dc2337 authored by DarkGod's avatar DarkGod
Browse files

fix

parent 500f57c9
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -131,8 +131,10 @@ function _M:resolveAuto()
local auto = self.chat:get(self.cur_id).auto
if type(auto) == "function" then auto(self.npc, self.player) end
for i, a in ipairs(self.chat:get(self.cur_id).answers) do
-- use the first answer that works
if not a.cond or a.cond(self.npc, self.player) then
game:onTickEnd(function() self:use(nil, a) end)
return
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment