refactor(chest_sorter): 将主函数改为可变参数并优化参数检查

使用可变参数函数提高灵活性,同时将参数解构到局部变量中避免重复计算
This commit is contained in:
2025-09-05 21:50:33 +08:00
parent d95eba3cf8
commit bd524aabf1
2 changed files with 4 additions and 3 deletions

View File

@@ -237,9 +237,10 @@ local function showTutorial()
end
-- 主程序
local function main()
local function main(...) -- 改为可变参数函数
-- 检查是否需要显示教程
if #({...}) > 0 and ({...})[1] == "tutorial" then
local args = {...}
if #args > 0 and args[1] == "tutorial" then
showTutorial()
return
end

View File

@@ -1,5 +1,5 @@
-- LeonOS installer
local INSTALLER_VERSION = "0.3.8 Beta 18"
local INSTALLER_VERSION = "0.3.8 Beta 19"
local DEFAULT_ROM_DIR = "/leonos"
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")