15 lines
463 B
GDScript
15 lines
463 B
GDScript
class_name ProxyConfig
|
|
extends RefCounted
|
|
## The client's one piece of network config: the proxy base URL. Never a key,
|
|
## never a model name (charter §4). Overridable per environment via project
|
|
## settings; defaults to the dev proxy.
|
|
|
|
const SETTING := "coc_rpg/proxy_base_url"
|
|
const DEFAULT := "http://localhost:8000"
|
|
|
|
|
|
static func base_url() -> String:
|
|
var v = ProjectSettings.get_setting(SETTING, DEFAULT)
|
|
var s := str(v)
|
|
return s if s != "" else DEFAULT
|