Save endgame progress, team presets, technique support and camera controls
This commit is contained in:
1 parent
a681affdb3
commit
639cef7d19
52 files changed
+11940
-766
No files matched your search
@@ -15,6 +15,7 @@ import (
|
||||
// RuntimeConfig is shared by both server processes. Deployment values belong
|
||||
// in configuration rather than in handlers or executable entry points.
|
||||
type RuntimeConfig struct {
|
||||
PlayerUID uint32 `json:"player_uid"`
|
||||
BattleDiagnostics BattleDiagnosticsConfig `json:"battle_diagnostics"`
|
||||
ClientVersion string `json:"client_version"`
|
||||
GameHost string `json:"game_host"`
|
||||
@@ -67,6 +68,16 @@ func LoadRuntimeConfig() (RuntimeConfig, error) {
|
||||
*dest = uint16(n)
|
||||
}
|
||||
}
|
||||
if value, ok := os.LookupEnv("GAC_PLAYER_UID"); ok {
|
||||
n, err := strconv.ParseUint(value, 10, 32)
|
||||
if err != nil || n == 0 {
|
||||
return cfg, fmt.Errorf("GAC_PLAYER_UID must be an integer between 1 and 4294967295")
|
||||
}
|
||||
cfg.PlayerUID = uint32(n)
|
||||
}
|
||||
if cfg.PlayerUID == 0 {
|
||||
return cfg, fmt.Errorf("runtime config requires a nonzero player_uid")
|
||||
}
|
||||
if cfg.GamePort == 0 || cfg.SDKPort == 0 || strings.TrimSpace(cfg.ClientVersion) == "" {
|
||||
return cfg, fmt.Errorf("runtime config requires client_version, game_port and sdk_port")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user