feat: 支持加载数据包列表(但是下不了一点)

This commit is contained in:
Pigeon0v0
2024-07-27 18:33:04 +08:00
parent f45322905f
commit c1ba65783d
4 changed files with 59 additions and 29 deletions
+2
View File
@@ -1098,6 +1098,8 @@ Install:
Return "Mod 下载 - " & Project.TranslatedName
Case CompType.ModPack
Return "整合包下载 - " & Project.TranslatedName
Case CompType.DataPack
Return "数据包下载 - " & Project.TranslatedName
Case Else 'CompType.ResourcePack
Return "资源包下载 - " & Project.TranslatedName
End Select
@@ -277,8 +277,10 @@
Type = CompType.Mod
ElseIf Website.Contains("/modpacks/") Then
Type = CompType.ModPack
Else
ElseIf Website.Contains("/resourcepacks/") Then
Type = CompType.ResourcePack
Else
Type = CompType.DataPack
End If
'Tags
Tags = New List(Of String)
@@ -325,7 +327,15 @@
Case 4480 : Tags.Add("基于地图")
Case 4481 : Tags.Add("轻量")
Case 4482 : Tags.Add("大型")
'FUTURE: Res
'数据包
Case 6946 : Tags.Add("Mod 支持")
Case 6947 : Tags.Add("杂项")
Case 6948 : Tags.Add("冒险")
Case 6949 : Tags.Add("幻想")
Case 6950 : Tags.Add("支持库")
Case 6951 : Tags.Add("科技")
Case 6952 : Tags.Add("魔法")
Case 6953 : Tags.Add("实用工具")
End Select
Next
If Not Tags.Any() Then Tags.Add("杂项")
@@ -353,6 +363,7 @@
Case "mod" : Type = CompType.Mod
Case "modpack" : Type = CompType.ModPack
Case "resourcepack" : Type = CompType.ResourcePack
Case "datapack" : Type = CompType.DataPack
End Select
'Tags & ModLoaders
Tags = New List(Of String)
@@ -391,7 +402,26 @@
Case "adventure" : Tags.Add("冒险")
Case "kitchen-sink" : Tags.Add("烹饪")
Case "lightweight" : Tags.Add("轻量")
'FUTURE: Res
'数据包
Case "adventure" : Tags.Add("冒险")
Case "cursed" : Tags.Add("Cursed")
Case "decoration" : Tags.Add("装饰")
Case "economy" : Tags.Add("经济")
Case "equipment" : Tags.Add("装备")
Case "food" : Tags.Add("食物")
Case "game-mechanics" : Tags.Add("游戏机制")
Case "library" : Tags.Add("支持库")
Case "magic" : Tags.Add("魔法")
Case "management" : Tags.Add("管理")
Case "minigame" : Tags.Add("小游戏")
Case "mobs" : Tags.Add("生物")
Case "optimization" : Tags.Add("优化")
Case "social" : Tags.Add("社交")
Case "storage" : Tags.Add("存储")
Case "technology" : Tags.Add("科技")
Case "transportation" : Tags.Add("交通")
Case "utility" : Tags.Add("实用工具")
Case "worldgen" : Tags.Add("世界生成")
End Select
Next
If Not Tags.Any() Then Tags.Add("杂项")
@@ -191,6 +191,8 @@ RetryStart:
TargetLoader = PageDownloadMod.Loader.Input.ModLoader
Case CompType.ModPack
TargetVersion = If(PageDownloadPack.Loader.Input.GameVersion, "")
Case CompType.DataPack
TargetVersion = If(PageDownloadDataPack.Loader.Input.GameVersion, "")
Case Else 'CompType.ResourcePack
'FUTURE: Res
TargetVersion = "" 'If(PageDownloadResource.Loader.Input.GameVersion, "")
@@ -51,32 +51,28 @@
<TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Left" Text="类型" Margin="0,0,18,0" />
<local:MyComboBox x:Name="ComboSearchTag" Grid.Column="4" Grid.Row="2" MaxDropDownHeight="320">
<local:MyComboBoxItem Tag="" Content="全部" IsSelected="True" />
<local:MyComboBoxItem Content="卡通" Tag="/cartoon" />
<local:MyComboBoxItem Content="冒险" Tag="6948/adventure" />
<local:MyComboBoxItem Content="Cursed" Tag="/cursed" />
<local:MyComboBoxItem Content="幻想" Tag="6554/fantasy" />
<local:MyComboBoxItem Content="写实" Tag="6553/realistic" />
<local:MyComboBoxItem Content="半写实" Tag="/semi-realistic" />
<local:MyComboBoxItem Content="原版风" Tag="6555/vanilla-like" />
<local:MyComboBoxItem Content="大气环境" Tag="/atmosphere" />
<local:MyComboBoxItem Content="植被" Tag="/bloom" />
<local:MyComboBoxItem Content="光源着色" Tag="/colored-lighting" />
<local:MyComboBoxItem Content="树叶" Tag="/foliage" />
<local:MyComboBoxItem Content="路径追踪" Tag="/path-tracing" />
<local:MyComboBoxItem Content="PBR" Tag="/pbr" />
<local:MyComboBoxItem Content="反射" Tag="/reflections" />
<local:MyComboBoxItem Content="阴影" Tag="/shadows" />
<local:MyComboBoxItem Content="土豆画质" Tag="/potato" />
<local:MyComboBoxItem Content="低性能影响" Tag="/low" />
<local:MyComboBoxItem Content="中性能影响" Tag="/medium" />
<local:MyComboBoxItem Content="高性能影响" Tag="/high" />
<local:MyComboBoxItem Content="极致画质" Tag="/screenshot" />
<local:MyComboBoxItem Content="Canvas" Tag="/canvas" />
<local:MyComboBoxItem Content="Iris" Tag="/iris" />
<local:MyComboBoxItem Content="OptiFine" Tag="/optifine" />
<local:MyComboBoxItem Content="原版光影" Tag="/vanilla-shader" />
<local:MyComboBoxItem Content="装饰" Tag="6554/decoration" />
<local:MyComboBoxItem Content="经济" Tag="6553/economy" />
<local:MyComboBoxItem Content="装备" Tag="/equipment" />
<local:MyComboBoxItem Content="食物" Tag="6555/food" />
<local:MyComboBoxItem Content="游戏机制" Tag="/game-mechanics" />
<local:MyComboBoxItem Content="支持库" Tag="6950/library" />
<local:MyComboBoxItem Content="魔法" Tag="6952/magic" />
<local:MyComboBoxItem Content="管理" Tag="/management" />
<local:MyComboBoxItem Content="小游戏" Tag="/minigame" />
<local:MyComboBoxItem Content="生物" Tag="/mobs" />
<local:MyComboBoxItem Content="优化" Tag="/optimization" />
<local:MyComboBoxItem Content="社交" Tag="/social" />
<local:MyComboBoxItem Content="存储" Tag="/storage" />
<local:MyComboBoxItem Content="科技" Tag="6951/technology" />
<local:MyComboBoxItem Content="交通" Tag="/transportation" />
<local:MyComboBoxItem Content="实用工具" Tag="6953/utility" />
<local:MyComboBoxItem Content="世界生成" Tag="/worldgen" />
<local:MyComboBoxItem Content="Mod 支持" Tag="6946/" />
<local:MyComboBoxItem Content="杂项" Tag="6947/" />
<local:MyComboBoxItem Content="幻想" Tag="6949/" />
</local:MyComboBox>
</Grid>
<Grid Margin="0,4,0,6" Height="35">
@@ -108,7 +104,7 @@
</local:MyCard>
</StackPanel>
<local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True" x:Name="PanLoad" UseAnimation="False" Margin="40,50">
<local:MyLoading Text="正在获取资源包列表" Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center" VerticalAlignment="Center" />
<local:MyLoading Text="正在获取数据包列表" Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center" VerticalAlignment="Center" />
</local:MyCard>
</StackPanel>
</local:MyScrollViewer>