mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 06:47:00 +00:00
refactor(chest_sorter): 将主函数改为可变参数并优化参数检查
使用可变参数函数提高灵活性,同时将参数解构到局部变量中避免重复计算
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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..")...")
|
||||
|
||||
Reference in New Issue
Block a user