This commit is contained in:
龙腾猫跃
2025-11-06 23:10:47 +08:00
parent efd480f06c
commit ad757f54b7
13 changed files with 322 additions and 115 deletions
@@ -14,13 +14,13 @@ Public Module ModBase
#Region "声明"
'下列版本信息由更新器自动修改
Public Const VersionBaseName As String = "2.11.1" '不含分支前缀的显示用版本名
Public Const VersionStandardCode As String = "2.11.1." & VersionBranchCode '标准格式的四段式版本号
Public Const VersionBaseName As String = "2.11.2" '不含分支前缀的显示用版本名
Public Const VersionStandardCode As String = "2.11.2." & VersionBranchCode '标准格式的四段式版本号
Public Const CommitHash As String = "" 'Commit Hash,由 GitHub Workflow 自动替换
#If BETA Then
Public Const VersionCode As Integer = 372 'Release
#Else
Public Const VersionCode As Integer = 374 'Snapshot
Public Const VersionCode As Integer = 375 'Snapshot
#End If
'自动生成的版本信息
Public Const VersionDisplayName As String = VersionBranchName & " " & VersionBaseName
@@ -3169,12 +3169,12 @@ Retry:
''' <summary>
''' 将数组随机打乱。
''' </summary>
Public Function Shuffle(Of T)(array As IList(Of T)) As IList(Of T)
Shuffle = New List(Of T)
Do While array.Any
Dim i As Integer = RandomInteger(0, array.Count - 1)
Shuffle.Add(array(i))
array.RemoveAt(i)
<Extension> Public Iterator Function Shuffle(Of T)(Raw As IEnumerable(Of T)) As IEnumerable(Of T)
Dim RawCopy As New List(Of T)(Raw)
Do While RawCopy.Any
Dim i As Integer = RandomInteger(0, RawCopy.Count - 1)
Yield RawCopy(i)
RawCopy.RemoveAt(i)
Loop
End Function