From d0480687e95083c279013f6592ecaa7a1139fcc5 Mon Sep 17 00:00:00 2001 From: h1n1 Date: Mon, 13 Jul 2026 16:40:05 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B8=D0=BD=D0=B8=D0=BC=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B9=20startup.lua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Пока что здесь только проверка бут-скриптов... --- startup.lua | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 startup.lua diff --git a/startup.lua b/startup.lua new file mode 100644 index 0000000..de7d99f --- /dev/null +++ b/startup.lua @@ -0,0 +1,32 @@ +-- H1N1's Framework +print("--- H1N1's Framework ---") +print() + +-- Colored print for code readability +local function colorprint(text, clr) + local old = text.getTextColor() + text.setTextColor(clr) + print(text) + text.setTextColor(old) +end + +-- Boot folder check +if fs.exists("/boot") then + for _, name in pairs(fs.list("/boot")) do + write(("- %s: "):format(name)) + + if name:sub(#name-3) == ".lua" then + local result, error = pcall(dofile, "/boot/" .. name) + + if not result then + printcolor("ERR", colors.red) + printcolor(error, colors.gray) + else + printcolor("OK", colors.lime) + end + else + printcolor("???", colors.yellow) + end + end +end +