mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Wizard: accept un-split revision-0 asset tree
This commit is contained in:
+17
-11
@@ -124,9 +124,15 @@ var requiredAssets = []assetCheck{
|
|||||||
{"assets/release/20240404193219.bin.e", false},
|
{"assets/release/20240404193219.bin.e", false},
|
||||||
}
|
}
|
||||||
|
|
||||||
// platformAssets holds the per-platform rev-0 layout. At least one full set
|
// assetTrees lists every rev-0 layout the CDN accepts. At least one full set
|
||||||
// must be present; users may have only Android or only iOS extracted.
|
// must be present; users may have only the un-split shared tree, only Android,
|
||||||
var platformAssets = [][]assetCheck{
|
// only iOS, or any combination.
|
||||||
|
var assetTrees = [][]assetCheck{
|
||||||
|
{
|
||||||
|
{"assets/revisions/0/list.bin", false},
|
||||||
|
{"assets/revisions/0/assetbundle", true},
|
||||||
|
{"assets/revisions/0/resources", true},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
{"assets/revisions/0/android/list.bin", false},
|
{"assets/revisions/0/android/list.bin", false},
|
||||||
{"assets/revisions/0/android/assetbundle", true},
|
{"assets/revisions/0/android/assetbundle", true},
|
||||||
@@ -161,9 +167,9 @@ func validateAssets() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var platformMissing [][]string
|
var treeMissing [][]string
|
||||||
anyPlatformOK := false
|
anyTreeOK := false
|
||||||
for _, group := range platformAssets {
|
for _, group := range assetTrees {
|
||||||
var groupMissing []string
|
var groupMissing []string
|
||||||
for _, a := range group {
|
for _, a := range group {
|
||||||
if m, ok := checkAsset(a); !ok {
|
if m, ok := checkAsset(a); !ok {
|
||||||
@@ -171,12 +177,12 @@ func validateAssets() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(groupMissing) == 0 {
|
if len(groupMissing) == 0 {
|
||||||
anyPlatformOK = true
|
anyTreeOK = true
|
||||||
}
|
}
|
||||||
platformMissing = append(platformMissing, groupMissing)
|
treeMissing = append(treeMissing, groupMissing)
|
||||||
}
|
}
|
||||||
if !anyPlatformOK {
|
if !anyTreeOK {
|
||||||
for _, gm := range platformMissing {
|
for _, gm := range treeMissing {
|
||||||
missing = append(missing, gm...)
|
missing = append(missing, gm...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,7 +206,7 @@ func validateAssets() {
|
|||||||
b.WriteString("\n")
|
b.WriteString("\n")
|
||||||
b.WriteString(dimStyle.Render(" Place the extracted game assets under server/assets/ and try again."))
|
b.WriteString(dimStyle.Render(" Place the extracted game assets under server/assets/ and try again."))
|
||||||
b.WriteString("\n")
|
b.WriteString("\n")
|
||||||
b.WriteString(dimStyle.Render(" At least one of assets/revisions/0/android/ or assets/revisions/0/ios/ must be fully present."))
|
b.WriteString(dimStyle.Render(" At least one of assets/revisions/0/, assets/revisions/0/android/, or assets/revisions/0/ios/ must be fully present."))
|
||||||
b.WriteString("\n")
|
b.WriteString("\n")
|
||||||
b.WriteString(dimStyle.Render(" Get them from ") + hlStyle.Render("#resources") + dimStyle.Render(" on Discord: ") + hlStyle.Hyperlink("https://discord.com/invite/MZAf5aVkJG").Render("https://discord.com/invite/MZAf5aVkJG"))
|
b.WriteString(dimStyle.Render(" Get them from ") + hlStyle.Render("#resources") + dimStyle.Render(" on Discord: ") + hlStyle.Hyperlink("https://discord.com/invite/MZAf5aVkJG").Render("https://discord.com/invite/MZAf5aVkJG"))
|
||||||
b.WriteString("\n")
|
b.WriteString("\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user