docs & feat: add license & attribution notice (Apache-2.0 / GPL-3.0) and core system enhancements

This commit is contained in:
CAtlas0784 committed 2026-11-01 20:14:36 +07:00
1 parent 507836d367
commit ce6aabfc55
47 files changed
+5674 -724

No files matched your search

+32 -8
View File
@@ -22,10 +22,13 @@ import (
// VersionConfig is one entry of versions.json.
type VersionConfig struct {
AssetBundleURL string `json:"asset_bundle_url"`
ExResourceURL string `json:"ex_resource_url"`
LuaURL string `json:"lua_url"`
IfixURL string `json:"ifix_url"`
AssetBundleURL string `json:"asset_bundle_url"`
AssetBundleURLB string `json:"asset_bundle_url_b"`
ExResourceURL string `json:"ex_resource_url"`
LuaURL string `json:"lua_url"`
IfixURL string `json:"ifix_url"`
LuaVersion string `json:"lua_version"`
IfixVersion string `json:"ifix_version"`
}
type appState struct {
@@ -51,8 +54,19 @@ func (a *appState) getOrInsertHotfix(version, dispatchSeed string) VersionConfig
a.mu.Lock()
defer a.mu.Unlock()
if cfg, ok := a.hotfixMap[version]; ok {
return cfg
exact, hasExact := a.hotfixMap[version]
if hasExact && exact.AssetBundleURL != "" {
return exact
}
// Mobile clients append build identifiers after the release version. Prefer
// an exact entry, then look up the release in the configured metadata.
if release, _, ok := strings.Cut(version, "_"); ok {
if cfg, found := a.hotfixMap[release]; found {
return cfg
}
}
if hasExact {
return exact
}
if cfg, ok := a.hotfixMap["CNBETAWin"+version]; ok {
return cfg
@@ -190,15 +204,25 @@ func queryGateway(state *appState) http.HandlerFunc {
if state.runtime.LuaOverlay.Enabled {
cfg.LuaURL = state.runtime.PublicSDKURL + luaOverlayRoute
}
assetURLB := cfg.AssetBundleURLB
if assetURLB == "" {
assetURLB = cfg.AssetBundleURL
}
ifixVersion := cfg.IfixVersion
if ifixVersion == "" {
ifixVersion = "0"
}
rsp := &goproto.Gateserver{
Ip: state.runtime.PublicGameHost,
Port: uint32(state.runtime.GamePort),
AssetBundleUrl: cfg.AssetBundleURL,
AssetBundleUrlB: cfg.AssetBundleURL,
AssetBundleUrlB: assetURLB,
ExResourceUrl: cfg.ExResourceURL,
LuaUrl: cfg.LuaURL,
IfixVersion: "0",
IfixUrl: cfg.IfixURL,
IfixVersion: ifixVersion,
LuaVersion: cfg.LuaVersion,
Unk1: true,
Unk2: true,
Unk3: true,