From 11aa0db67b7b1e979ba62edf1467b7108b4f4a94 Mon Sep 17 00:00:00 2001 From: neru Date: Thu, 8 May 2025 13:41:06 -0300 Subject: [PATCH] feat: move scan to separate command --- lua/CC Tweaked/tutel/tutel-host.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lua/CC Tweaked/tutel/tutel-host.lua b/lua/CC Tweaked/tutel/tutel-host.lua index 46c3bc7..3eef232 100644 --- a/lua/CC Tweaked/tutel/tutel-host.lua +++ b/lua/CC Tweaked/tutel/tutel-host.lua @@ -320,13 +320,22 @@ registerEventListener("key", handleConsoleKeys) function echoCommand(args) log.info(table.concat(args, " ")) end + registerConsoleCommand("echo", echoCommand) function exitCommand(args) shouldRun = false end + registerConsoleCommand("exit", exitCommand) +function scanCommand(args) + log.info("broadcasting SCAN") + sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL }) +end + +registerConsoleCommand("scan", scanCommand) + --[[ drawing functions ]] @@ -470,8 +479,6 @@ end main ]] log.general("tutel host init") -log.info("broadcasting SCAN") -sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL }) while shouldRun do updateScreen() @@ -479,4 +486,4 @@ while shouldRun do end scr.clear() -scr.setCursorBlink(false) \ No newline at end of file +scr.setCursorBlink(false)