Fix simulation_server_stub Entity class conflict + ServerConfig load timing
- Renamed inner class Entity→StubEntity (Godot has native Entity class) - Added await ServerConfig.config_loaded before reading map_list in server_main.gd - Config loads via call_deferred, so _ready() must wait for signal
This commit is contained in:
@@ -40,6 +40,10 @@ var _game_server: Node = null
|
||||
# Lifecycle
|
||||
# ---------------------------------------------------------------------------
|
||||
func _ready() -> void:
|
||||
# Wait for ServerConfig to finish (it loads via call_deferred)
|
||||
if ServerConfig and ServerConfig.has_signal(&"config_loaded"):
|
||||
await ServerConfig.config_loaded
|
||||
|
||||
# Config driven — ServerConfig singleton loaded at autoload time.
|
||||
# Allow port override via env var for backwards compatibility
|
||||
# (container/VPS deployments that set SERVER_PORT).
|
||||
|
||||
Reference in New Issue
Block a user