docs & feat: add license & attribution notice (Apache-2.0 / GPL-3.0) and core system enhancements
This commit is contained in:
1 parent
507836d367
commit
ce6aabfc55
47 files changed
+5674
-724
No files matched your search
@@ -47,6 +47,32 @@ func LoadBrowsableGachaBanners() ([]FeaturedGachaBanner, GachaSandboxPolicy, err
|
||||
return loadGachaBanners(false)
|
||||
}
|
||||
|
||||
// Apply operator visibility only to IDs with verified installed Client assets.
|
||||
// Imported banner lists alone do not establish a compatible native pool.
|
||||
func LoadVisibleGachaBanners(mode int) ([]FeaturedGachaBanner, error) {
|
||||
if mode < 0 || mode > 3 {
|
||||
return nil, fmt.Errorf("invalid Warp visibility mode")
|
||||
}
|
||||
if err := LoadBannersConfig(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
selected := map[uint32]bool{}
|
||||
for _, row := range GetVisibleBanners(mode) {
|
||||
selected[row.ID] = true
|
||||
}
|
||||
verified, _, err := LoadBrowsableGachaBanners()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var visible []FeaturedGachaBanner
|
||||
for _, row := range verified {
|
||||
if selected[row.ID] {
|
||||
visible = append(visible, row)
|
||||
}
|
||||
}
|
||||
return visible, nil
|
||||
}
|
||||
|
||||
func loadGachaBanners(featuredOnly bool) ([]FeaturedGachaBanner, GachaSandboxPolicy, error) {
|
||||
raw, err := ReadResourceFile("resources/PreviewGameplayCatalog.json")
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user