From a32bf0b79ed5822b6fe10a595ceaa77b99e47958 Mon Sep 17 00:00:00 2001 From: youzi-2333 Date: Tue, 18 Jun 2024 18:13:03 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=AE=8C=E6=88=90=20#3997=20?= =?UTF-8?q?=E9=A1=BA=E4=BE=BF=E6=8A=8A=E6=95=99=E5=AD=A6=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B9=9F=E6=94=B9=E4=BA=86=E2=80=A6=E2=80=A6=20Discussion:=20#?= =?UTF-8?q?4002?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plain Craft Launcher 2/Modules/ModEvent.vb | 1 + Plain Craft Launcher 2/Modules/ModMain.vb | 1 + Plain Craft Launcher 2/Resources/Custom.xaml | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/Plain Craft Launcher 2/Modules/ModEvent.vb b/Plain Craft Launcher 2/Modules/ModEvent.vb index aa09e79..78baafc 100644 --- a/Plain Craft Launcher 2/Modules/ModEvent.vb +++ b/Plain Craft Launcher 2/Modules/ModEvent.vb @@ -43,6 +43,7 @@ End Sub) Case "启动游戏" + If Data(0) = "$mcv" Then Data(0) = McVersionCurrent.Name If McLaunchStart(New McLaunchOptions With {.ServerIp = If(Data.Length >= 2, Data(1), Nothing), .Version = New McVersion(Data(0))}) Then Hint("正在启动 " & Data(0) & "……") diff --git a/Plain Craft Launcher 2/Modules/ModMain.vb b/Plain Craft Launcher 2/Modules/ModMain.vb index e2b797c..d495e3a 100644 --- a/Plain Craft Launcher 2/Modules/ModMain.vb +++ b/Plain Craft Launcher 2/Modules/ModMain.vb @@ -665,6 +665,7 @@ NextFile: Dim Result = Xaml.Replace("{path}", EscapeXML(Path)) Result = RegexReplaceEach(Result, Function() EscapeXML(PageOtherTest.GetRandomHint()), "\{hint\}") Result = RegexReplaceEach(Result, Function() EscapeXML(PageOtherTest.GetRandomCave()), "\{cave\}") + Result = Result.Replace("{mcv}", "$mcv") '不知道为啥,实例化 {mcv} 有可能会炸掉,只能先把它换掉,再换成版本名 Return Result End Function diff --git a/Plain Craft Launcher 2/Resources/Custom.xaml b/Plain Craft Launcher 2/Resources/Custom.xaml index f35be1d..3b59e97 100644 --- a/Plain Craft Launcher 2/Resources/Custom.xaml +++ b/Plain Craft Launcher 2/Resources/Custom.xaml @@ -80,6 +80,10 @@ Text="在 EventData 后面添加一条竖线(|),竖线后填写服务器 IP,即可在启动该版本的同时自动进入服务器。" /> + +