Skip to content

Commit ecbe1c9

Browse files
committed
feat: move patch init
1 parent 5383e0a commit ecbe1c9

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/process.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ local function setup_handlers()
5858
end
5959
)
6060

61-
-- add patch structure setup
62-
Handlers.add(
63-
"setup-current-patch-iter",
64-
function () return "continue" end,
65-
function () Patch = { device = "patch@1.0" } end
66-
)
67-
6861
-- current timestamp sync
6962
-- (this is required for coroutines, so they always
7063
-- have the up-to-date timestamp and they don't have
@@ -348,6 +341,9 @@ local function setup_handlers()
348341
end
349342

350343
function process.handle(msg, env)
344+
-- reset current patch
345+
Patch = { device = "patch@1.0" }
346+
351347
-- add reply and forward actions
352348
ao.add_message_actions(msg)
353349

0 commit comments

Comments
 (0)