From 937e6bdf0cb4bc05d84f77ece79ebdfae3e82c50 Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Tue, 2 Sep 2025 16:42:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=89=88=E6=9C=AC=E5=8F=B7=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96shell=E6=AC=A2=E8=BF=8E=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将安装程序版本号从0.3.7 Beta 9更新至0.3.7 Beta 10 - 重构shell.lua中的欢迎界面显示逻辑,避免重复代码 - 统一在shell启动时显示欢迎信息和图标 --- data/computercraft/lua/rom/programs/shell.lua | 23 +++++++------------ installer.lua | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/data/computercraft/lua/rom/programs/shell.lua b/data/computercraft/lua/rom/programs/shell.lua index f5978fa..3cddc5a 100644 --- a/data/computercraft/lua/rom/programs/shell.lua +++ b/data/computercraft/lua/rom/programs/shell.lua @@ -27,24 +27,9 @@ local textutils = require("textutils") if os.version then textutils.coloredPrint(colors.yellow, os.version(), colors.white) - local image = paintutils.parseImage([[ - f f - -f f - ffff - ]]) - paintutils.drawImage(image, term.getCursorPos()) else textutils.coloredPrint(colors.yellow, rc.version(), colors.white) - local image = paintutils.parseImage([[ - f f - -f f - ffff - ]]) - paintutils.drawImage(image, term.getCursorPos()) end -textutils.coloredPrint(colors.yellow, "Welcome using the beta version of LeonOS!", colors.white) thread.vars().parentShell = thread.id() shell.init(_ENV) @@ -97,6 +82,14 @@ for _, prog in ipairs(fs.list(completions)) do end local history = {} +local image = paintutils.parseImage([[ + f f + +f f + ffff +]]) +paintutils.drawImage(image, term.getCursorPos()) +textutils.coloredPrint(colors.yellow, "Welcome using the beta version of LeonOS!", colors.white) while true do term.setTextColor(colors.yellow) rc.write("$ "..shell.dir().." >>> ") diff --git a/installer.lua b/installer.lua index e3c0ad5..522694b 100644 --- a/installer.lua +++ b/installer.lua @@ -1,5 +1,5 @@ -- LeonOS installer -local INSTALLER_VERSION = "0.3.7 Beta 9" +local INSTALLER_VERSION = "0.3.7 Beta 10" local DEFAULT_ROM_DIR = "/leonos" print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")