From b94c70762fdde5c8c6d30f7900eecaae90fb7143 Mon Sep 17 00:00:00 2001 From: kurasawa Date: Tue, 16 Apr 2024 18:52:36 +0900 Subject: [PATCH] =?UTF-8?q?=20[=E8=A3=9C=E8=B6=B3]moddable=E3=81=AF"4.1"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firmware/stackchan/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/stackchan/main.ts b/firmware/stackchan/main.ts index 868fed6..c9780c7 100644 --- a/firmware/stackchan/main.ts +++ b/firmware/stackchan/main.ts @@ -104,11 +104,11 @@ async function main() { trace(`WiFi connection failed: ${msg}`) }) let { onRobotCreated, onLaunch } = defaultMod - // if (Modules.has('mod')) { - // const mod = Modules.importNow('mod') as StackchanMod - // onRobotCreated = mod.onRobotCreated ?? onRobotCreated - // onLaunch = mod.onLaunch ?? onLaunch - // } + if (Modules.has('mod')) { + const mod = Modules.importNow('mod') as StackchanMod + onRobotCreated = mod.onRobotCreated ?? onRobotCreated + onLaunch = mod.onLaunch ?? onLaunch + } trace('Kurasawa changed TX7 RX6') const shouldRobotCreate = await onLaunch?.() if (shouldRobotCreate !== false) {